aboutsummaryrefslogtreecommitdiff
path: root/src/components
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/components
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/components')
-rw-r--r--src/components/ErrorBoundary.tsx2
-rw-r--r--src/components/Monaco.ts2
-rw-r--r--src/components/PatchHelper.tsx2
-rw-r--r--src/components/PluginSettings/PluginModal.tsx3
-rw-r--r--src/components/PluginSettings/index.tsx5
5 files changed, 8 insertions, 6 deletions
diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx
index aa1e889..4c2725d 100644
--- a/src/components/ErrorBoundary.tsx
+++ b/src/components/ErrorBoundary.tsx
@@ -16,8 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { LazyComponent } from "../utils";
import Logger from "../utils/logger";
+import { LazyComponent } from "../utils/misc";
import { Margins, React } from "../webpack/common";
import { ErrorCard } from "./ErrorCard";
diff --git a/src/components/Monaco.ts b/src/components/Monaco.ts
index f40db77..16eff85 100644
--- a/src/components/Monaco.ts
+++ b/src/components/Monaco.ts
@@ -18,8 +18,8 @@
import monacoHtml from "~fileContent/monacoWin.html";
-import { IpcEvents } from "../utils";
import { debounce } from "../utils/debounce";
+import IpcEvents from "../utils/IpcEvents";
import { Queue } from "../utils/Queue";
import { find } from "../webpack/webpack";
diff --git a/src/components/PatchHelper.tsx b/src/components/PatchHelper.tsx
index f32201a..82b804a 100644
--- a/src/components/PatchHelper.tsx
+++ b/src/components/PatchHelper.tsx
@@ -16,8 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { makeCodeblock } from "../utils";
import { debounce } from "../utils/debounce";
+import { makeCodeblock } from "../utils/misc";
import { Button, Clipboard, Forms, Margins, Parser, React, Switch, TextInput } from "../webpack/common";
import { search } from "../webpack/webpack";
import { CheckedTextInput } from "./CheckedTextInput";
diff --git a/src/components/PluginSettings/PluginModal.tsx b/src/components/PluginSettings/PluginModal.tsx
index 7dd609f..592b6cb 100644
--- a/src/components/PluginSettings/PluginModal.tsx
+++ b/src/components/PluginSettings/PluginModal.tsx
@@ -21,8 +21,9 @@ import { Constructor } from "type-fest";
import { generateId } from "../../api/Commands";
import { useSettings } from "../../api/settings";
-import { LazyComponent, lazyWebpack, proxyLazy } from "../../utils";
+import { LazyComponent, lazyWebpack } from "../../utils/misc";
import { ModalContent, ModalFooter, ModalHeader, ModalProps, ModalRoot, ModalSize } from "../../utils/modal";
+import { proxyLazy } from "../../utils/proxyLazy";
import { OptionType, Plugin } from "../../utils/types";
import { filters, findByCode } from "../../webpack";
import { Button, FluxDispatcher, Forms, React, Text, Tooltip, UserStore, UserUtils } from "../../webpack/common";
diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx
index 40f09d6..fef8c30 100644
--- a/src/components/PluginSettings/index.tsx
+++ b/src/components/PluginSettings/index.tsx
@@ -21,9 +21,10 @@ import Plugins from "~plugins";
import { showNotice } from "../../api/Notices";
import { Settings, useSettings } from "../../api/settings";
import { startDependenciesRecursive, startPlugin, stopPlugin } from "../../plugins";
-import { Logger, Modals } from "../../utils";
import { ChangeList } from "../../utils/ChangeList";
+import Logger from "../../utils/logger";
import { classes, LazyComponent, lazyWebpack } from "../../utils/misc";
+import { openModalLazy } from "../../utils/modal";
import { Plugin } from "../../utils/types";
import { filters, findByCode } from "../../webpack";
import { Alerts, Button, Forms, Margins, Parser, React, Select, Switch, Text, TextInput, Toasts, Tooltip } from "../../webpack/common";
@@ -88,7 +89,7 @@ function PluginCard({ plugin, disabled, onRestartNeeded, onMouseEnter, onMouseLe
}
function openModal() {
- Modals.openModalLazy(async () => {
+ openModalLazy(async () => {
return modalProps => {
return <PluginModal {...modalProps} plugin={plugin} onRestartNeeded={() => onRestartNeeded(plugin.name)} />;
};