forked from barecheck/code-coverage-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
44 lines (44 loc) · 989 Bytes
/
.eslintrc.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
module.exports = {
env: {
node: true,
mocha: true
},
extends: [
"airbnb-base",
"prettier",
"plugin:import/errors",
"plugin:import/warnings"
],
plugins: ["prettier", "simple-import-sort"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
parserOptions: {
ecmaVersion: 11
},
rules: {
"prettier/prettier": "error",
"no-console": 1,
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// Code complexity rules
complexity: ["error", 10],
"max-depth": ["error", 3],
"max-nested-callbacks": ["error", 3],
"max-statements": ["error", 10],
"max-lines": ["error", 300]
},
overrides: [
// Code complexity rules for test files
{
files: ["*.test.js"],
rules: {
"max-depth": ["error", 2],
"max-nested-callbacks": ["error", 4],
"max-statements": ["error", 30],
"max-lines": ["error", 500]
}
}
]
};