[build] upgrade eslint to 9.37.0 (#88)

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88
Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org>
Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
This commit is contained in:
Zoë Bijl
2025-10-12 13:42:02 +02:00
committed by tobi
parent 75d7a62693
commit 1ff70886a1
975 changed files with 22196 additions and 21964 deletions
+15 -15
View File
@@ -1,9 +1,9 @@
import { Map as ImmutableMap, fromJS } from 'immutable';
import { Map as ImmutableMap, fromJS } from "immutable";
import { POLLS_IMPORT } from 'mastodon/actions/importer';
import { POLLS_IMPORT } from "mastodon/actions/importer";
import { normalizePollOptionTranslation } from '../actions/importer/normalizer';
import { STATUS_TRANSLATE_SUCCESS, STATUS_TRANSLATE_UNDO } from '../actions/statuses';
import { normalizePollOptionTranslation } from "../actions/importer/normalizer";
import { STATUS_TRANSLATE_SUCCESS, STATUS_TRANSLATE_UNDO } from "../actions/statuses";
const importPolls = (state, polls) => state.withMutations(map => polls.forEach(poll => map.set(poll.id, fromJS(poll))));
@@ -13,7 +13,7 @@ const statusTranslateSuccess = (state, pollTranslation) => {
const poll = state.get(pollTranslation.id);
pollTranslation.options.forEach((item, index) => {
map.setIn([pollTranslation.id, 'options', index, 'translation'], fromJS(normalizePollOptionTranslation(item, poll)));
map.setIn([pollTranslation.id, "options", index, "translation"], fromJS(normalizePollOptionTranslation(item, poll)));
});
}
});
@@ -21,10 +21,10 @@ const statusTranslateSuccess = (state, pollTranslation) => {
const statusTranslateUndo = (state, id) => {
return state.withMutations(map => {
const options = map.getIn([id, 'options']);
const options = map.getIn([id, "options"]);
if (options) {
options.forEach((item, index) => map.deleteIn([id, 'options', index, 'translation']));
options.forEach((item, index) => map.deleteIn([id, "options", index, "translation"]));
}
});
};
@@ -33,13 +33,13 @@ const initialState = ImmutableMap();
export default function polls(state = initialState, action) {
switch(action.type) {
case POLLS_IMPORT:
return importPolls(state, action.polls);
case STATUS_TRANSLATE_SUCCESS:
return statusTranslateSuccess(state, action.translation.poll);
case STATUS_TRANSLATE_UNDO:
return statusTranslateUndo(state, action.pollId);
default:
return state;
case POLLS_IMPORT:
return importPolls(state, action.polls);
case STATUS_TRANSLATE_SUCCESS:
return statusTranslateSuccess(state, action.translation.poll);
case STATUS_TRANSLATE_UNDO:
return statusTranslateUndo(state, action.pollId);
default:
return state;
}
}