[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
@@ -1,15 +1,15 @@
// Package imports.
import { Map as ImmutableMap } from 'immutable';
import { Map as ImmutableMap } from "immutable";
// Our imports.
import { LOCAL_SETTING_CHANGE, LOCAL_SETTING_DELETE } from 'flavours/glitch/actions/local_settings';
import { STORE_HYDRATE } from 'flavours/glitch/actions/store';
import { LOCAL_SETTING_CHANGE, LOCAL_SETTING_DELETE } from "flavours/glitch/actions/local_settings";
import { STORE_HYDRATE } from "flavours/glitch/actions/store";
const initialState = ImmutableMap({
layout : 'mobile',
layout : "mobile",
stretch : true,
side_arm : 'none',
side_arm_reply_mode : 'keep',
side_arm : "none",
side_arm_reply_mode : "keep",
show_reply_count : false,
always_show_spoilers_field: true,
confirm_missing_media_description: false,
@@ -21,7 +21,7 @@ const initialState = ImmutableMap({
hicolor_privacy_icons: false,
show_content_type_choice: true,
tag_misleading_links: true,
rewrite_mentions: 'no',
rewrite_mentions: "no",
content_warnings : ImmutableMap({
auto_unfold : false,
filter : null,
@@ -51,7 +51,7 @@ const initialState = ImmutableMap({
fullwidth : true,
reveal_behind_cw : false,
pop_in_player : true,
pop_in_position : 'right',
pop_in_position : "right",
}),
notifications : ImmutableMap({
favicon_badge : false,
@@ -64,20 +64,20 @@ const initialState = ImmutableMap({
media: true,
visibility: true,
}),
theme: 'mastodon-light',
theme: "mastodon-light",
});
const hydrate = (state, localSettings) => state.mergeDeep(localSettings);
export default function localSettings(state = initialState, action) {
switch(action.type) {
case STORE_HYDRATE:
return hydrate(state, action.state.get('local_settings'));
case LOCAL_SETTING_CHANGE:
return state.setIn(action.key, action.value);
case LOCAL_SETTING_DELETE:
return state.deleteIn(action.key);
default:
return state;
case STORE_HYDRATE:
return hydrate(state, action.state.get("local_settings"));
case LOCAL_SETTING_CHANGE:
return state.setIn(action.key, action.value);
case LOCAL_SETTING_DELETE:
return state.deleteIn(action.key);
default:
return state;
}
}