-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
130 lines (130 loc) · 3.71 KB
/
.eslintrc
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
{
"extends": "eslint:recommended",
"parserOptions": {
"ecmaFeatures": {
"impliedStrict": true
}
},
"root": true,
"env": {
"node": true,
"es2020": true,
"mocha": true,
"mongo": true
},
"globals": {
"io": "writable",
"logger": "writable",
"CustomError": "writable"
},
"rules": {
"semi": "error",
"radix": ["error", "always"],
"id-length": ["error", {
"min": 2,
"max": 30,
"exceptions": ["v", "$", "i", "_"]
}],
"camelcase": ["error", {
"ignoreDestructuring": true,
"allow": ["test_id"]
}],
"quotes": ["error", "single"],
"prefer-const": "error",
"no-plusplus": "error",
"eqeqeq": "error",
"curly": "error",
"quote-props": ["error", "as-needed"],
"object-shorthand": "error",
"array-callback-return": "error",
"prefer-destructuring": "error",
"prefer-template": "error",
"template-curly-spacing": ["error", "never"],
"no-loop-func": "error",
"prefer-rest-params": "error",
"space-before-function-paren": ["error", {
"anonymous": "always",
"named": "never",
"asyncArrow": "always"
}],
"space-before-blocks": "error",
"no-param-reassign": "error",
"prefer-arrow-callback": ["error"],
"arrow-spacing": "error",
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "as-needed"],
"implicit-arrow-linebreak": ["error", "beside"],
"no-useless-constructor": "error",
"no-dupe-class-members": "error",
"class-methods-use-this": "error",
"dot-notation": "error",
"no-multi-assign": "error",
"max-len": ["error", {
"code": 120,
"tabWidth": 4,
"ignoreUrls": true,
"ignoreRegExpLiterals": true,
"ignoreTemplateLiterals": true
}],
"max-params": ["error", 4],
"operator-linebreak": ["error", "none", {
"overrides": {
"||": "before",
"&&": "before",
"?": "before",
":": "before"
}
}],
"no-unneeded-ternary": "error",
"no-nested-ternary": "error",
"no-mixed-operators": "error",
"brace-style": "error",
"no-else-return": "error",
"spaced-comment": "error",
"indent": ["error", 4, {}],
"keyword-spacing": ["error", { "before": true, "after": true }],
"space-infix-ops": "error",
"eol-last": ["error", "always"],
"newline-per-chained-call": ["error", { "ignoreChainWithDepth": 3 }],
"no-whitespace-before-property": "error",
"padded-blocks": ["error", "never"],
"no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 1}],
"space-in-parens": ["error", "never"],
"array-bracket-spacing": ["error", "never"],
"object-curly-spacing": ["error", "always"],
"block-spacing": "error",
"comma-spacing": ["error", { "before": false, "after": true }],
"computed-property-spacing": ["error", "never"],
"func-call-spacing": ["error", "never"],
"func-style": ["error", "expression"],
"function-paren-newline": ["error", "multiline"],
"key-spacing": ["error", { "beforeColon": false }],
"no-trailing-spaces": "error",
"comma-style": ["error", "last"],
"comma-dangle": ["error", "always-multiline"],
"new-cap": ["error", { "capIsNew": false }],
"no-underscore-dangle": ["error", {
"allowAfterThis": true,
"allowAfterSuper": true,
"allow": ["_id"]
}],
"no-restricted-globals": [
"error",
{
"name": "isNaN",
"message": "Use Number.isNaN instead."
},
{
"name": "isFinite",
"message": "Use Number.isFinite instead."
}
],
"no-restricted-properties": [2,
{
"object": "Math",
"property": "pow",
"message": "Please use ** instead."
}
]
}
}