-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.json
80 lines (80 loc) · 2 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
{
"env": {
"browser": true,
"es6": true,
"node": true,
"mocha": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"globals": {
"BigInt": true,
"Metacom": true
},
"rules": {
"no-debugger": "warn",
"indent": ["warn", 4],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always", {
"omitLastInOneLineBlock": true
}],
"no-unused-vars": ["warn", {
"vars": "all",
"varsIgnorePattern": "^_.*"
}],
"no-loop-func": ["error"],
"strict": ["error", "global"],
"brace-style": ["error", "1tbs", {
"allowSingleLine": true
}],
"key-spacing": ["error", {
"mode": "minimum"
}],
"max-len": ["error", {
"code": 120,
"ignoreUrls": true
}],
"no-lonely-if": ["error"],
"no-trailing-spaces": ["error"],
"no-unneeded-ternary": ["error"],
"no-whitespace-before-property": ["error"],
"operator-linebreak": ["error", "after"],
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-unary-ops": ["error", {
"words": true,
"nonwords": false,
"overrides": {
"typeof": false
}
}],
"no-constant-condition": ["error", {
"checkLoops": false
}],
"no-console": ["off"],
"arrow-body-style": ["error", "always"],
"arrow-spacing": ["error", {
"before": true,
"after": true
}],
"no-confusing-arrow": ["error"],
"no-useless-computed-key": ["error"],
"no-useless-rename": ["error"],
"no-var": ["error"],
"object-shorthand": ["error", "always"],
"prefer-arrow-callback": ["error"],
"prefer-numeric-literals": ["error"],
"prefer-rest-params": ["error"],
"prefer-spread": ["error"],
"rest-spread-spacing": ["error", "never"],
"template-curly-spacing": ["error", "never"],
"require-await": ["warn"]
}
}