diff options
author | Vendicated <vendicated@riseup.net> | 2022-11-28 13:58:14 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-11-28 13:59:53 +0100 |
commit | a0a1a4d139b6408419cd564611c26bd0dbade145 (patch) | |
tree | fec1171f5208c500843412cdcc87dcd9da9de538 /src | |
parent | bad96b78879f296d5b9e7adacb03756b0f58427a (diff) | |
download | Vencord-a0a1a4d139b6408419cd564611c26bd0dbade145.tar.gz Vencord-a0a1a4d139b6408419cd564611c26bd0dbade145.tar.bz2 Vencord-a0a1a4d139b6408419cd564611c26bd0dbade145.zip |
enforce path aliases with eslint
Diffstat (limited to 'src')
-rw-r--r-- | src/components/PluginSettings/PluginModal.tsx | 4 | ||||
-rw-r--r-- | src/components/PluginSettings/index.tsx | 8 | ||||
-rw-r--r-- | src/components/VencordSettings/BackupRestoreTab.tsx | 5 | ||||
-rw-r--r-- | src/components/VencordSettings/PluginsTab.tsx | 4 | ||||
-rw-r--r-- | src/components/VencordSettings/Updater.tsx | 11 | ||||
-rw-r--r-- | src/components/VencordSettings/VencordTab.tsx | 5 | ||||
-rw-r--r-- | src/components/VencordSettings/index.tsx | 2 | ||||
-rw-r--r-- | src/webpack/common.tsx | 6 |
8 files changed, 22 insertions, 23 deletions
diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx index 275d370..d191667 100644 --- a/src/components/PluginSettings/PluginModal.tsx +++ b/src/components/PluginSettings/PluginModal.tsx @@ -18,6 +18,8 @@ import { generateId } from "@api/Commands"; import { useSettings } from "@api/settings"; +import ErrorBoundary from "@components/ErrorBoundary"; +import { Flex } from "@components/Flex"; import { LazyComponent } from "@utils/misc"; import { ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize } from "@utils/modal"; import { proxyLazy } from "@utils/proxyLazy"; @@ -27,8 +29,6 @@ import { Button, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUti import { User } from "discord-types/general"; import { Constructor } from "type-fest"; -import ErrorBoundary from "../ErrorBoundary"; -import { Flex } from "../Flex"; import { ISettingElementProps, SettingBooleanComponent, diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index 495a509..5ee9cc9 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -18,6 +18,10 @@ import { showNotice } from "@api/Notices"; import { Settings, useSettings } from "@api/settings"; +import ErrorBoundary from "@components/ErrorBoundary"; +import { ErrorCard } from "@components/ErrorCard"; +import { Flex } from "@components/Flex"; +import { handleComponentFailed } from "@components/handleComponentFailed"; import { ChangeList } from "@utils/ChangeList"; import Logger from "@utils/Logger"; import { classes, LazyComponent } from "@utils/misc"; @@ -29,10 +33,6 @@ import { Alerts, Button, Forms, Margins, Parser, React, Select, Switch, Text, Te import Plugins from "~plugins"; import { startDependenciesRecursive, startPlugin, stopPlugin } from "../../plugins"; -import ErrorBoundary from "../ErrorBoundary"; -import { ErrorCard } from "../ErrorCard"; -import { Flex } from "../Flex"; -import { handleComponentFailed } from "../handleComponentFailed"; import PluginModal from "./PluginModal"; import * as styles from "./styles"; diff --git a/src/components/VencordSettings/BackupRestoreTab.tsx b/src/components/VencordSettings/BackupRestoreTab.tsx index 73a1309..f0730b3 100644 --- a/src/components/VencordSettings/BackupRestoreTab.tsx +++ b/src/components/VencordSettings/BackupRestoreTab.tsx @@ -16,12 +16,11 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import ErrorBoundary from "@components/ErrorBoundary"; +import { Flex } from "@components/Flex"; import { downloadSettingsBackup, uploadSettingsBackup } from "@utils/settingsSync"; import { Button, Card, Forms, Margins, Text } from "@webpack/common"; -import ErrorBoundary from "../ErrorBoundary"; -import { Flex } from "../Flex"; - function BackupRestoreTab() { return ( <Forms.FormSection title="Settings Sync"> diff --git a/src/components/VencordSettings/PluginsTab.tsx b/src/components/VencordSettings/PluginsTab.tsx index 0c89686..04b5dc2 100644 --- a/src/components/VencordSettings/PluginsTab.tsx +++ b/src/components/VencordSettings/PluginsTab.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import ErrorBoundary from "../ErrorBoundary"; -import PluginSettings from "../PluginSettings"; +import ErrorBoundary from "@components/ErrorBoundary"; +import PluginSettings from "@components/PluginSettings"; export default ErrorBoundary.wrap(PluginSettings); diff --git a/src/components/VencordSettings/Updater.tsx b/src/components/VencordSettings/Updater.tsx index 7abfad9..bb344f5 100644 --- a/src/components/VencordSettings/Updater.tsx +++ b/src/components/VencordSettings/Updater.tsx @@ -16,18 +16,17 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import ErrorBoundary from "@components/ErrorBoundary"; +import { ErrorCard } from "@components/ErrorCard"; +import { Flex } from "@components/Flex"; +import { handleComponentFailed } from "@components/handleComponentFailed"; +import { Link } from "@components/Link"; import { classes, useAwaiter } from "@utils/misc"; import { changes, checkForUpdates, getRepo, isNewer, rebuild, update, updateError, UpdateLogger } from "@utils/updater"; import { Alerts, Button, Card, Forms, Margins, Parser, React, Toasts } from "@webpack/common"; import gitHash from "~git-hash"; -import ErrorBoundary from "../ErrorBoundary"; -import { ErrorCard } from "../ErrorCard"; -import { Flex } from "../Flex"; -import { handleComponentFailed } from "../handleComponentFailed"; -import { Link } from "../Link"; - function withDispatcher(dispatcher: React.Dispatch<React.SetStateAction<boolean>>, action: () => any) { return async () => { dispatcher(true); diff --git a/src/components/VencordSettings/VencordTab.tsx b/src/components/VencordSettings/VencordTab.tsx index 3a3f45f..04fb057 100644 --- a/src/components/VencordSettings/VencordTab.tsx +++ b/src/components/VencordSettings/VencordTab.tsx @@ -18,13 +18,12 @@ import { useSettings } from "@api/settings"; +import DonateButton from "@components/DonateButton"; +import ErrorBoundary from "@components/ErrorBoundary"; import IpcEvents from "@utils/IpcEvents"; import { useAwaiter } from "@utils/misc"; import { Button, Card, Forms, React, Switch } from "@webpack/common"; -import DonateButton from "../DonateButton"; -import ErrorBoundary from "../ErrorBoundary"; - const st = (style: string) => `vcSettings${style}`; function VencordSettings() { diff --git a/src/components/VencordSettings/index.tsx b/src/components/VencordSettings/index.tsx index 4b6fb4e..37dab8f 100644 --- a/src/components/VencordSettings/index.tsx +++ b/src/components/VencordSettings/index.tsx @@ -16,12 +16,12 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import ErrorBoundary from "@components/ErrorBoundary"; import { findByCodeLazy } from "@webpack"; import { Forms, Router, Text } from "@webpack/common"; import cssText from "~fileContent/settingsStyles.css"; -import ErrorBoundary from "../ErrorBoundary"; import BackupRestoreTab from "./BackupRestoreTab"; import PluginsTab from "./PluginsTab"; import Updater from "./Updater"; diff --git a/src/webpack/common.tsx b/src/webpack/common.tsx index e606f16..bd6a69a 100644 --- a/src/webpack/common.tsx +++ b/src/webpack/common.tsx @@ -18,13 +18,15 @@ import { LazyComponent } from "@utils/misc"; import { proxyLazy } from "@utils/proxyLazy"; +import { + _resolveReady, + filters, findByCode, findByCodeLazy, findByPropsLazy, mapMangledModule, mapMangledModuleLazy, waitFor +} from "@webpack"; import type Components from "discord-types/components"; import { User } from "discord-types/general"; import type Other from "discord-types/other"; import type Stores from "discord-types/stores"; -import { _resolveReady, filters, findByCode, findByCodeLazy, findByPropsLazy, mapMangledModule, mapMangledModuleLazy, waitFor } from "./webpack"; - export const Margins = findByPropsLazy("marginTop20"); export let FluxDispatcher: Other.FluxDispatcher; |