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 /.eslintrc.json | |
parent | bad96b78879f296d5b9e7adacb03756b0f58427a (diff) | |
download | Vencord-a0a1a4d139b6408419cd564611c26bd0dbade145.tar.gz Vencord-a0a1a4d139b6408419cd564611c26bd0dbade145.tar.bz2 Vencord-a0a1a4d139b6408419cd564611c26bd0dbade145.zip |
enforce path aliases with eslint
Diffstat (limited to '.eslintrc.json')
-rw-r--r-- | .eslintrc.json | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/.eslintrc.json b/.eslintrc.json index 111648c..0eb6689 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,8 +6,22 @@ "@typescript-eslint", "header", "simple-import-sort", - "unused-imports" + "unused-imports", + "path-alias" ], + "settings": { + "import/resolver": { + "alias": { + "map": [ + ["@webpack", "./src/webpack"], + ["@webpack/common", "./src/webpack/common"], + ["@utils", "./src/utils"], + ["@api", "./src/api"], + ["@components", "./src/components"] + ] + } + } + }, "rules": { // Since it's only been a month and Vencord has already been stolen // by random skids who rebranded it to "AlphaCord" and erased all license @@ -95,6 +109,8 @@ "unused-imports/no-unused-imports": "error", + "path-alias/no-relative": "error", + "@typescript-eslint/no-restricted-imports": [ "error", { |