-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.json
57 lines (50 loc) · 1.52 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
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module"
},
"rules": {
// Possible Errors
"no-console": "warn",
"no-undef": "error",
"no-extra-semi": "error",
"no-dupe-args": "error",
"no-unreachable": "error",
// Best Practices
"eqeqeq": ["error", "always"],
"curly": "error",
"default-case": "warn",
"no-alert": "warn",
"no-else-return": "error",
// Variables
"no-unused-vars": ["error", { "vars": "all", "args": "after-used" }],
"no-use-before-define": "error",
"no-shadow": "warn",
// Stylistic Choices
"semi": ["error", "always"],
"quotes": ["error", "single"],
"indent": ["error", 2],
"comma-dangle": ["error", "never"],
"brace-style": ["error", "1tbs"],
"space-before-function-paren": ["error", "never"],
// ES6
"no-var": "error",
"prefer-const": "error",
"arrow-spacing": ["error", { "before": true, "after": true }],
"no-duplicate-imports": "error",
// Code Complexity
"max-depth": ["error", 4],
"max-lines": ["warn", { "max": 300, "skipBlankLines": true }],
"complexity": ["error", { "max": 10 }],
// Code Layout
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }],
"eol-last": ["error", "always"],
"no-trailing-spaces": "error"
}
}