enforce path aliases with eslint

This commit is contained in:
Vendicated 2022-11-28 13:58:14 +01:00
parent bad96b7887
commit a0a1a4d139
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
12 changed files with 593 additions and 25 deletions

View file

@ -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",
{