2022-10-05 22:42:58 +00:00
|
|
|
{
|
|
|
|
"root": true,
|
|
|
|
"parser": "@typescript-eslint/parser",
|
2024-06-15 19:45:14 +00:00
|
|
|
"parserOptions": {
|
|
|
|
"project": true
|
|
|
|
},
|
2024-05-29 22:11:20 +00:00
|
|
|
"ignorePatterns": ["browser", "dist", "packages/discord-types", "packages/vencord-types"],
|
2022-11-07 22:34:14 +00:00
|
|
|
"plugins": [
|
|
|
|
"@typescript-eslint",
|
2023-08-10 00:17:49 +00:00
|
|
|
"simple-header",
|
2022-11-07 22:34:14 +00:00
|
|
|
"simple-import-sort",
|
2022-11-28 12:58:14 +00:00
|
|
|
"unused-imports",
|
|
|
|
"path-alias"
|
2022-11-07 22:34:14 +00:00
|
|
|
],
|
2022-11-28 12:58:14 +00:00
|
|
|
"settings": {
|
|
|
|
"import/resolver": {
|
|
|
|
"alias": {
|
|
|
|
"map": [
|
|
|
|
["@webpack", "./src/webpack"],
|
|
|
|
["@webpack/common", "./src/webpack/common"],
|
|
|
|
["@utils", "./src/utils"],
|
|
|
|
["@api", "./src/api"],
|
|
|
|
["@components", "./src/components"]
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-10-05 22:42:58 +00:00
|
|
|
"rules": {
|
2022-10-21 23:17:06 +00:00
|
|
|
// 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
|
|
|
|
// information
|
2023-08-10 00:17:49 +00:00
|
|
|
"simple-header/header": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"files": ["scripts/header-new.txt", "scripts/header-old.txt"],
|
|
|
|
"templates": { "author": [".*", "Vendicated and contributors"] }
|
|
|
|
}
|
2022-10-21 23:17:06 +00:00
|
|
|
],
|
2024-06-15 19:45:14 +00:00
|
|
|
"@typescript-eslint/array-type": "error",
|
|
|
|
"@typescript-eslint/await-thenable": "error",
|
|
|
|
"@typescript-eslint/ban-types": "error",
|
|
|
|
"@typescript-eslint/consistent-generic-constructors": "error",
|
|
|
|
"@typescript-eslint/consistent-type-assertions": ["error", {
|
|
|
|
"assertionStyle": "as",
|
|
|
|
"objectLiteralTypeAssertions": "allow-as-parameter"
|
|
|
|
}],
|
|
|
|
"@typescript-eslint/consistent-type-exports": ["error", {
|
|
|
|
"fixMixedExportsWithInlineTypeSpecifier": true
|
|
|
|
}],
|
|
|
|
"@typescript-eslint/consistent-type-imports": ["error", {
|
|
|
|
"disallowTypeAnnotations": false,
|
|
|
|
"fixStyle": "inline-type-imports"
|
|
|
|
}],
|
|
|
|
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
|
|
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
|
|
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
|
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
|
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
|
|
|
|
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
|
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
|
|
|
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
|
|
"@typescript-eslint/prefer-as-const": "error",
|
|
|
|
"@typescript-eslint/require-await": "error",
|
2022-10-20 17:21:21 +00:00
|
|
|
"quotes": ["error", "double", { "avoidEscape": true }],
|
2022-10-05 22:42:58 +00:00
|
|
|
"jsx-quotes": ["error", "prefer-double"],
|
|
|
|
"no-mixed-spaces-and-tabs": "error",
|
|
|
|
"indent": ["error", 4, { "SwitchCase": 1 }],
|
|
|
|
"arrow-parens": ["error", "as-needed"],
|
|
|
|
"eol-last": ["error", "always"],
|
2023-05-10 21:14:04 +00:00
|
|
|
"@typescript-eslint/func-call-spacing": ["error", "never"],
|
2022-10-05 22:42:58 +00:00
|
|
|
"no-multi-spaces": "error",
|
|
|
|
"no-trailing-spaces": "error",
|
|
|
|
"no-whitespace-before-property": "error",
|
|
|
|
"semi": ["error", "always"],
|
|
|
|
"semi-style": ["error", "last"],
|
|
|
|
"space-in-parens": ["error", "never"],
|
|
|
|
"block-spacing": ["error", "always"],
|
2022-10-08 18:36:57 +00:00
|
|
|
"object-curly-spacing": ["error", "always"],
|
|
|
|
"eqeqeq": ["error", "always", { "null": "ignore" }],
|
2022-10-20 17:21:21 +00:00
|
|
|
"spaced-comment": ["error", "always", { "markers": ["!"] }],
|
2022-10-08 18:36:57 +00:00
|
|
|
"yoda": "error",
|
2023-10-25 12:39:57 +00:00
|
|
|
"prefer-destructuring": ["error", {
|
|
|
|
"VariableDeclarator": { "array": false, "object": true },
|
|
|
|
"AssignmentExpression": { "array": false, "object": false }
|
|
|
|
}],
|
2022-10-08 18:36:57 +00:00
|
|
|
"operator-assignment": ["error", "always"],
|
|
|
|
"no-useless-computed-key": "error",
|
|
|
|
"no-unneeded-ternary": ["error", { "defaultAssignment": false }],
|
|
|
|
"no-invalid-regexp": "error",
|
|
|
|
"no-constant-condition": ["error", { "checkLoops": false }],
|
|
|
|
"no-duplicate-imports": "error",
|
|
|
|
"no-extra-semi": "error",
|
2022-10-20 09:58:20 +00:00
|
|
|
"dot-notation": "error",
|
2023-01-03 01:32:08 +00:00
|
|
|
"no-useless-escape": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
"extra": "i"
|
|
|
|
}
|
|
|
|
],
|
2022-10-20 09:58:20 +00:00
|
|
|
"no-fallthrough": "error",
|
|
|
|
"for-direction": "error",
|
|
|
|
"no-async-promise-executor": "error",
|
|
|
|
"no-cond-assign": "error",
|
|
|
|
"no-dupe-else-if": "error",
|
|
|
|
"no-duplicate-case": "error",
|
|
|
|
"no-irregular-whitespace": "error",
|
|
|
|
"no-loss-of-precision": "error",
|
|
|
|
"no-misleading-character-class": "error",
|
|
|
|
"no-prototype-builtins": "error",
|
|
|
|
"no-regex-spaces": "error",
|
2024-06-15 19:45:14 +00:00
|
|
|
"no-restricted-globals": ["error", "_", "Diff", "JSX", "React", "ReactDOM"],
|
|
|
|
"no-restricted-imports": ["error", {
|
|
|
|
"paths": [{
|
|
|
|
"name": "discord-types",
|
|
|
|
"message": "Use @vencord/discord-types instead."
|
|
|
|
}],
|
|
|
|
"patterns": [{
|
|
|
|
"group": ["discord-types/*"],
|
|
|
|
"message": "Use @vencord/discord-types instead."
|
|
|
|
}]
|
|
|
|
}],
|
|
|
|
"no-restricted-syntax": ["error", "[operator=void]"],
|
2022-10-20 09:58:20 +00:00
|
|
|
"no-shadow-restricted-names": "error",
|
|
|
|
"no-unexpected-multiline": "error",
|
|
|
|
"no-unsafe-optional-chaining": "error",
|
|
|
|
"no-useless-backreference": "error",
|
|
|
|
"use-isnan": "error",
|
|
|
|
"prefer-const": "error",
|
2022-10-22 16:18:41 +00:00
|
|
|
"prefer-spread": "error",
|
|
|
|
|
|
|
|
"simple-import-sort/imports": "error",
|
2022-10-23 21:23:52 +00:00
|
|
|
"simple-import-sort/exports": "error",
|
|
|
|
|
2022-11-07 22:34:14 +00:00
|
|
|
"unused-imports/no-unused-imports": "error",
|
|
|
|
|
2023-10-31 22:56:13 +00:00
|
|
|
"path-alias/no-relative": "error"
|
2022-10-05 22:42:58 +00:00
|
|
|
}
|
|
|
|
}
|