[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,21 +1,21 @@
import PropTypes from 'prop-types';
import PropTypes from "prop-types";
import { injectIntl, defineMessages } from 'react-intl';
import { injectIntl, defineMessages } from "react-intl";
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import ImmutablePropTypes from "react-immutable-proptypes";
import ImmutablePureComponent from "react-immutable-pure-component";
import { connect } from "react-redux";
import { followAccount, unfollowAccount } from 'flavours/glitch/actions/accounts';
import { Avatar } from 'flavours/glitch/components/avatar';
import { DisplayName } from 'flavours/glitch/components/display_name';
import { IconButton } from 'flavours/glitch/components/icon_button';
import Permalink from 'flavours/glitch/components/permalink';
import { makeGetAccount } from 'flavours/glitch/selectors';
import { followAccount, unfollowAccount } from "flavours/glitch/actions/accounts";
import { Avatar } from "flavours/glitch/components/avatar";
import { DisplayName } from "flavours/glitch/components/display_name";
import { IconButton } from "flavours/glitch/components/icon_button";
import Permalink from "flavours/glitch/components/permalink";
import { makeGetAccount } from "flavours/glitch/selectors";
const messages = defineMessages({
follow: { id: 'account.follow', defaultMessage: 'Follow' },
unfollow: { id: 'account.unfollow', defaultMessage: 'Unfollow' },
follow: { id: "account.follow", defaultMessage: "Follow" },
unfollow: { id: "account.unfollow", defaultMessage: "Unfollow" },
});
const makeMapStateToProps = () => {
@@ -45,10 +45,10 @@ class Account extends ImmutablePureComponent {
handleFollow = () => {
const { account, dispatch } = this.props;
if (account.getIn(['relationship', 'following']) || account.getIn(['relationship', 'requested'])) {
dispatch(unfollowAccount(account.get('id')));
if (account.getIn(["relationship", "following"]) || account.getIn(["relationship", "requested"])) {
dispatch(unfollowAccount(account.get("id")));
} else {
dispatch(followAccount(account.get('id')));
dispatch(followAccount(account.get("id")));
}
};
@@ -57,7 +57,7 @@ class Account extends ImmutablePureComponent {
let button;
if (account.getIn(['relationship', 'following'])) {
if (account.getIn(["relationship", "following"])) {
button = <IconButton icon='check' title={intl.formatMessage(messages.unfollow)} active onClick={this.handleFollow} />;
} else {
button = <IconButton icon='plus' title={intl.formatMessage(messages.follow)} onClick={this.handleFollow} />;
@@ -66,12 +66,12 @@ class Account extends ImmutablePureComponent {
return (
<div className='account follow-recommendations-account'>
<div className='account__wrapper'>
<Permalink className='account__display-name account__display-name--with-note' title={account.get('acct')} href={account.get('url')} to={`/@${account.get('acct')}`}>
<Permalink className='account__display-name account__display-name--with-note' title={account.get("acct")} href={account.get("url")} to={`/@${account.get("acct")}`}>
<div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>
<DisplayName account={account} />
<div className='account__note'>{getFirstSentence(account.get('note_plain'))}</div>
<div className='account__note'>{getFirstSentence(account.get("note_plain"))}</div>
</Permalink>
<div className='account__relationship'>
@@ -1,26 +1,26 @@
import PropTypes from 'prop-types';
import PropTypes from "prop-types";
import { FormattedMessage } from 'react-intl';
import { FormattedMessage } from "react-intl";
import { Helmet } from 'react-helmet';
import { Helmet } from "react-helmet";
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import ImmutablePropTypes from "react-immutable-proptypes";
import ImmutablePureComponent from "react-immutable-pure-component";
import { connect } from "react-redux";
import { requestBrowserPermission } from 'flavours/glitch/actions/notifications';
import { changeSetting, saveSettings } from 'flavours/glitch/actions/settings';
import { fetchSuggestions } from 'flavours/glitch/actions/suggestions';
import { markAsPartial } from 'flavours/glitch/actions/timelines';
import Button from 'flavours/glitch/components/button';
import Column from 'flavours/glitch/features/ui/components/column';
import imageGreeting from 'mastodon/../images/elephant_ui_greeting.svg';
import { requestBrowserPermission } from "flavours/glitch/actions/notifications";
import { changeSetting, saveSettings } from "flavours/glitch/actions/settings";
import { fetchSuggestions } from "flavours/glitch/actions/suggestions";
import { markAsPartial } from "flavours/glitch/actions/timelines";
import Button from "flavours/glitch/components/button";
import Column from "flavours/glitch/features/ui/components/column";
import imageGreeting from "mastodon/../images/elephant_ui_greeting.svg";
import Account from './components/account';
import Account from "./components/account";
const mapStateToProps = state => ({
suggestions: state.getIn(['suggestions', 'items']),
isLoading: state.getIn(['suggestions', 'isLoading']),
suggestions: state.getIn(["suggestions", "items"]),
isLoading: state.getIn(["suggestions", "isLoading"]),
});
class FollowRecommendations extends ImmutablePureComponent {
@@ -52,7 +52,7 @@ class FollowRecommendations extends ImmutablePureComponent {
// Force the home timeline to be reloaded when the user navigates
// to it; if the user is new, it would've been empty before
dispatch(markAsPartial('home'));
dispatch(markAsPartial("home"));
}
handleDone = () => {
@@ -60,18 +60,18 @@ class FollowRecommendations extends ImmutablePureComponent {
const { router } = this.context;
dispatch(requestBrowserPermission((permission) => {
if (permission === 'granted') {
dispatch(changeSetting(['notifications', 'alerts', 'follow'], true));
dispatch(changeSetting(['notifications', 'alerts', 'favourite'], true));
dispatch(changeSetting(['notifications', 'alerts', 'reblog'], true));
dispatch(changeSetting(['notifications', 'alerts', 'mention'], true));
dispatch(changeSetting(['notifications', 'alerts', 'poll'], true));
dispatch(changeSetting(['notifications', 'alerts', 'status'], true));
if (permission === "granted") {
dispatch(changeSetting(["notifications", "alerts", "follow"], true));
dispatch(changeSetting(["notifications", "alerts", "favourite"], true));
dispatch(changeSetting(["notifications", "alerts", "reblog"], true));
dispatch(changeSetting(["notifications", "alerts", "mention"], true));
dispatch(changeSetting(["notifications", "alerts", "poll"], true));
dispatch(changeSetting(["notifications", "alerts", "status"], true));
dispatch(saveSettings());
}
}));
router.history.push('/home');
router.history.push("/home");
};
render () {
@@ -93,7 +93,7 @@ class FollowRecommendations extends ImmutablePureComponent {
<>
<div className='column-list'>
{suggestions.size > 0 ? suggestions.map(suggestion => (
<Account key={suggestion.get('account')} id={suggestion.get('account')} />
<Account key={suggestion.get("account")} id={suggestion.get("account")} />
)) : (
<div className='column-list__empty-message'>
<FormattedMessage id='empty_column.follow_recommendations' defaultMessage='Looks like no suggestions could be generated for you. You can try using search to look for people you might know or explore trending hashtags.' />