-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
246 lines (246 loc) · 6.85 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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
{
"env": {
"node": true,
"es2021": true
},
"extends": ["eslint:recommended", "plugin:jsdoc/recommended"],
"root": true,
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": ["jsdoc"],
"rules": {
"array-bracket-spacing": ["warn", "always"],
"array-element-newline": ["warn", "consistent"],
// "arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["warn", "as-needed"],
"arrow-spacing": "warn",
"block-spacing": "warn",
"brace-style": "warn",
"camelcase": "error",
"capitalized-comments": "off",
"comma-spacing": "warn",
"comma-style": "warn",
"curly": "warn",
"dot-location": ["warn", "property"],
"eqeqeq": "warn",
"for-direction": "off",
"func-call-spacing": "warn",
"func-style": "warn",
"function-paren-newline": ["warn", "multiline-arguments"],
"grouped-accessor-pairs": "warn",
"implicit-arrow-linebreak": "warn",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"jsdoc/check-access": "warn",
"jsdoc/check-alignment": "warn",
// "jsdoc/check-examples": "warn",
"jsdoc/check-indentation": "off",
"jsdoc/check-line-alignment": "warn",
"jsdoc/check-param-names": "warn",
"jsdoc/check-property-names": "warn",
"jsdoc/check-syntax": "warn",
"jsdoc/check-tag-names": "warn",
"jsdoc/check-types": "warn",
"jsdoc/check-values": "warn",
"jsdoc/empty-tags": "warn",
"jsdoc/implements-on-classes": "warn",
"jsdoc/match-description": "off",
"jsdoc/multiline-blocks": "warn",
"jsdoc/newline-after-description": "warn",
"jsdoc/no-bad-blocks": "warn",
"jsdoc/no-defaults": ["warn", { "noOptionalParamNames": true }],
// "jsdoc/no-missing-syntax": "warn",
"jsdoc/no-multi-asterisks": "warn",
// "jsdoc/no-restricted-syntax": "warn",
// "jsdoc/no-types": "warn",
"jsdoc/no-undefined-types": "off",
"jsdoc/require-asterisk-prefix": "warn",
"jsdoc/require-description": "off",
"jsdoc/require-description-complete-sentence": "off",
"jsdoc/require-example": "off",
// "jsdoc/require-file-overview": "warn",
"jsdoc/require-hyphen-before-param-description": ["warn", "never"],
"jsdoc/require-jsdoc": [
"off",
{
"require": {
"ArrowFunctionExpression": true,
"ClassDeclaration": false,
"ClassExpression": false,
"FunctionExpression": true,
"MethodDefinition": true
},
"checkGetters": false,
"checkSetters": false,
"checkConstructors": false
}
],
"jsdoc/require-param": "warn",
"jsdoc/require-param-description": "off",
"jsdoc/require-param-name": "warn",
"jsdoc/require-param-type": "warn",
"jsdoc/require-property": "warn",
"jsdoc/require-property-description": "off",
"jsdoc/require-property-name": "warn",
"jsdoc/require-property-type": "warn",
"jsdoc/require-returns": "off",
"jsdoc/require-returns-check": "warn",
"jsdoc/require-returns-description": "off",
"jsdoc/require-returns-type": "off",
"jsdoc/require-throws": "warn",
"jsdoc/require-yields": "warn",
"jsdoc/require-yields-check": "warn",
"jsdoc/tag-lines": ["warn", "always", { "noEndLines": true }],
"jsdoc/valid-types": "off",
"key-spacing": ["warn", { "beforeColon": true, "align": "colon" }],
"keyword-spacing": ["warn", { "before": true, "after": true }],
"lines-around-comment": [
"warn",
{ "beforeLineComment": false, "allowBlockStart": true }
],
"max-len": [
"warn",
{
"code": 80,
"tabWidth": 4,
"ignoreUrls": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true,
"ignoreComments": true
}
],
"max-statements-per-line": "warn",
"multiline-comment-style": "off",
"multiline-ternary": ["warn", "always-multiline"],
"new-cap": [
"warn",
{
"capIsNew": false
}
],
"new-parens": ["warn", "always"],
"newline-per-chained-call": ["off", { "ignoreChainWithDepth": 1 }],
"no-duplicate-imports": "warn",
"no-empty-function": "warn",
"no-extra-parens": [
"warn",
"all",
{ "nestedBinaryExpressions": false }
],
"no-fallthrough": "off",
"no-implicit-globals": "error",
"no-invalid-this": "warn",
"no-lone-blocks": "warn",
"no-lonely-if": "warn",
"no-mixed-operators": [
"warn",
{
"groups": [
["+", "-", "*", "/", "%", "**"],
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
],
"allowSamePrecedence": true
}
],
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
"no-multi-assign": "warn",
"no-multi-spaces": "warn",
"no-multiple-empty-lines": "warn",
"no-nested-ternary": "warn",
"no-new": "warn",
"no-new-func": "warn",
"no-new-object": "warn",
"no-new-wrappers": "warn",
"no-promise-executor-return": "warn",
"no-proto": "warn",
"no-self-compare": "warn",
"no-shadow": "off",
"no-trailing-spaces": "warn",
"no-undef": "error",
"no-unneeded-ternary": "warn",
"no-unused-expressions": [
"warn",
{
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}
],
"no-unused-vars": "error",
"no-use-before-define": "error",
"no-useless-concat": "warn",
"no-useless-constructor": "warn",
"no-useless-return": "warn",
"no-useless-rename": "warn",
"no-var": "error",
"no-whitespace-before-property": "error",
"object-curly-newline": [
"warn",
{
"multiline": true
}
],
"object-curly-spacing": ["warn", "always"],
"object-property-newline": "error",
"operator-linebreak": ["warn", "after"],
// "padding-line-between-statements": [
// "warn",
// { "blankLine": "always", "prev": "*", "next": "return" },
// { "blankLine": "always", "prev": "*", "next": "case" }
// ],
"prefer-arrow-callback": "off",
"prefer-const": "warn",
"prefer-destructuring": [
"warn",
{
"VariableDeclarator": {
"array": true,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": true
}
},
{
"enforceForRenamedProperties": false
}
],
"prefer-exponentiation-operator": "warn",
"prefer-rest-params": "warn",
"prefer-template": "warn",
"quotes": ["warn", "double"],
"rest-spread-spacing": ["error", "never"],
"semi": "error",
"semi-spacing": "error",
"semi-style": "error",
"sort-imports": [
"warn",
{ "memberSyntaxSortOrder": ["none", "single", "multiple", "all"] }
],
"space-before-blocks": "error",
"space-before-function-paren": [
"warn",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"sort-keys": ["warn", "asc", { "natural": true }],
"space-in-parens": ["warn", "never"],
"space-infix-ops": "warn",
"space-unary-ops": ["warn", { "words": true }],
"spaced-comment": ["warn", "always"],
"switch-colon-spacing": ["warn", { "after": true, "before": true }],
"template-curly-spacing": ["error", "never"],
"template-tag-spacing": "error",
"vars-on-top": "error",
"wrap-iife": ["warn", "inside"]
}
}