Skip to content

Commit

Permalink
default-param-last ignores for reducers
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe committed May 26, 2022
1 parent 2a830d7 commit 86058d8
Show file tree
Hide file tree
Showing 27 changed files with 27 additions and 24 deletions.
1 change: 1 addition & 0 deletions src/account/accountsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const accountRemove = (state, action) => {
return newState;
};

// eslint-disable-next-line default-param-last
export default (state: AccountsState = initialState, action: Action): AccountsState => {
switch (action.type) {
case REGISTER_COMPLETE:
Expand Down
2 changes: 1 addition & 1 deletion src/alertWords/alertWordsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { NULL_ARRAY } from '../nullObjects';
const initialState = NULL_ARRAY;

export default (
state: AlertWordsState = initialState,
state: AlertWordsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): AlertWordsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/caughtup/caughtUpReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function addMessages(state: CaughtUpState, narrow, messageIds): CaughtUpState {
}

export default (
state: CaughtUpState = initialState,
state: CaughtUpState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): CaughtUpState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/chat/fetchingReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const messageFetchComplete = (state, action) => {
};

export default (
state: FetchingState = initialState,
state: FetchingState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): FetchingState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/chat/flagsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const eventUpdateMessageFlags = (state, action) => {
};

export default (
state: FlagsState = initialState,
state: FlagsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): FlagsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/chat/narrowsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const eventUpdateMessageFlags = (state, action) => {
};

export default (
state: NarrowsState = initialState,
state: NarrowsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): NarrowsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/drafts/draftsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const draftUpdate = (state, action) => {
};

export default (
state: DraftsState = initialState,
state: DraftsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): DraftsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/message/messagesReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const eventNewMessage = (state, action) => {
};

export default (
state: MessagesState = initialState,
state: MessagesState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
globalState: PerAccountState,
): MessagesState => {
Expand Down
2 changes: 1 addition & 1 deletion src/mute/muteModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function convert(data, streams): MuteState {
}

export const reducer = (
state: MuteState = initialState,
state: MuteState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
globalState: PerAccountState,
): MuteState => {
Expand Down
2 changes: 1 addition & 1 deletion src/mute/mutedUsersReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function mutedUsersToMap(muted_users: $ReadOnlyArray<MutedUser>): Immutable.Map<
}

export default (
state: MutedUsersState = initialState,
state: MutedUsersState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): MutedUsersState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/outbox/outboxReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const messageSendStart = (state, action) => {
};

export default (
state: OutboxState = initialState,
state: OutboxState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): OutboxState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/pm-conversations/pmConversationsModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function insertMessage(state, message, ownUserId) {
}

export function reducer(
state: PmConversationsState = initialState,
state: PmConversationsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): PmConversationsState {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/presence/presenceReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { objectEntries } from '../flowPonyfill';
const initialState: PresenceState = NULL_OBJECT;

export default (
state: PresenceState = initialState,
state: PresenceState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): PresenceState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/realm/realmReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function getVideoChatProvider({
}

export default (
state: RealmState = initialState,
state: RealmState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): RealmState => {
switch (action.type) {
Expand Down
1 change: 1 addition & 0 deletions src/session/sessionReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const rehydrate = (state, action) => {
};
};

// eslint-disable-next-line default-param-last
export default (state: SessionState = initialState, action: Action): SessionState => {
switch (action.type) {
case DEAD_QUEUE:
Expand Down
1 change: 1 addition & 0 deletions src/settings/settingsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const initialState: SettingsState = {
doNotMarkMessagesAsRead: false,
};

// eslint-disable-next-line default-param-last
export default (state: SettingsState = initialState, action: Action): SettingsState => {
switch (action.type) {
case REGISTER_COMPLETE: {
Expand Down
2 changes: 1 addition & 1 deletion src/streams/streamsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function updateStreamProperties<S: Stream | Subscription>(
}

export default (
state: StreamsState = initialState,
state: StreamsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): StreamsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/subscriptions/subscriptionsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { filterArray } from '../utils/immutability';
const initialState: SubscriptionsState = NULL_ARRAY;

export default (
state: SubscriptionsState = initialState,
state: SubscriptionsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): SubscriptionsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/topics/topicsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const eventNewMessage = (state, action) => {
};

export default (
state: TopicsState = initialState,
state: TopicsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): TopicsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/typing/typingReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const clearTyping = (state, action) => {
};

export default (
state: TypingState = initialState,
state: TypingState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): TypingState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/unread/unreadHuddlesReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const eventUpdateMessageFlags = (state, action) => {
};

export default (
state: UnreadHuddlesState = initialState,
state: UnreadHuddlesState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): UnreadHuddlesState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/unread/unreadMentionsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const eventUpdateMessageFlags = (state, action) => {
};

export default (
state: UnreadMentionsState = initialState,
state: UnreadMentionsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): UnreadMentionsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/unread/unreadModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function deleteMessages(
}

function streamsReducer(
state: UnreadStreamsState = initialStreamsState,
state: UnreadStreamsState = initialStreamsState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
globalState: PerAccountState,
): UnreadStreamsState {
Expand Down
2 changes: 1 addition & 1 deletion src/unread/unreadPmsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const eventUpdateMessageFlags = (state, action) => {
};

export default (
state: UnreadPmsState = initialState,
state: UnreadPmsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): UnreadPmsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/user-groups/userGroupsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const eventUserGroupRemoveMembers = (state, action) =>
);

export default (
state: UserGroupsState = initialState,
state: UserGroupsState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): UserGroupsState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/user-statuses/userStatusesModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function updateUserStatus(
}

export const reducer = (
state: UserStatusesState = initialState,
state: UserStatusesState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): UserStatusesState => {
switch (action.type) {
Expand Down
2 changes: 1 addition & 1 deletion src/users/usersReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { NULL_ARRAY } from '../nullObjects';
const initialState: UsersState = NULL_ARRAY;

export default (
state: UsersState = initialState,
state: UsersState = initialState, // eslint-disable-line default-param-last
action: PerAccountApplicableAction,
): UsersState => {
switch (action.type) {
Expand Down

0 comments on commit 86058d8

Please sign in to comment.