-
Notifications
You must be signed in to change notification settings - Fork 33
/
eslint.config.js
53 lines (52 loc) · 1.4 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
import js from "@eslint/js";
import vitest from "@vitest/eslint-plugin";
export default [
{
ignores: [
"build",
"coverage",
"test/fixtures",
"benchmark.input.js",
"test.*",
],
},
{
plugins: {
vitest,
},
rules: {
...js.recommended,
...vitest.configs.recommended.rules,
"arrow-body-style": "error",
curly: "error",
"dot-notation": "error",
eqeqeq: ["error", "always", { null: "ignore" }],
"no-shadow": "error",
"no-restricted-syntax": [
"error",
{
selector: "SequenceExpression",
message:
"The comma operator is confusing and a common mistake. Don’t use it!",
},
],
"no-var": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": ["error", { object: true, array: false }],
"prefer-exponentiation-operator": "error",
"prefer-numeric-literals": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"vitest/no-disabled-tests": "error",
"vitest/no-focused-tests": "error",
"vitest/valid-title": "off",
},
},
];