Enable ESLlint no-case-declarations (#30768)
Some checks are pending
Bundler Audit / security (push) Waiting to run
Check i18n / check-i18n (push) Waiting to run
CodeQL / Analyze (javascript) (push) Waiting to run
CodeQL / Analyze (ruby) (push) Waiting to run
Check formatting / lint (push) Waiting to run
CSS Linting / lint (push) Waiting to run
Haml Linting / lint (push) Waiting to run
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Historical data migration test / test (14-alpine) (push) Waiting to run
Historical data migration test / test (15-alpine) (push) Waiting to run
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (.ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3.1) (push) Blocked by required conditions
Ruby Testing / test (3.2) (push) Blocked by required conditions
Ruby Testing / Libvips tests (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.1) (push) Blocked by required conditions
Ruby Testing / Libvips tests (3.2) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Blocked by required conditions

This commit is contained in:
Nick Schonning 2024-10-01 12:26:30 -04:00 committed by GitHub
parent a2c4ba2001
commit f91f077985
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 8 additions and 5 deletions

View File

@ -64,7 +64,6 @@ module.exports = defineConfig({
'indent': ['error', 2], 'indent': ['error', 2],
'jsx-quotes': ['error', 'prefer-single'], 'jsx-quotes': ['error', 'prefer-single'],
'semi': ['error', 'always'], 'semi': ['error', 'always'],
'no-case-declarations': 'off',
'no-catch-shadow': 'error', 'no-catch-shadow': 'error',
'no-console': [ 'no-console': [
'warn', 'warn',

View File

@ -106,12 +106,13 @@ export const connectTimelineStream = (timelineId, channelName, params = {}, opti
dispatch(processNewNotificationForGroups(notificationJSON)); dispatch(processNewNotificationForGroups(notificationJSON));
break; break;
} }
case 'notifications_merged': case 'notifications_merged': {
const state = getState(); const state = getState();
if (state.notifications.top || !state.notifications.mounted) if (state.notifications.top || !state.notifications.mounted)
dispatch(expandNotifications({ forceLoad: true, maxId: undefined })); dispatch(expandNotifications({ forceLoad: true, maxId: undefined }));
dispatch(refreshStaleNotificationGroups()); dispatch(refreshStaleNotificationGroups());
break; break;
}
case 'conversation': case 'conversation':
// @ts-expect-error // @ts-expect-error
dispatch(updateConversations(JSON.parse(data.payload))); dispatch(updateConversations(JSON.parse(data.payload)));

View File

@ -407,7 +407,7 @@ export default function compose(state = initialState, action) {
return item; return item;
})); }));
case INIT_MEDIA_EDIT_MODAL: case INIT_MEDIA_EDIT_MODAL: {
const media = state.get('media_attachments').find(item => item.get('id') === action.id); const media = state.get('media_attachments').find(item => item.get('id') === action.id);
return state.set('media_modal', ImmutableMap({ return state.set('media_modal', ImmutableMap({
id: action.id, id: action.id,
@ -416,6 +416,7 @@ export default function compose(state = initialState, action) {
focusY: media.getIn(['meta', 'focus', 'y'], 0), focusY: media.getIn(['meta', 'focus', 'y'], 0),
dirty: false, dirty: false,
})); }));
}
case COMPOSE_CHANGE_MEDIA_DESCRIPTION: case COMPOSE_CHANGE_MEDIA_DESCRIPTION:
return state.setIn(['media_modal', 'description'], action.description).setIn(['media_modal', 'dirty'], true); return state.setIn(['media_modal', 'description'], action.description).setIn(['media_modal', 'dirty'], true);
case COMPOSE_CHANGE_MEDIA_FOCUS: case COMPOSE_CHANGE_MEDIA_FOCUS:

View File

@ -298,9 +298,10 @@ export default function notifications(state = initialState, action) {
return action.payload.timeline === 'home' ? return action.payload.timeline === 'home' ?
state.update(action.payload.usePendingItems ? 'pendingItems' : 'items', items => items.first() ? items.unshift(null) : items) : state.update(action.payload.usePendingItems ? 'pendingItems' : 'items', items => items.first() ? items.unshift(null) : items) :
state; state;
case NOTIFICATIONS_MARK_AS_READ: case NOTIFICATIONS_MARK_AS_READ: {
const lastNotification = state.get('items').find(item => item !== null); const lastNotification = state.get('items').find(item => item !== null);
return lastNotification ? recountUnread(state, lastNotification.get('id')) : state; return lastNotification ? recountUnread(state, lastNotification.get('id')) : state;
}
case NOTIFICATIONS_SET_BROWSER_SUPPORT: case NOTIFICATIONS_SET_BROWSER_SUPPORT:
return state.set('browserSupport', action.value); return state.set('browserSupport', action.value);
case NOTIFICATIONS_SET_BROWSER_PERMISSION: case NOTIFICATIONS_SET_BROWSER_PERMISSION:

View File

@ -72,9 +72,10 @@ export default function search(state = initialState, action) {
}); });
case SEARCH_EXPAND_REQUEST: case SEARCH_EXPAND_REQUEST:
return state.set('type', action.searchType).set('isLoading', true); return state.set('type', action.searchType).set('isLoading', true);
case SEARCH_EXPAND_SUCCESS: case SEARCH_EXPAND_SUCCESS: {
const results = action.searchType === 'hashtags' ? ImmutableOrderedSet(fromJS(action.results.hashtags)) : action.results[action.searchType].map(item => item.id); const results = action.searchType === 'hashtags' ? ImmutableOrderedSet(fromJS(action.results.hashtags)) : action.results[action.searchType].map(item => item.id);
return state.updateIn(['results', action.searchType], list => list.union(results)).set('isLoading', false); return state.updateIn(['results', action.searchType], list => list.union(results)).set('isLoading', false);
}
case SEARCH_HISTORY_UPDATE: case SEARCH_HISTORY_UPDATE:
return state.set('recent', ImmutableOrderedSet(fromJS(action.recent))); return state.set('recent', ImmutableOrderedSet(fromJS(action.recent)));
default: default: