-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
85 lines (84 loc) · 3.52 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import eslint from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
import globals from "globals";
export default [
eslint.configs.recommended,
{
languageOptions: {
parserOptions: {
project: true,
},
globals: {
...globals.browser,
},
},
plugins: {
"@stylistic": stylistic,
},
rules: {
"@stylistic/array-bracket-spacing": ["error", "never"],
"@stylistic/arrow-spacing": "error",
"@stylistic/block-spacing": "error",
"@stylistic/brace-style": "error",
"@stylistic/comma-dangle": ["error", "always-multiline"],
"@stylistic/comma-spacing": "error",
"@stylistic/eol-last": ["error", "always"],
"@stylistic/func-call-spacing": ["error", "never"],
"@stylistic/indent": ["error", 4],
"@stylistic/key-spacing": "error",
"@stylistic/keyword-spacing": "error",
"@stylistic/no-extra-semi": "error",
"@stylistic/no-floating-decimal": "error",
"@stylistic/no-mixed-operators": "error",
"@stylistic/no-mixed-spaces-and-tabs": "error",
"@stylistic/no-multi-spaces": "error",
"@stylistic/no-multiple-empty-lines": ["error", { max: 1, maxEOF: 1 }],
"@stylistic/no-trailing-spaces": "error",
"@stylistic/no-whitespace-before-property": "error",
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/quotes": ["error", "double"],
"@stylistic/semi": ["error", "always"],
"@stylistic/semi-spacing": "error",
"@stylistic/semi-style": ["error", "last"],
"@stylistic/space-in-parens": ["error", "never"],
"@stylistic/type-annotation-spacing": "error",
"array-callback-return": "error",
"block-scoped-var": "error",
"curly": "error",
"eqeqeq": "error",
"func-style": ["error", "expression", { allowArrowFunctions: true }],
"no-alert": "warn",
"no-await-in-loop": "warn",
"no-console": ["warn", { allow: ["error"] }],
"no-constant-binary-expression": "warn",
"no-constructor-return": "error",
"no-div-regex": "warn",
"no-duplicate-imports": "warn",
"no-else-return": ["error", { allowElseIf: false }],
"no-multi-assign": "error",
"no-negated-condition": "warn",
"no-promise-executor-return": "warn",
"no-self-compare": "warn",
"no-shadow": "error",
"no-template-curly-in-string": "warn",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "warn",
"no-unneeded-ternary": "error",
"no-unreachable-loop": "warn",
"no-unused-expressions": ["warn", { allowShortCircuit: true, allowTernary: true }],
"no-unused-vars": "warn",
"no-use-before-define": "error",
"no-useless-concat": "error",
"no-useless-constructor": "warn",
"no-var": "error",
"no-warning-comments": "warn",
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-numeric-literals": "warn",
"prefer-template": "error",
"require-await": "warn",
"space-before-blocks": "error",
},
},
];