-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy patheslint.config.mjs
71 lines (70 loc) · 2.19 KB
/
eslint.config.mjs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
import ESLint from "@eslint/js";
import Globals from "globals";
import Html from "eslint-plugin-html";
import Stylistic from '@stylistic/eslint-plugin';
import TsESLint from 'typescript-eslint';
export default [
ESLint.configs.recommended,
Stylistic.configs['disable-legacy'],
...TsESLint.configs.strictTypeChecked,
...TsESLint.configs.stylisticTypeChecked,
{
files: [
"**/*.html",
"**/*.ts"
],
languageOptions: {
ecmaVersion: 2023,
globals: {
...Globals.browser
},
parserOptions: {
project: true,
tsconfigDirName: import.meta.dirname,
}
},
plugins: {
Html,
Stylistic
},
rules: {
"curly": ["error", "multi-or-nest", "consistent"],
"eqeqeq": "error",
"guard-for-in": "error",
"no-undef": "off",
"no-unused-vars": "off",
"no-var": "error",
"operator-assignment": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"radix": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
}
],
"Stylistic/no-mixed-operators": [
"error",
{
"groups": [
["&", "|", "^", "~", "<<", ">>", ">>>", "==", "!=", "===", "!==", ">", ">=", "<", "<=", "&&", "||", "in", "instanceof"]
]
}
],
"Stylistic/nonblock-statement-body-position": ["error", "below"],
"Stylistic/quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"Stylistic/semi": "error",
"Stylistic/spaced-comment": ["error", "always", { "exceptions": ["*"] }]
}
}
];