-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.json
90 lines (90 loc) · 2.7 KB
/
.eslintrc.json
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
86
87
88
89
90
{
"root": true,
"extends": [
"eslint:recommended"
],
"env": {
"node": true,
"es2022": true
},
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-console": ["error", { "allow": ["info", "warn", "error"] }],
"semi": ["error", "always"],
"quotes": ["error", "single"],
"indent": ["error", "tab"],
"linebreak-style": ["error", "unix"],
"strict": "error",
"eqeqeq": ["error", "always"],
"array-bracket-spacing": ["error", "always"],
"object-curly-spacing": ["error", "always"],
"camelcase": "error",
"new-cap": "error",
"consistent-return": "error",
"consistent-this": "error",
"curly": "error",
"no-var": "error",
"prefer-const": "error",
"comma-spacing": "error",
"comma-dangle": ["error", "never"],
"comma-style": "error",
"space-in-parens": ["error", "always", {"exceptions": ["{}"]}],
"space-before-blocks": "error",
"no-else-return": "error",
"prefer-object-spread": "error",
"arrow-spacing": "error",
"block-spacing": "error",
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"dot-location": ["error", "property"],
"eol-last": ["error", "never"],
"func-call-spacing": "error",
"key-spacing": ["error", {"mode": "strict"}],
"keyword-spacing": "error",
"newline-per-chained-call": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": ["error", { "multiline": true }],
"padded-blocks": ["error", "never"],
"padding-line-between-statements": ["error",
{"prev": "multiline-block-like", "next": "*", "blankLine": "always"},
{"prev": "import", "next": "*", "blankLine": "always"},
{"prev": "import", "next": "import", "blankLine": "never"},
{"prev": "export", "next": "*", "blankLine": "always"},
{"prev": "*", "next": "export", "blankLine": "always"},
{"prev": "export", "next": "export", "blankLine": "never"},
{"prev": "cjs-import", "next": "*", "blankLine": "always"},
{"prev": "cjs-import", "next": "cjs-import", "blankLine" : "never"},
{"prev": "cjs-export", "next": "*", "blankLine": "always"},
{"prev": "*", "next": "cjs-export", "blankLine": "always"},
{"prev": "cjs-export", "next": "cjs-export", "blankLine": "never"}
],
"rest-spread-spacing": "error",
"space-before-function-paren": "error",
"sort-imports": "error",
"no-fallthrough": ["error", { "commentPattern": "falls?\\s?through", "allowEmptyCase": true}]
},
"overrides": [
{
"files": ["**.mjs"],
"parserOptions": {
"sourceType": "module"
}
},
{
"files": ["./test/**"],
"plugins": [
"mocha"
],
"env": {
"mocha": true
},
"extends": [
"plugin:mocha/recommended"
]
}
]
}