-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
80 lines (79 loc) · 2.71 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
import globals from "globals";
import pluginJs from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
import tseslint from "typescript-eslint";
export default [
{
ignores: ["docs/**"],
},
{
files: ["**/*.ts"],
},
{
plugins: {
"@stylistic": stylistic
},
languageOptions: {
globals: globals.es2021
}
},
{
rules: {
"prefer-const": ["error", {
"destructuring": "all"
}],
"@stylistic/brace-style": ["error", "1tbs"],
"@stylistic/comma-spacing": ["error", {
before: false,
after: true
}],
"block-scoped-var": "error",
"@stylistic/comma-style": ["error", "last"],
"@stylistic/arrow-spacing": ["error", {
before: true,
after: true
}],
"@stylistic/key-spacing": ["error", {
beforeColon: false,
afterColon: true,
mode: "minimum"
}],
"@stylistic/no-mixed-spaces-and-tabs": "error",
"@stylistic/no-trailing-spaces": "error",
"@stylistic/space-in-parens": ["error", "never"],
"@stylistic/space-before-function-paren": ["error", {
anonymous: "never",
named: "never"
}],
"@stylistic/semi": ["error", "always"],
"no-unused-vars": ["error", { vars: "all", args: "all" }],
"@stylistic/object-curly-spacing": ["error", "always"],
"@stylistic/array-bracket-spacing": ["error", "never"],
"@stylistic/rest-spread-spacing": ["error", "never"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/no-multiple-empty-lines": ["error", {
max: 1,
maxEOF: 0,
maxBOF: 0
}],
"@stylistic/operator-linebreak": ["error", "after", {
overrides: { ":": "before", "?": "before" }
}],
"@stylistic/object-property-newline": ["error", {
allowMultiplePropertiesPerLine: true
}],
"@stylistic/no-whitespace-before-property": "error",
"@stylistic/max-statements-per-line": ["error", { max: 1 }],
"@stylistic/quotes": ["error", "double"],
"@stylistic/max-len": ["error", {
"code": 85,
"tabWidth": 4,
"ignorePattern": "^import\\s.+\\sfrom\\s.+;$",
"ignoreUrls": true
}],
"no-var": "error"
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended
];