-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.json
executable file
Β·81 lines (78 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
81
{
"extends": [
"airbnb-base",
"plugin:prettier/recommended",
"plugin:node/recommended",
"eslint:recommended",
"plugin:promise/recommended",
"plugin:security/recommended",
"plugin:unicorn/recommended"
// "plugin:jest/recommended",
],
"parserOptions": {
// Only ESLint 6.2.0 and later support ES2020.
"ecmaVersion": 2022
},
"plugins": ["prettier", "security"],
"rules": {
// "prettier/prettier": 2,
// "no-return-await": 0,
// "class-methods-use-this": 0,
"import/extensions": 0,
"no-restricted-syntax": [
"error",
{
"selector": "ForInStatement",
"message": "for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries }, and iterate over the resulting array."
},
{
"selector": "LabeledStatement",
"message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
},
{
"selector": "WithStatement",
"message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
}
],
"unicorn/filename-case": [
"error",
{
"case": "camelCase"
}
],
"no-nested-ternary": 0,
"no-param-reassign": [
2,
{
"props": true,
"ignorePropertyModificationsFor": [
"err",
"error",
"req",
"res",
"request",
"response"
]
}
],
"func-names": 0,
"no-process-exit": 0,
"consistent-return": 0,
"no-console": 1,
"no-underscore-dangle": 0,
"prefer-destructuring": [
2,
{
"object": true,
"array": false
}
],
"no-unused-vars": [2, { "argsIgnorePattern": "req|res|next|val" }],
"node/no-path-concat": 2,
"unicorn/no-fn-reference-in-iterator": 0,
"security/detect-non-literal-fs-filename": 0
},
"env": {
// "jest/globals": true
}
}