[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,8 +1,8 @@
import { connect } from 'react-redux';
import { connect } from "react-redux";
import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from 'flavours/glitch/actions/bundles';
import { fetchBundleRequest, fetchBundleSuccess, fetchBundleFail } from "flavours/glitch/actions/bundles";
import Bundle from '../components/bundle';
import Bundle from "../components/bundle";
const mapDispatchToProps = dispatch => ({
@@ -1,19 +1,19 @@
import { defineMessages, injectIntl } from 'react-intl';
import { defineMessages, injectIntl } from "react-intl";
import { connect } from 'react-redux';
import { connect } from "react-redux";
import { openModal } from 'flavours/glitch/actions/modal';
import { logOut } from 'flavours/glitch/utils/log_out';
import { openModal } from "flavours/glitch/actions/modal";
import { logOut } from "flavours/glitch/utils/log_out";
import ColumnsArea from '../components/columns_area';
import ColumnsArea from "../components/columns_area";
const messages = defineMessages({
logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },
logoutConfirm: { id: 'confirmations.logout.confirm', defaultMessage: 'Log out' },
logoutMessage: { id: "confirmations.logout.message", defaultMessage: "Are you sure you want to log out?" },
logoutConfirm: { id: "confirmations.logout.confirm", defaultMessage: "Log out" },
});
const mapStateToProps = state => ({
columns: state.getIn(['settings', 'columns']),
columns: state.getIn(["settings", "columns"]),
});
const mapDispatchToProps = (dispatch, { intl }) => ({
@@ -21,13 +21,13 @@ const mapDispatchToProps = (dispatch, { intl }) => ({
e.preventDefault();
e.stopPropagation();
dispatch(openModal({
modalType: 'SETTINGS',
modalType: "SETTINGS",
modalProps: {},
}));
},
onLogout () {
dispatch(openModal({
modalType: 'CONFIRM',
modalType: "CONFIRM",
modalProps: {
message: intl.formatMessage(messages.logoutMessage),
confirm: intl.formatMessage(messages.logoutConfirm),
@@ -1,9 +1,9 @@
import { connect } from 'react-redux';
import { connect } from "react-redux";
import LoadingBar from 'react-redux-loading-bar';
import LoadingBar from "react-redux-loading-bar";
const mapStateToProps = (state, ownProps) => ({
loading: state.get('loadingBar')[ownProps.scope || 'default'],
loading: state.get("loadingBar")[ownProps.scope || "default"],
});
export default connect(mapStateToProps)(LoadingBar.WrappedComponent);
@@ -1,13 +1,13 @@
import { connect } from 'react-redux';
import { connect } from "react-redux";
import { openModal, closeModal } from 'flavours/glitch/actions/modal';
import { openModal, closeModal } from "flavours/glitch/actions/modal";
import ModalRoot from '../components/modal_root';
import ModalRoot from "../components/modal_root";
const mapStateToProps = state => ({
ignoreFocus: state.getIn(['modal', 'ignoreFocus']),
type: state.getIn(['modal', 'stack', 0, 'modalType'], null),
props: state.getIn(['modal', 'stack', 0, 'modalProps'], {}),
ignoreFocus: state.getIn(["modal", "ignoreFocus"]),
type: state.getIn(["modal", "stack", 0, "modalType"], null),
props: state.getIn(["modal", "stack", 0, "modalProps"], {}),
});
const mapDispatchToProps = dispatch => ({
@@ -15,7 +15,7 @@ const mapDispatchToProps = dispatch => ({
if (confirmationMessage) {
dispatch(
openModal({
modalType: 'CONFIRM',
modalType: "CONFIRM",
modalProps: {
message: confirmationMessage.message,
confirm: confirmationMessage.confirm,
@@ -1,19 +1,19 @@
import { injectIntl } from 'react-intl';
import { injectIntl } from "react-intl";
import { connect } from 'react-redux';
import { connect } from "react-redux";
import { NotificationStack } from 'react-notification';
import { NotificationStack } from "react-notification";
import { dismissAlert } from 'flavours/glitch/actions/alerts';
import { getAlerts } from 'flavours/glitch/selectors';
import { dismissAlert } from "flavours/glitch/actions/alerts";
import { getAlerts } from "flavours/glitch/selectors";
const mapStateToProps = (state, { intl }) => {
const notifications = getAlerts(state);
notifications.forEach(notification => ['title', 'message'].forEach(key => {
notifications.forEach(notification => ["title", "message"].forEach(key => {
const value = notification[key];
if (typeof value === 'object') {
if (typeof value === "object") {
notification[key] = intl.formatMessage(value, notification[`${key}_values`]);
}
}));
@@ -1,12 +1,12 @@
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { Map as ImmutableMap, List as ImmutableList } from "immutable";
import { connect } from "react-redux";
import { createSelector } from "reselect";
import { debounce } from 'lodash';
import { debounce } from "lodash";
import { scrollTopTimeline, loadPending } from 'flavours/glitch/actions/timelines';
import StatusList from 'flavours/glitch/components/status_list';
import { me } from 'flavours/glitch/initial_state';
import { scrollTopTimeline, loadPending } from "flavours/glitch/actions/timelines";
import StatusList from "flavours/glitch/components/status_list";
import { me } from "flavours/glitch/initial_state";
const getRegex = createSelector([
(state, { regex }) => regex,
@@ -14,7 +14,7 @@ const getRegex = createSelector([
let regex = null;
try {
regex = rawRegex && new RegExp(rawRegex.trim(), 'i');
regex = rawRegex && new RegExp(rawRegex.trim(), "i");
} catch (e) {
// Bad regex, don't affect filters
}
@@ -22,33 +22,37 @@ const getRegex = createSelector([
});
const makeGetStatusIds = (pending = false) => createSelector([
(state, { type }) => state.getIn(['settings', type], ImmutableMap()),
(state, { type }) => state.getIn(['timelines', type, pending ? 'pendingItems' : 'items'], ImmutableList()),
(state) => state.get('statuses'),
(state, { type }) => state.getIn(["settings", type], ImmutableMap()),
(state, { type }) => state.getIn(["timelines", type, pending ? "pendingItems" : "items"], ImmutableList()),
(state) => state.get("statuses"),
getRegex,
], (columnSettings, statusIds, statuses, regex) => {
return statusIds.filter(id => {
if (id === null) return true;
if (id === null) {
return true;
}
const statusForId = statuses.get(id);
let showStatus = true;
if (statusForId.get('account') === me) return true;
if (columnSettings.getIn(['shows', 'reblog']) === false) {
showStatus = showStatus && statusForId.get('reblog') === null;
if (statusForId.get("account") === me) {
return true;
}
if (columnSettings.getIn(['shows', 'reply']) === false) {
showStatus = showStatus && (statusForId.get('in_reply_to_id') === null || statusForId.get('in_reply_to_account_id') === me);
if (columnSettings.getIn(["shows", "reblog"]) === false) {
showStatus = showStatus && statusForId.get("reblog") === null;
}
if (columnSettings.getIn(['shows', 'direct']) === false) {
showStatus = showStatus && statusForId.get('visibility') !== 'direct';
if (columnSettings.getIn(["shows", "reply"]) === false) {
showStatus = showStatus && (statusForId.get("in_reply_to_id") === null || statusForId.get("in_reply_to_account_id") === me);
}
if (columnSettings.getIn(["shows", "direct"]) === false) {
showStatus = showStatus && statusForId.get("visibility") !== "direct";
}
if (showStatus && regex) {
const searchIndex = statusForId.get('reblog') ? statuses.getIn([statusForId.get('reblog'), 'search_index']) : statusForId.get('search_index');
const searchIndex = statusForId.get("reblog") ? statuses.getIn([statusForId.get("reblog"), "search_index"]) : statusForId.get("search_index");
showStatus = !regex.test(searchIndex);
}
@@ -62,10 +66,10 @@ const makeMapStateToProps = () => {
const mapStateToProps = (state, { timelineId, regex }) => ({
statusIds: getStatusIds(state, { type: timelineId, regex }),
lastId: state.getIn(['timelines', timelineId, 'items'])?.last(),
isLoading: state.getIn(['timelines', timelineId, 'isLoading'], true),
isPartial: state.getIn(['timelines', timelineId, 'isPartial'], false),
hasMore: state.getIn(['timelines', timelineId, 'hasMore']),
lastId: state.getIn(["timelines", timelineId, "items"])?.last(),
isLoading: state.getIn(["timelines", timelineId, "isLoading"], true),
isPartial: state.getIn(["timelines", timelineId, "isPartial"], false),
hasMore: state.getIn(["timelines", timelineId, "hasMore"]),
numPending: getPendingStatusIds(state, { type: timelineId }).size,
});