-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patheslint.config.js
58 lines (57 loc) · 1.59 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import prettier from "eslint-config-prettier";
import ts from "typescript-eslint";
import globals from "globals";
export default [
...ts.configs.recommended,
prettier,
{
ignores: ["**/node_modules/**", "**/*.js"],
},
{
files: ["**/*.ts"],
languageOptions: {
globals: {
...globals.browser,
...globals.nodeBuiltin,
},
},
rules: {
curly: "warn",
"default-case-last": "warn",
eqeqeq: "error",
"no-array-constructor": "error",
"no-console": "warn",
"no-else-return": "warn",
"no-multi-assign": "error",
"no-nested-ternary": "error",
"no-param-reassign": "error",
"no-return-assign": "warn",
"no-sequences": "error",
"no-template-curly-in-string": "warn",
"no-throw-literal": "error",
"no-undef-init": "warn",
"no-unneeded-ternary": "warn",
"no-unused-private-class-members": "warn",
"no-useless-rename": "warn",
"no-var": "error",
"prefer-const": "off", // Messes with $props runes
"prefer-promise-reject-errors": "warn",
"prefer-template": "warn",
radix: "warn",
"require-yield": "warn",
"spaced-comment": "warn",
yoda: ["error", "never", { exceptRange: true }],
"one-var": ["error", "never"],
"@typescript-eslint/no-empty-object-type": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
},
},
];