[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:
@@ -1,191 +1,191 @@
|
||||
export function EmojiPicker () {
|
||||
return import(/* webpackChunkName: "emoji_picker" */'../../emoji/emoji_picker');
|
||||
return import(/* webpackChunkName: "emoji_picker" */"../../emoji/emoji_picker");
|
||||
}
|
||||
|
||||
export function Compose () {
|
||||
return import(/* webpackChunkName: "features/compose" */'../../compose');
|
||||
return import(/* webpackChunkName: "features/compose" */"../../compose");
|
||||
}
|
||||
|
||||
export function Notifications () {
|
||||
return import(/* webpackChunkName: "features/notifications" */'../../notifications');
|
||||
return import(/* webpackChunkName: "features/notifications" */"../../notifications");
|
||||
}
|
||||
|
||||
export function HomeTimeline () {
|
||||
return import(/* webpackChunkName: "features/home_timeline" */'../../home_timeline');
|
||||
return import(/* webpackChunkName: "features/home_timeline" */"../../home_timeline");
|
||||
}
|
||||
|
||||
export function PublicTimeline () {
|
||||
return import(/* webpackChunkName: "features/public_timeline" */'../../public_timeline');
|
||||
return import(/* webpackChunkName: "features/public_timeline" */"../../public_timeline");
|
||||
}
|
||||
|
||||
export function CommunityTimeline () {
|
||||
return import(/* webpackChunkName: "features/community_timeline" */'../../community_timeline');
|
||||
return import(/* webpackChunkName: "features/community_timeline" */"../../community_timeline");
|
||||
}
|
||||
|
||||
export function Firehose () {
|
||||
return import(/* webpackChunkName: "features/firehose" */'../../firehose');
|
||||
return import(/* webpackChunkName: "features/firehose" */"../../firehose");
|
||||
}
|
||||
|
||||
export function HashtagTimeline () {
|
||||
return import(/* webpackChunkName: "features/hashtag_timeline" */'../../hashtag_timeline');
|
||||
return import(/* webpackChunkName: "features/hashtag_timeline" */"../../hashtag_timeline");
|
||||
}
|
||||
|
||||
export function DirectTimeline() {
|
||||
return import(/* webpackChunkName: "features/direct_timeline" */'../../direct_timeline');
|
||||
return import(/* webpackChunkName: "features/direct_timeline" */"../../direct_timeline");
|
||||
}
|
||||
|
||||
export function ListTimeline () {
|
||||
return import(/* webpackChunkName: "features/list_timeline" */'../../list_timeline');
|
||||
return import(/* webpackChunkName: "features/list_timeline" */"../../list_timeline");
|
||||
}
|
||||
|
||||
export function Lists () {
|
||||
return import(/* webpackChunkName: "features/lists" */'../../lists');
|
||||
return import(/* webpackChunkName: "features/lists" */"../../lists");
|
||||
}
|
||||
|
||||
export function Status () {
|
||||
return import(/* webpackChunkName: "features/status" */'../../status');
|
||||
return import(/* webpackChunkName: "features/status" */"../../status");
|
||||
}
|
||||
|
||||
export function GettingStarted () {
|
||||
return import(/* webpackChunkName: "features/getting_started" */'../../getting_started');
|
||||
return import(/* webpackChunkName: "features/getting_started" */"../../getting_started");
|
||||
}
|
||||
|
||||
export function KeyboardShortcuts () {
|
||||
return import(/* webpackChunkName: "features/keyboard_shortcuts" */'../../keyboard_shortcuts');
|
||||
return import(/* webpackChunkName: "features/keyboard_shortcuts" */"../../keyboard_shortcuts");
|
||||
}
|
||||
|
||||
export function PinnedStatuses () {
|
||||
return import(/* webpackChunkName: "features/pinned_statuses" */'../../pinned_statuses');
|
||||
return import(/* webpackChunkName: "features/pinned_statuses" */"../../pinned_statuses");
|
||||
}
|
||||
|
||||
export function AccountTimeline () {
|
||||
return import(/* webpackChunkName: "features/account_timeline" */'../../account_timeline');
|
||||
return import(/* webpackChunkName: "features/account_timeline" */"../../account_timeline");
|
||||
}
|
||||
|
||||
export function AccountGallery () {
|
||||
return import(/* webpackChunkName: "features/account_gallery" */'../../account_gallery');
|
||||
return import(/* webpackChunkName: "features/account_gallery" */"../../account_gallery");
|
||||
}
|
||||
|
||||
export function Followers () {
|
||||
return import(/* webpackChunkName: "features/followers" */'../../followers');
|
||||
return import(/* webpackChunkName: "features/followers" */"../../followers");
|
||||
}
|
||||
|
||||
export function Following () {
|
||||
return import(/* webpackChunkName: "features/following" */'../../following');
|
||||
return import(/* webpackChunkName: "features/following" */"../../following");
|
||||
}
|
||||
|
||||
export function Reblogs () {
|
||||
return import(/* webpackChunkName: "features/reblogs" */'../../reblogs');
|
||||
return import(/* webpackChunkName: "features/reblogs" */"../../reblogs");
|
||||
}
|
||||
|
||||
export function Favourites () {
|
||||
return import(/* webpackChunkName: "features/favourites" */'../../favourites');
|
||||
return import(/* webpackChunkName: "features/favourites" */"../../favourites");
|
||||
}
|
||||
|
||||
export function FollowRequests () {
|
||||
return import(/* webpackChunkName: "features/follow_requests" */'../../follow_requests');
|
||||
return import(/* webpackChunkName: "features/follow_requests" */"../../follow_requests");
|
||||
}
|
||||
|
||||
export function FavouritedStatuses () {
|
||||
return import(/* webpackChunkName: "features/favourited_statuses" */'../../favourited_statuses');
|
||||
return import(/* webpackChunkName: "features/favourited_statuses" */"../../favourited_statuses");
|
||||
}
|
||||
|
||||
export function FollowedTags () {
|
||||
return import(/* webpackChunkName: "features/followed_tags" */'../../followed_tags');
|
||||
return import(/* webpackChunkName: "features/followed_tags" */"../../followed_tags");
|
||||
}
|
||||
|
||||
export function BookmarkedStatuses () {
|
||||
return import(/* webpackChunkName: "features/bookmarked_statuses" */'../../bookmarked_statuses');
|
||||
return import(/* webpackChunkName: "features/bookmarked_statuses" */"../../bookmarked_statuses");
|
||||
}
|
||||
|
||||
export function Blocks () {
|
||||
return import(/* webpackChunkName: "features/blocks" */'../../blocks');
|
||||
return import(/* webpackChunkName: "features/blocks" */"../../blocks");
|
||||
}
|
||||
|
||||
export function DomainBlocks () {
|
||||
return import(/* webpackChunkName: "features/domain_blocks" */'../../domain_blocks');
|
||||
return import(/* webpackChunkName: "features/domain_blocks" */"../../domain_blocks");
|
||||
}
|
||||
|
||||
export function Mutes () {
|
||||
return import(/* webpackChunkName: "features/mutes" */'../../mutes');
|
||||
return import(/* webpackChunkName: "features/mutes" */"../../mutes");
|
||||
}
|
||||
|
||||
export function MuteModal () {
|
||||
return import(/* webpackChunkName: "modals/mute_modal" */'../components/mute_modal');
|
||||
return import(/* webpackChunkName: "modals/mute_modal" */"../components/mute_modal");
|
||||
}
|
||||
|
||||
export function BlockModal () {
|
||||
return import(/* webpackChunkName: "modals/block_modal" */'../components/block_modal');
|
||||
return import(/* webpackChunkName: "modals/block_modal" */"../components/block_modal");
|
||||
}
|
||||
|
||||
export function ReportModal () {
|
||||
return import(/* webpackChunkName: "modals/report_modal" */'../components/report_modal');
|
||||
return import(/* webpackChunkName: "modals/report_modal" */"../components/report_modal");
|
||||
}
|
||||
|
||||
export function MediaGallery () {
|
||||
return import(/* webpackChunkName: "status/media_gallery" */'../../../components/media_gallery');
|
||||
return import(/* webpackChunkName: "status/media_gallery" */"../../../components/media_gallery");
|
||||
}
|
||||
|
||||
export function Video () {
|
||||
return import(/* webpackChunkName: "features/video" */'../../video');
|
||||
return import(/* webpackChunkName: "features/video" */"../../video");
|
||||
}
|
||||
|
||||
export function EmbedModal () {
|
||||
return import(/* webpackChunkName: "modals/embed_modal" */'../components/embed_modal');
|
||||
return import(/* webpackChunkName: "modals/embed_modal" */"../components/embed_modal");
|
||||
}
|
||||
|
||||
export function ListEditor () {
|
||||
return import(/* webpackChunkName: "features/list_editor" */'../../list_editor');
|
||||
return import(/* webpackChunkName: "features/list_editor" */"../../list_editor");
|
||||
}
|
||||
|
||||
export function ListAdder () {
|
||||
return import(/*webpackChunkName: "features/list_adder" */'../../list_adder');
|
||||
return import(/*webpackChunkName: "features/list_adder" */"../../list_adder");
|
||||
}
|
||||
|
||||
export function Tesseract () {
|
||||
return import(/*webpackChunkName: "tesseract" */'tesseract.js');
|
||||
return import(/*webpackChunkName: "tesseract" */"tesseract.js");
|
||||
}
|
||||
|
||||
export function Audio () {
|
||||
return import(/* webpackChunkName: "features/audio" */'../../audio');
|
||||
return import(/* webpackChunkName: "features/audio" */"../../audio");
|
||||
}
|
||||
|
||||
export function Directory () {
|
||||
return import(/* webpackChunkName: "features/directory" */'../../directory');
|
||||
return import(/* webpackChunkName: "features/directory" */"../../directory");
|
||||
}
|
||||
|
||||
export function Onboarding () {
|
||||
return import(/* webpackChunkName: "features/onboarding" */'../../onboarding');
|
||||
return import(/* webpackChunkName: "features/onboarding" */"../../onboarding");
|
||||
}
|
||||
|
||||
export function CompareHistoryModal () {
|
||||
return import(/*webpackChunkName: "modals/compare_history_modal" */'../components/compare_history_modal');
|
||||
return import(/*webpackChunkName: "modals/compare_history_modal" */"../components/compare_history_modal");
|
||||
}
|
||||
|
||||
export function Explore () {
|
||||
return import(/* webpackChunkName: "features/explore" */'../../explore');
|
||||
return import(/* webpackChunkName: "features/explore" */"../../explore");
|
||||
}
|
||||
|
||||
export function FilterModal () {
|
||||
return import(/*webpackChunkName: "modals/filter_modal" */'../components/filter_modal');
|
||||
return import(/*webpackChunkName: "modals/filter_modal" */"../components/filter_modal");
|
||||
}
|
||||
|
||||
export function InteractionModal () {
|
||||
return import(/*webpackChunkName: "modals/interaction_modal" */'../../interaction_modal');
|
||||
return import(/*webpackChunkName: "modals/interaction_modal" */"../../interaction_modal");
|
||||
}
|
||||
|
||||
export function SubscribedLanguagesModal () {
|
||||
return import(/*webpackChunkName: "modals/subscribed_languages_modal" */'../../subscribed_languages_modal');
|
||||
return import(/*webpackChunkName: "modals/subscribed_languages_modal" */"../../subscribed_languages_modal");
|
||||
}
|
||||
|
||||
export function ClosedRegistrationsModal () {
|
||||
return import(/*webpackChunkName: "modals/closed_registrations_modal" */'../../closed_registrations_modal');
|
||||
return import(/*webpackChunkName: "modals/closed_registrations_modal" */"../../closed_registrations_modal");
|
||||
}
|
||||
|
||||
export function About () {
|
||||
return import(/*webpackChunkName: "features/about" */'../../about');
|
||||
return import(/*webpackChunkName: "features/about" */"../../about");
|
||||
}
|
||||
|
||||
export function PrivacyPolicy () {
|
||||
return import(/*webpackChunkName: "features/privacy_policy" */'../../privacy_policy');
|
||||
return import(/*webpackChunkName: "features/privacy_policy" */"../../privacy_policy");
|
||||
}
|
||||
|
||||
@@ -26,21 +26,21 @@ export const requestFullscreen = el => {
|
||||
};
|
||||
|
||||
export const attachFullscreenListener = (listener) => {
|
||||
if ('onfullscreenchange' in document) {
|
||||
document.addEventListener('fullscreenchange', listener);
|
||||
} else if ('onwebkitfullscreenchange' in document) {
|
||||
document.addEventListener('webkitfullscreenchange', listener);
|
||||
} else if ('onmozfullscreenchange' in document) {
|
||||
document.addEventListener('mozfullscreenchange', listener);
|
||||
if ("onfullscreenchange" in document) {
|
||||
document.addEventListener("fullscreenchange", listener);
|
||||
} else if ("onwebkitfullscreenchange" in document) {
|
||||
document.addEventListener("webkitfullscreenchange", listener);
|
||||
} else if ("onmozfullscreenchange" in document) {
|
||||
document.addEventListener("mozfullscreenchange", listener);
|
||||
}
|
||||
};
|
||||
|
||||
export const detachFullscreenListener = (listener) => {
|
||||
if ('onfullscreenchange' in document) {
|
||||
document.removeEventListener('fullscreenchange', listener);
|
||||
} else if ('onwebkitfullscreenchange' in document) {
|
||||
document.removeEventListener('webkitfullscreenchange', listener);
|
||||
} else if ('onmozfullscreenchange' in document) {
|
||||
document.removeEventListener('mozfullscreenchange', listener);
|
||||
if ("onfullscreenchange" in document) {
|
||||
document.removeEventListener("fullscreenchange", listener);
|
||||
} else if ("onwebkitfullscreenchange" in document) {
|
||||
document.removeEventListener("webkitfullscreenchange", listener);
|
||||
} else if ("onmozfullscreenchange" in document) {
|
||||
document.removeEventListener("mozfullscreenchange", listener);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
let hasBoundingRectBug;
|
||||
|
||||
function getRectFromEntry(entry) {
|
||||
if (typeof hasBoundingRectBug !== 'boolean') {
|
||||
if (typeof hasBoundingRectBug !== "boolean") {
|
||||
const boundingRect = entry.target.getBoundingClientRect();
|
||||
const observerRect = entry.boundingClientRect;
|
||||
hasBoundingRectBug = boundingRect.height !== observerRect.height ||
|
||||
|
||||
@@ -14,7 +14,7 @@ class IntersectionObserverWrapper {
|
||||
connect (options) {
|
||||
const onIntersection = (entries) => {
|
||||
entries.forEach(entry => {
|
||||
const id = entry.target.getAttribute('data-id');
|
||||
const id = entry.target.getAttribute("data-id");
|
||||
if (this.callbacks[id]) {
|
||||
this.callbacks[id](entry);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import Motion from 'react-motion/lib/Motion';
|
||||
import Motion from "react-motion/lib/Motion";
|
||||
|
||||
import { reduceMotion } from '../../../initial_state';
|
||||
import { reduceMotion } from "../../../initial_state";
|
||||
|
||||
import ReducedMotion from './reduced_motion';
|
||||
import ReducedMotion from "./reduced_motion";
|
||||
|
||||
export default reduceMotion ? ReducedMotion : Motion;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import { Component, PureComponent, cloneElement, Children } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { Component, PureComponent, cloneElement, Children } from "react";
|
||||
|
||||
import { Switch, Route } from 'react-router-dom';
|
||||
import { Switch, Route } from "react-router-dom";
|
||||
|
||||
import StackTrace from 'stacktrace-js';
|
||||
import StackTrace from "stacktrace-js";
|
||||
|
||||
import BundleColumnError from '../components/bundle_column_error';
|
||||
import ColumnLoading from '../components/column_loading';
|
||||
import BundleContainer from '../containers/bundle_container';
|
||||
import BundleColumnError from "../components/bundle_column_error";
|
||||
import ColumnLoading from "../components/column_loading";
|
||||
import BundleContainer from "../containers/bundle_container";
|
||||
|
||||
// Small wrapper to pass multiColumn to the route components
|
||||
export class WrappedSwitch extends PureComponent {
|
||||
@@ -19,7 +19,7 @@ export class WrappedSwitch extends PureComponent {
|
||||
const { multiColumn, children } = this.props;
|
||||
const { location } = this.context.router.route;
|
||||
|
||||
const decklessLocation = multiColumn && location.pathname.startsWith('/deck')
|
||||
const decklessLocation = multiColumn && location.pathname.startsWith("/deck")
|
||||
? {...location, pathname: location.pathname.slice(5)}
|
||||
: location;
|
||||
|
||||
@@ -61,12 +61,12 @@ export class WrappedRoute extends Component {
|
||||
|
||||
state = {
|
||||
hasError: false,
|
||||
stacktrace: '',
|
||||
stacktrace: "",
|
||||
};
|
||||
|
||||
componentDidCatch (error) {
|
||||
StackTrace.fromError(error).then(stackframes => {
|
||||
this.setState({ stacktrace: error.toString() + '\n' + stackframes.map(frame => frame.toString()).join('\n') });
|
||||
this.setState({ stacktrace: error.toString() + "\n" + stackframes.map(frame => frame.toString()).join("\n") });
|
||||
}).catch(err => {
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// Like react-motion's Motion, but reduces all animations to cross-fades
|
||||
// for the benefit of users with motion sickness.
|
||||
import PropTypes from 'prop-types';
|
||||
import { Component } from 'react';
|
||||
import PropTypes from "prop-types";
|
||||
import { Component } from "react";
|
||||
|
||||
import Motion from 'react-motion/lib/Motion';
|
||||
import Motion from "react-motion/lib/Motion";
|
||||
|
||||
const stylesToKeep = ['opacity', 'backgroundOpacity'];
|
||||
const stylesToKeep = ["opacity", "backgroundOpacity"];
|
||||
|
||||
const extractValue = (value) => {
|
||||
// This is either an object with a "val" property or it's a number
|
||||
return (typeof value === 'object' && value && 'val' in value) ? value.val : value;
|
||||
return (typeof value === "object" && value && "val" in value) ? value.val : value;
|
||||
};
|
||||
|
||||
class ReducedMotion extends Component {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/API/Background_Tasks_API
|
||||
// for a good breakdown of the concepts behind this.
|
||||
|
||||
import Queue from 'tiny-queue';
|
||||
import Queue from "tiny-queue";
|
||||
|
||||
const taskQueue = new Queue();
|
||||
let runningRequestIdleCallback = false;
|
||||
|
||||
Reference in New Issue
Block a user