aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-11-07 23:34:14 +0100
committerVendicated <vendicated@riseup.net>2022-11-07 23:34:14 +0100
commitf7d9be91407582fd85a70eef89c03a32e37c3c0f (patch)
tree6522f99d70491aa7f495c287a53fc02c736517ac /src/plugins
parent955573d31bd1be435b95ddcc24971b47daf02c0b (diff)
downloadVencord-f7d9be91407582fd85a70eef89c03a32e37c3c0f.tar.gz
Vencord-f7d9be91407582fd85a70eef89c03a32e37c3c0f.tar.bz2
Vencord-f7d9be91407582fd85a70eef89c03a32e37c3c0f.zip
lint: Disallow utils index imports
This keeps leading to issues due to circular imports. Import from specific files instead, index just reexports
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/experiments.tsx2
-rw-r--r--src/plugins/ignoreActivities.ts2
-rw-r--r--src/plugins/messageActions.ts2
-rw-r--r--src/plugins/nitroBypass.ts2
-rw-r--r--src/plugins/petpet.ts2
-rw-r--r--src/plugins/pronoundb/components/PronounsChatComponent.tsx2
-rw-r--r--src/plugins/pronoundb/components/PronounsProfileWrapper.tsx4
-rw-r--r--src/plugins/pronoundb/pronoundbUtils.ts (renamed from src/plugins/pronoundb/utils.ts)0
-rw-r--r--src/plugins/sendify.ts2
-rw-r--r--src/plugins/spotifyControls/PlayerComponent.tsx3
-rw-r--r--src/plugins/spotifyControls/SpotifyStore.ts4
-rw-r--r--src/plugins/startupTimings/StartupTimingPage.tsx4
-rw-r--r--src/plugins/startupTimings/index.tsx2
13 files changed, 17 insertions, 14 deletions
diff --git a/src/plugins/experiments.tsx b/src/plugins/experiments.tsx
index b9df6f9..861bb05 100644
--- a/src/plugins/experiments.tsx
+++ b/src/plugins/experiments.tsx
@@ -16,8 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { lazyWebpack } from "../utils";
import { Devs } from "../utils/constants";
+import { lazyWebpack } from "../utils/misc";
import definePlugin, { OptionType } from "../utils/types";
import { Settings } from "../Vencord";
import { filters } from "../webpack";
diff --git a/src/plugins/ignoreActivities.ts b/src/plugins/ignoreActivities.ts
index 5c1ddcc..2084277 100644
--- a/src/plugins/ignoreActivities.ts
+++ b/src/plugins/ignoreActivities.ts
@@ -17,8 +17,8 @@
*/
import { DataStore } from "../api";
-import { lazyWebpack } from "../utils";
import { Devs } from "../utils/constants";
+import { lazyWebpack } from "../utils/misc";
import definePlugin from "../utils/types";
import { filters } from "../webpack";
diff --git a/src/plugins/messageActions.ts b/src/plugins/messageActions.ts
index 98c920e..bb2ad17 100644
--- a/src/plugins/messageActions.ts
+++ b/src/plugins/messageActions.ts
@@ -17,8 +17,8 @@
*/
import { addClickListener, removeClickListener } from "../api/MessageEvents";
-import { lazyWebpack } from "../utils";
import { Devs } from "../utils/constants";
+import { lazyWebpack } from "../utils/misc";
import definePlugin from "../utils/types";
import { filters } from "../webpack";
import { UserStore } from "../webpack/common";
diff --git a/src/plugins/nitroBypass.ts b/src/plugins/nitroBypass.ts
index f4bdc84..d2e1e10 100644
--- a/src/plugins/nitroBypass.ts
+++ b/src/plugins/nitroBypass.ts
@@ -17,9 +17,9 @@
*/
import { addPreEditListener, addPreSendListener, removePreEditListener, removePreSendListener } from "../api/MessageEvents";
-import { lazyWebpack } from "../utils";
import { Devs } from "../utils/constants";
import { ApngDisposeOp, getGifEncoder, importApngJs } from "../utils/dependencies";
+import { lazyWebpack } from "../utils/misc";
import definePlugin, { OptionType } from "../utils/types";
import { Settings } from "../Vencord";
import { filters } from "../webpack";
diff --git a/src/plugins/petpet.ts b/src/plugins/petpet.ts
index 961d47a..59b4e56 100644
--- a/src/plugins/petpet.ts
+++ b/src/plugins/petpet.ts
@@ -17,9 +17,9 @@
*/
import { ApplicationCommandInputType, ApplicationCommandOptionType, Argument, CommandContext, findOption } from "../api/Commands";
-import { lazyWebpack, makeLazy } from "../utils";
import { Devs } from "../utils/constants";
import { getGifEncoder } from "../utils/dependencies";
+import { lazyWebpack, makeLazy } from "../utils/misc";
import definePlugin from "../utils/types";
import { filters } from "../webpack";
diff --git a/src/plugins/pronoundb/components/PronounsChatComponent.tsx b/src/plugins/pronoundb/components/PronounsChatComponent.tsx
index 2d20461..78cee48 100644
--- a/src/plugins/pronoundb/components/PronounsChatComponent.tsx
+++ b/src/plugins/pronoundb/components/PronounsChatComponent.tsx
@@ -22,8 +22,8 @@ import { classes, lazyWebpack, useAwaiter } from "../../../utils/misc";
import { Settings } from "../../../Vencord";
import { filters } from "../../../webpack";
import { UserStore } from "../../../webpack/common";
+import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
import { PronounMapping } from "../types";
-import { fetchPronouns, formatPronouns } from "../utils";
const styles: Record<string, string> = lazyWebpack(filters.byProps("timestampInline"));
diff --git a/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx b/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx
index 3f0022e..4d12dd5 100644
--- a/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx
+++ b/src/plugins/pronoundb/components/PronounsProfileWrapper.tsx
@@ -16,11 +16,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { useAwaiter } from "../../../utils";
+import { useAwaiter } from "../../../utils/misc";
import { Settings } from "../../../Vencord";
import { UserStore } from "../../../webpack/common";
+import { fetchPronouns, formatPronouns } from "../pronoundbUtils";
import { PronounMapping, UserProfileProps } from "../types";
-import { fetchPronouns, formatPronouns } from "../utils";
export default function PronounsProfileWrapper(props: UserProfileProps, pronounsComponent: JSX.Element) {
// Don't bother fetching bot or system users
diff --git a/src/plugins/pronoundb/utils.ts b/src/plugins/pronoundb/pronoundbUtils.ts
index 73ec7b6..73ec7b6 100644
--- a/src/plugins/pronoundb/utils.ts
+++ b/src/plugins/pronoundb/pronoundbUtils.ts
diff --git a/src/plugins/sendify.ts b/src/plugins/sendify.ts
index 40836ad..b0fd52d 100644
--- a/src/plugins/sendify.ts
+++ b/src/plugins/sendify.ts
@@ -17,8 +17,8 @@
*/
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
-import { lazyWebpack } from "../utils";
import { Devs } from "../utils/constants";
+import { lazyWebpack } from "../utils/misc";
import definePlugin from "../utils/types";
import { filters } from "../webpack";
import { FluxDispatcher } from "../webpack/common";
diff --git a/src/plugins/spotifyControls/PlayerComponent.tsx b/src/plugins/spotifyControls/PlayerComponent.tsx
index 0e03121..15a7ef9 100644
--- a/src/plugins/spotifyControls/PlayerComponent.tsx
+++ b/src/plugins/spotifyControls/PlayerComponent.tsx
@@ -18,7 +18,8 @@
import ErrorBoundary from "../../components/ErrorBoundary";
import { Flex } from "../../components/Flex";
-import { classes, debounce, LazyComponent, lazyWebpack } from "../../utils";
+import { debounce } from "../../utils/debounce";
+import { classes, LazyComponent, lazyWebpack } from "../../utils/misc";
import { ContextMenu, FluxDispatcher, Forms, Menu, React, Tooltip } from "../../webpack/common";
import { filters, find } from "../../webpack/webpack";
import { SpotifyStore, Track } from "./SpotifyStore";
diff --git a/src/plugins/spotifyControls/SpotifyStore.ts b/src/plugins/spotifyControls/SpotifyStore.ts
index d7d52bc..0dad503 100644
--- a/src/plugins/spotifyControls/SpotifyStore.ts
+++ b/src/plugins/spotifyControls/SpotifyStore.ts
@@ -18,7 +18,9 @@
import cssText from "~fileContent/styles.css";
-import { IpcEvents, lazyWebpack, proxyLazy } from "../../utils";
+import IpcEvents from "../../utils/IpcEvents";
+import { lazyWebpack } from "../../utils/misc";
+import { proxyLazy } from "../../utils/proxyLazy";
import { filters } from "../../webpack";
import { Flux, FluxDispatcher } from "../../webpack/common";
diff --git a/src/plugins/startupTimings/StartupTimingPage.tsx b/src/plugins/startupTimings/StartupTimingPage.tsx
index f864138..7d8e86b 100644
--- a/src/plugins/startupTimings/StartupTimingPage.tsx
+++ b/src/plugins/startupTimings/StartupTimingPage.tsx
@@ -18,9 +18,9 @@
import ErrorBoundary from "../../components/ErrorBoundary";
import { Flex } from "../../components/Flex";
-import { lazyWebpack } from "../../utils";
-import { filters } from "../../webpack";
+import { lazyWebpack } from "../../utils/misc";
import { Forms, React } from "../../webpack/common";
+import { filters } from "../../webpack/webpack";
interface AppStartPerformance {
prefix: string;
diff --git a/src/plugins/startupTimings/index.tsx b/src/plugins/startupTimings/index.tsx
index 3f121f7..d5493c1 100644
--- a/src/plugins/startupTimings/index.tsx
+++ b/src/plugins/startupTimings/index.tsx
@@ -17,8 +17,8 @@
*/
-import { LazyComponent } from "../../utils";
import { Devs } from "../../utils/constants";
+import { LazyComponent } from "../../utils/misc";
import definePlugin from "../../utils/types";
export default definePlugin({