diff --git a/eslint.config.mjs b/eslint.config.mjs index 54f53f74..63345290 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -7,7 +7,6 @@ // @ts-check import stylistic from "@stylistic/eslint-plugin"; -import pathAlias from "eslint-plugin-path-alias"; import header from "eslint-plugin-simple-header"; import simpleImportSort from "eslint-plugin-simple-import-sort"; import unusedImports from "eslint-plugin-unused-imports"; @@ -23,7 +22,6 @@ export default tseslint.config( "@typescript-eslint": tseslint.plugin, "simple-import-sort": simpleImportSort, "unused-imports": unusedImports, - "path-alias": pathAlias, }, settings: { "import/resolver": { @@ -120,7 +118,6 @@ export default tseslint.config( "simple-import-sort/imports": "error", "simple-import-sort/exports": "error", "unused-imports/no-unused-imports": "error", - "path-alias/no-relative": "error" } } ); diff --git a/scripts/build/common.mts b/scripts/build/common.mts index c2321fcf..75873903 100644 --- a/scripts/build/common.mts +++ b/scripts/build/common.mts @@ -20,7 +20,7 @@ import "../suppressExperimentalWarnings.js"; import "../checkNodeVersion.js"; import { exec, execSync } from "child_process"; -import esbuild, { build, BuildOptions, context, Plugin } from "esbuild"; +import esbuild, { build, BuildOptions, Plugin } from "esbuild"; import { constants as FsConstants, readFileSync } from "fs"; import { access, readdir, readFile } from "fs/promises"; import { minify as minifyHtml } from "html-minifier-terser"; diff --git a/src/equicordplugins/betterActivities/components/ActivityTooltip.tsx b/src/equicordplugins/betterActivities/components/ActivityTooltip.tsx index c7a1b195..a6b77a90 100644 --- a/src/equicordplugins/betterActivities/components/ActivityTooltip.tsx +++ b/src/equicordplugins/betterActivities/components/ActivityTooltip.tsx @@ -4,7 +4,6 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -import { classNameFactory } from "@api/Styles"; import ErrorBoundary from "@components/ErrorBoundary"; import { findComponentByCodeLazy } from "@webpack"; import { moment, React, useMemo } from "@webpack/common"; diff --git a/src/equicordplugins/discordColorways/components/Selector.tsx b/src/equicordplugins/discordColorways/components/Selector.tsx index 5dde6a72..29cf6ff9 100644 --- a/src/equicordplugins/discordColorways/components/Selector.tsx +++ b/src/equicordplugins/discordColorways/components/Selector.tsx @@ -4,8 +4,6 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -/* eslint-disable arrow-parens */ - import * as DataStore from "@api/DataStore"; import { Flex } from "@components/Flex"; import { DeleteIcon, PlusIcon } from "@components/Icons"; @@ -107,12 +105,12 @@ export default function ({ id: "all", sources: [...colorwayData, ...customColorwayData] }, - ...colorwayData.map((source) => ({ + ...colorwayData.map(source => ({ name: source.source, id: source.source.toLowerCase().replaceAll(" ", "-"), sources: [source] })), - ...customColorwayData.map((source) => ({ + ...customColorwayData.map(source => ({ name: source.source, id: source.source.toLowerCase().replaceAll(" ", "-"), sources: [source] @@ -147,7 +145,7 @@ export default function ({ const onlineSources: { name: string, url: string; }[] = await DataStore.get("colorwaySourceFiles") as { name: string, url: string; }[]; const responses: Response[] = await Promise.all( - onlineSources.map((source) => + onlineSources.map(source => fetch(source.url, force ? { cache: "no-store" } : {}) ) ); @@ -309,7 +307,7 @@ export default function ({ style={{ marginLeft: "8px" }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} - onClick={() => openModal((props) => openModal(props => )} @@ -350,7 +348,7 @@ export default function ({ id="colorway-opencolorstealer" onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave} - onClick={() => openModal((props) => )} + onClick={() => openModal(props => )} > } @@ -469,7 +467,7 @@ export default function ({ {(showLabelsInSelectorGridView || viewMode === "list") && Auto}
{ + onClick={async e => { e.stopPropagation(); const activeAutoPreset = await DataStore.get("activeAutoPreset"); openModal((props: ModalProps) => { @@ -591,7 +589,7 @@ export default function ({ {activeColorwayObject.id === color.name && activeColorwayObject.source === color.source && } }
- {!color.isGradient ? colors.map((colorItm) =>
{color.name}} {settings.selectorType === "normal" &&
{ + onClick={e => { e.stopPropagation(); - openModal((props) => } }
- {!color.isGradient ? colors.map((colorItm) =>
{ } let overriden = false; for (const key in obj) { - // eslint-disable-next-line no-prototype-builtins + if (obj.hasOwnProperty(key) && key === propertyName) { obj[key] = overrideValue; overriden = true; - // eslint-disable-next-line no-prototype-builtins + } else if (obj.hasOwnProperty(key) && typeof obj[key] === "object") { if (overrideObject(obj[key], propertyName, overrideValue)) { overriden = true; diff --git a/src/webpack/common/internal.tsx b/src/webpack/common/internal.tsx index 1db4ce58..db4d2215 100644 --- a/src/webpack/common/internal.tsx +++ b/src/webpack/common/internal.tsx @@ -17,8 +17,7 @@ */ import { LazyComponent } from "@utils/react"; - -import { FilterFn, filters, lazyWebpackSearchHistory, waitFor } from "../webpack"; +import { FilterFn, filters, lazyWebpackSearchHistory, waitFor } from "@webpack"; export function waitForComponent = React.ComponentType & Record>(name: string, filter: FilterFn | string | string[]): T { if (IS_REPORTER) lazyWebpackSearchHistory.push(["waitForComponent", Array.isArray(filter) ? filter : [filter]]); diff --git a/src/webpack/common/menu.ts b/src/webpack/common/menu.ts index 6abad3da..e2e5eadb 100644 --- a/src/webpack/common/menu.ts +++ b/src/webpack/common/menu.ts @@ -16,7 +16,8 @@ * along with this program. If not, see . */ -import { filters, mapMangledModuleLazy, waitFor } from "../webpack"; +import { filters, mapMangledModuleLazy, waitFor } from "@webpack"; + import type * as t from "./types/menu"; export let Menu = {} as t.Menu; diff --git a/src/webpack/common/react.ts b/src/webpack/common/react.ts index dec9d799..a98374b3 100644 --- a/src/webpack/common/react.ts +++ b/src/webpack/common/react.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import { findByPropsLazy, waitFor } from "../webpack"; +import { findByPropsLazy, waitFor } from "@webpack"; export let React: typeof import("react"); export let useState: typeof React.useState; diff --git a/src/webpack/common/stores.ts b/src/webpack/common/stores.ts index 29106244..562dd953 100644 --- a/src/webpack/common/stores.ts +++ b/src/webpack/common/stores.ts @@ -16,9 +16,9 @@ * along with this program. If not, see . */ +import { findByCodeLazy, findByPropsLazy } from "@webpack"; import type * as Stores from "discord-types/stores"; -import { findByCodeLazy, findByPropsLazy } from "../webpack"; import { waitForStore } from "./internal"; import * as t from "./types/stores"; diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 763721c7..ad4097c3 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -17,9 +17,9 @@ */ import { canonicalizeMatch } from "@utils/patches"; +import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "@webpack"; import type { Channel } from "discord-types/general"; -import { _resolveReady, filters, findByCodeLazy, findByPropsLazy, findLazy, mapMangledModuleLazy, waitFor } from "../webpack"; import type * as t from "./types/utils"; export let FluxDispatcher: t.FluxDispatcher; diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index f32aeb78..682cf57d 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +import { patches } from "@plugins"; import { WEBPACK_CHUNK } from "@utils/constants"; import { Logger } from "@utils/Logger"; import { canonicalizeReplacement } from "@utils/patches"; @@ -23,7 +24,6 @@ import { PatchReplacement } from "@utils/types"; import { WebpackInstance } from "discord-types/other"; import { traceFunction } from "../debug/Tracer"; -import { patches } from "../plugins"; import { _initWebpack, beforeInitListeners, factoryListeners, moduleListeners, subscriptions, wreq } from "."; const logger = new Logger("WebpackInterceptor", "#8caaee");