-
Notifications
You must be signed in to change notification settings - Fork 16
/
eslint.config.mjs
67 lines (66 loc) · 2.27 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
import js from "@eslint/js";
import globals from "globals";
import stylistic from "@stylistic/eslint-plugin";
export default [
{
ignores: ["*", "!assets"],
},
js.configs.recommended,
{
plugins: {
"@stylistic": stylistic,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.es2021
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"@stylistic/indent": ["error", 4],
"@stylistic/linebreak-style": ["error", "unix"],
"@stylistic/eol-last": ["error", "always"],
"@stylistic/arrow-parens": ["error", "always"],
"@stylistic/brace-style": ["error", "1tbs"],
"@stylistic/comma-dangle": ["error", "always-multiline"],
"@stylistic/comma-spacing": ["error"],
"@stylistic/keyword-spacing": ["error"],
"@stylistic/no-multiple-empty-lines": ["error", {
max: 2,
maxEOF: 0,
maxBOF: 0,
}],
"@stylistic/no-trailing-spaces": ["error"],
"@stylistic/no-multi-spaces": ["error"],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/quotes": ["error", "single", {
avoidEscape: true,
}],
"@stylistic/semi": ["error", "always"],
"@stylistic/space-before-blocks": ["error"],
"@stylistic/space-in-parens": ["error", "never"],
camelcase: ["error", {
ignoreImports: true,
}],
curly: ["error", "all"],
eqeqeq: ["error", "always"],
"no-console": ["off"],
"no-duplicate-imports": ["error"],
"no-empty": ["error", {
allowEmptyCatch: true,
}],
"no-empty-function": ["error", {
allow: ["arrowFunctions", "constructors"],
}],
"no-eval": ["error"],
"no-implicit-coercion": ["error"],
"no-implied-eval": ["error"],
"prefer-const": ["error"],
"sort-imports": ["error"],
yoda: ["error", "always"],
},
}
];