@egy186/eslint-config 0.63.0 → 0.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.js +130 -137
- package/jest.js +55 -0
- package/jsdoc.js +1 -1
- package/package.json +22 -19
- package/react.js +3 -0
- package/typescript.js +1 -1
package/base.js
CHANGED
|
@@ -8,34 +8,31 @@ module.exports = {
|
|
|
8
8
|
reportUnusedDisableDirectives: true,
|
|
9
9
|
rules: {
|
|
10
10
|
...{
|
|
11
|
-
// Possible
|
|
11
|
+
// Possible Problems
|
|
12
|
+
'array-callback-return': ['error', { checkForEach: true }],
|
|
13
|
+
'constructor-super': 'error',
|
|
12
14
|
'for-direction': 'error',
|
|
13
15
|
'getter-return': 'error',
|
|
14
16
|
'no-async-promise-executor': 'error',
|
|
15
17
|
'no-await-in-loop': 'error',
|
|
18
|
+
'no-class-assign': 'error',
|
|
16
19
|
'no-compare-neg-zero': 'error',
|
|
17
20
|
'no-cond-assign': ['error', 'always'],
|
|
18
|
-
'no-
|
|
21
|
+
'no-const-assign': 'error',
|
|
19
22
|
'no-constant-condition': 'error',
|
|
23
|
+
'no-constructor-return': 'error',
|
|
20
24
|
'no-control-regex': 'error',
|
|
21
25
|
'no-debugger': 'error',
|
|
22
26
|
'no-dupe-args': 'error',
|
|
27
|
+
'no-dupe-class-members': 'error',
|
|
23
28
|
'no-dupe-else-if': 'error',
|
|
24
29
|
'no-dupe-keys': 'error',
|
|
25
30
|
'no-duplicate-case': 'error',
|
|
26
|
-
'no-
|
|
31
|
+
'no-duplicate-imports': 'error',
|
|
27
32
|
'no-empty-character-class': 'error',
|
|
33
|
+
'no-empty-pattern': 'error',
|
|
28
34
|
'no-ex-assign': 'error',
|
|
29
|
-
'no-
|
|
30
|
-
'no-extra-parens': [
|
|
31
|
-
'error',
|
|
32
|
-
'all',
|
|
33
|
-
{
|
|
34
|
-
ignoreJSX: 'multi-line',
|
|
35
|
-
nestedBinaryExpressions: false
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
'no-extra-semi': 'error',
|
|
35
|
+
'no-fallthrough': 'error',
|
|
39
36
|
'no-func-assign': 'error',
|
|
40
37
|
'no-import-assign': 'error',
|
|
41
38
|
'no-inner-declarations': 'error',
|
|
@@ -43,134 +40,193 @@ module.exports = {
|
|
|
43
40
|
'no-irregular-whitespace': 'error',
|
|
44
41
|
'no-loss-of-precision': 'error',
|
|
45
42
|
'no-misleading-character-class': 'error',
|
|
43
|
+
'no-new-symbol': 'error',
|
|
46
44
|
'no-obj-calls': 'error',
|
|
47
45
|
'no-promise-executor-return': 'error',
|
|
48
46
|
'no-prototype-builtins': 'error',
|
|
49
|
-
'no-
|
|
47
|
+
'no-self-assign': 'error',
|
|
48
|
+
'no-self-compare': 'error',
|
|
50
49
|
'no-setter-return': 'error',
|
|
51
50
|
'no-sparse-arrays': 'error',
|
|
52
51
|
'no-template-curly-in-string': 'error',
|
|
52
|
+
'no-this-before-super': 'error',
|
|
53
|
+
'no-undef': 'error',
|
|
53
54
|
'no-unexpected-multiline': 'error',
|
|
55
|
+
'no-unmodified-loop-condition': 'error',
|
|
54
56
|
'no-unreachable': 'error',
|
|
55
57
|
'no-unreachable-loop': 'error',
|
|
56
58
|
'no-unsafe-finally': 'error',
|
|
57
59
|
'no-unsafe-negation': 'error',
|
|
58
60
|
'no-unsafe-optional-chaining': ['error', { disallowArithmeticOperators: true }],
|
|
61
|
+
'no-unused-private-class-members': 'error',
|
|
62
|
+
'no-unused-vars': [
|
|
63
|
+
'error',
|
|
64
|
+
{
|
|
65
|
+
args: 'after-used',
|
|
66
|
+
caughtErrors: 'all',
|
|
67
|
+
vars: 'all'
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
'no-use-before-define': 'error',
|
|
59
71
|
'no-useless-backreference': 'error',
|
|
60
72
|
'require-atomic-updates': 'error',
|
|
61
73
|
'use-isnan': 'error',
|
|
62
74
|
'valid-typeof': 'error'
|
|
63
75
|
},
|
|
64
76
|
...{
|
|
65
|
-
//
|
|
77
|
+
// Suggestions
|
|
66
78
|
'accessor-pairs': 'error',
|
|
67
|
-
'
|
|
79
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
68
80
|
'block-scoped-var': 'error',
|
|
81
|
+
camelcase: ['error', { properties: 'never' }],
|
|
82
|
+
'capitalized-comments': 'error',
|
|
69
83
|
'class-methods-use-this': 'error',
|
|
70
84
|
complexity: ['warn', 12],
|
|
71
85
|
'consistent-return': 'error',
|
|
86
|
+
'consistent-this': 'error',
|
|
72
87
|
curly: ['error', 'all'],
|
|
73
88
|
'default-case': 'error',
|
|
74
89
|
'default-case-last': 'error',
|
|
75
90
|
'default-param-last': 'error',
|
|
76
|
-
'dot-location': ['error', 'property'],
|
|
77
91
|
'dot-notation': 'error',
|
|
78
92
|
eqeqeq: 'error',
|
|
93
|
+
'func-name-matching': 'error',
|
|
94
|
+
'func-names': ['error', 'as-needed'],
|
|
95
|
+
'func-style': ['error', 'expression'],
|
|
79
96
|
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
80
97
|
'guard-for-in': 'error',
|
|
98
|
+
'id-denylist': 'off',
|
|
99
|
+
'id-length': 'off',
|
|
100
|
+
'id-match': 'off',
|
|
101
|
+
'init-declarations': 'error',
|
|
81
102
|
'max-classes-per-file': 'error',
|
|
103
|
+
'max-depth': 'error',
|
|
104
|
+
'max-lines': 'warn',
|
|
105
|
+
'max-lines-per-function': 'warn',
|
|
106
|
+
'max-nested-callbacks': 'error',
|
|
107
|
+
'max-params': 'off',
|
|
108
|
+
'max-statements': 'warn',
|
|
109
|
+
'multiline-comment-style': 'error',
|
|
110
|
+
'new-cap': 'error',
|
|
82
111
|
'no-alert': 'error',
|
|
112
|
+
'no-array-constructor': 'error',
|
|
113
|
+
'no-bitwise': 'off',
|
|
83
114
|
'no-caller': 'error',
|
|
84
115
|
'no-case-declarations': 'error',
|
|
85
|
-
'no-
|
|
116
|
+
'no-confusing-arrow': ['error', { allowParens: false }],
|
|
117
|
+
'no-console': 'warn',
|
|
118
|
+
'no-continue': 'off',
|
|
119
|
+
'no-delete-var': 'error',
|
|
86
120
|
'no-div-regex': 'error',
|
|
87
121
|
'no-else-return': 'error',
|
|
122
|
+
'no-empty': 'error',
|
|
88
123
|
'no-empty-function': 'error',
|
|
89
|
-
'no-empty-pattern': 'error',
|
|
90
124
|
'no-eq-null': 'error',
|
|
91
125
|
'no-eval': 'error',
|
|
92
126
|
'no-extend-native': 'error',
|
|
93
127
|
'no-extra-bind': 'error',
|
|
128
|
+
'no-extra-boolean-cast': 'error',
|
|
94
129
|
'no-extra-label': 'off',
|
|
95
|
-
'no-
|
|
130
|
+
'no-extra-semi': 'error',
|
|
96
131
|
'no-floating-decimal': 'error',
|
|
97
132
|
'no-global-assign': 'error',
|
|
98
133
|
'no-implicit-coercion': 'error',
|
|
99
134
|
'no-implicit-globals': 'error',
|
|
100
135
|
'no-implied-eval': 'error',
|
|
136
|
+
'no-inline-comments': 'off',
|
|
101
137
|
'no-invalid-this': 'error',
|
|
102
138
|
'no-iterator': 'error',
|
|
139
|
+
'no-label-var': 'off',
|
|
103
140
|
'no-labels': 'error',
|
|
104
141
|
'no-lone-blocks': 'error',
|
|
142
|
+
'no-lonely-if': 'error',
|
|
105
143
|
'no-loop-func': 'error',
|
|
106
144
|
'no-magic-numbers': 'off',
|
|
107
|
-
'no-
|
|
145
|
+
'no-mixed-operators': 'error',
|
|
146
|
+
'no-multi-assign': 'error',
|
|
108
147
|
'no-multi-str': 'error',
|
|
148
|
+
'no-negated-condition': 'error',
|
|
149
|
+
'no-nested-ternary': 'error',
|
|
109
150
|
'no-new': 'error',
|
|
110
151
|
'no-new-func': 'error',
|
|
152
|
+
'no-new-object': 'error',
|
|
111
153
|
'no-new-wrappers': 'error',
|
|
112
154
|
'no-nonoctal-decimal-escape': 'error',
|
|
113
155
|
'no-octal': 'error',
|
|
114
156
|
'no-octal-escape': 'error',
|
|
115
157
|
'no-param-reassign': ['error', { props: false }],
|
|
158
|
+
'no-plusplus': 'off',
|
|
116
159
|
'no-proto': 'error',
|
|
117
160
|
'no-redeclare': 'error',
|
|
161
|
+
'no-regex-spaces': 'error',
|
|
162
|
+
'no-restricted-exports': 'off',
|
|
163
|
+
'no-restricted-globals': 'off',
|
|
164
|
+
'no-restricted-imports': 'off',
|
|
118
165
|
'no-restricted-properties': 'off',
|
|
166
|
+
'no-restricted-syntax': 'off',
|
|
119
167
|
'no-return-assign': 'error',
|
|
120
168
|
'no-return-await': 'error',
|
|
121
169
|
'no-script-url': 'error',
|
|
122
|
-
'no-self-assign': 'error',
|
|
123
|
-
'no-self-compare': 'error',
|
|
124
170
|
'no-sequences': 'error',
|
|
171
|
+
'no-shadow': 'error',
|
|
172
|
+
'no-shadow-restricted-names': 'error',
|
|
173
|
+
'no-ternary': 'off',
|
|
125
174
|
'no-throw-literal': 'error',
|
|
126
|
-
'no-
|
|
175
|
+
'no-undef-init': 'error',
|
|
176
|
+
'no-undefined': 'off',
|
|
177
|
+
'no-underscore-dangle': ['error', { allowAfterThis: true }],
|
|
178
|
+
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
127
179
|
'no-unused-expressions': ['error', { enforceForJSX: true }],
|
|
128
180
|
'no-unused-labels': 'off',
|
|
129
181
|
'no-useless-call': 'error',
|
|
130
182
|
'no-useless-catch': 'error',
|
|
183
|
+
'no-useless-computed-key': 'error',
|
|
131
184
|
'no-useless-concat': 'error',
|
|
185
|
+
'no-useless-constructor': 'error',
|
|
132
186
|
'no-useless-escape': 'error',
|
|
187
|
+
'no-useless-rename': 'error',
|
|
133
188
|
'no-useless-return': 'error',
|
|
189
|
+
'no-var': 'error',
|
|
134
190
|
'no-void': 'error',
|
|
135
191
|
'no-warning-comments': 'error',
|
|
136
192
|
'no-with': 'error',
|
|
193
|
+
'object-shorthand': ['error', 'always'],
|
|
194
|
+
'one-var': ['error', 'never'],
|
|
195
|
+
'one-var-declaration-per-line': 'off',
|
|
196
|
+
'operator-assignment': 'off',
|
|
197
|
+
'prefer-arrow-callback': 'error',
|
|
198
|
+
'prefer-const': 'error',
|
|
199
|
+
'prefer-destructuring': 'error',
|
|
200
|
+
'prefer-exponentiation-operator': 'error',
|
|
137
201
|
'prefer-named-capture-group': 'error',
|
|
202
|
+
'prefer-numeric-literals': 'error',
|
|
203
|
+
'prefer-object-has-own': 'error',
|
|
204
|
+
'prefer-object-spread': 'error',
|
|
138
205
|
'prefer-promise-reject-errors': 'error',
|
|
139
206
|
'prefer-regex-literals': 'error',
|
|
207
|
+
'prefer-rest-params': 'error',
|
|
208
|
+
'prefer-spread': 'error',
|
|
209
|
+
'prefer-template': 'error',
|
|
210
|
+
'quote-props': ['error', 'as-needed'],
|
|
140
211
|
radix: 'error',
|
|
141
212
|
'require-await': 'error',
|
|
142
213
|
'require-unicode-regexp': 'error',
|
|
143
|
-
'
|
|
144
|
-
'
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
// Strict Mode
|
|
149
|
-
strict: ['error', 'safe']
|
|
150
|
-
},
|
|
151
|
-
...{
|
|
152
|
-
// Variables
|
|
153
|
-
'init-declarations': 'error',
|
|
154
|
-
'no-delete-var': 'error',
|
|
155
|
-
'no-label-var': 'off',
|
|
156
|
-
'no-restricted-globals': 'off',
|
|
157
|
-
'no-shadow': 'error',
|
|
158
|
-
'no-shadow-restricted-names': 'error',
|
|
159
|
-
'no-undef': 'error',
|
|
160
|
-
'no-undef-init': 'error',
|
|
161
|
-
'no-undefined': 'off',
|
|
162
|
-
'no-unused-vars': [
|
|
214
|
+
'require-yield': 'error',
|
|
215
|
+
'sort-imports': 'error',
|
|
216
|
+
'sort-keys': 'error',
|
|
217
|
+
'sort-vars': 'error',
|
|
218
|
+
'spaced-comment': [
|
|
163
219
|
'error',
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
caughtErrors: 'all',
|
|
167
|
-
vars: 'all'
|
|
168
|
-
}
|
|
220
|
+
'always',
|
|
221
|
+
{ block: { balanced: true } }
|
|
169
222
|
],
|
|
170
|
-
|
|
223
|
+
strict: ['error', 'safe'],
|
|
224
|
+
'symbol-description': 'error',
|
|
225
|
+
'vars-on-top': 'error',
|
|
226
|
+
yoda: 'error'
|
|
171
227
|
},
|
|
172
228
|
...{
|
|
173
|
-
//
|
|
229
|
+
// Layout & Formatting
|
|
174
230
|
'array-bracket-newline': 'error',
|
|
175
231
|
'array-bracket-spacing': ['error', 'never'],
|
|
176
232
|
'array-element-newline': [
|
|
@@ -180,14 +236,20 @@ module.exports = {
|
|
|
180
236
|
multiline: true
|
|
181
237
|
}
|
|
182
238
|
],
|
|
239
|
+
'arrow-parens': ['error', 'as-needed'],
|
|
240
|
+
'arrow-spacing': [
|
|
241
|
+
'error',
|
|
242
|
+
{
|
|
243
|
+
after: true,
|
|
244
|
+
before: true
|
|
245
|
+
}
|
|
246
|
+
],
|
|
183
247
|
'block-spacing': ['error', 'always'],
|
|
184
248
|
'brace-style': [
|
|
185
249
|
'error',
|
|
186
250
|
'1tbs',
|
|
187
251
|
{ allowSingleLine: false }
|
|
188
252
|
],
|
|
189
|
-
camelcase: ['error', { properties: 'never' }],
|
|
190
|
-
'capitalized-comments': 'error',
|
|
191
253
|
'comma-dangle': ['error', 'never'],
|
|
192
254
|
'comma-spacing': [
|
|
193
255
|
'error',
|
|
@@ -198,17 +260,12 @@ module.exports = {
|
|
|
198
260
|
],
|
|
199
261
|
'comma-style': ['error', 'last'],
|
|
200
262
|
'computed-property-spacing': ['error', 'never'],
|
|
201
|
-
'
|
|
263
|
+
'dot-location': ['error', 'property'],
|
|
202
264
|
'eol-last': 'error',
|
|
203
265
|
'func-call-spacing': ['error', 'never'],
|
|
204
|
-
'func-name-matching': 'error',
|
|
205
|
-
'func-names': ['error', 'as-needed'],
|
|
206
|
-
'func-style': ['error', 'expression'],
|
|
207
266
|
'function-call-argument-newline': ['error', 'consistent'],
|
|
208
267
|
'function-paren-newline': ['error', 'multiline'],
|
|
209
|
-
'
|
|
210
|
-
'id-length': 'off',
|
|
211
|
-
'id-match': 'off',
|
|
268
|
+
'generator-star-spacing': ['error', 'after'],
|
|
212
269
|
'implicit-arrow-linebreak': ['error', 'beside'],
|
|
213
270
|
indent: [
|
|
214
271
|
'error',
|
|
@@ -237,27 +294,21 @@ module.exports = {
|
|
|
237
294
|
'linebreak-style': 'error',
|
|
238
295
|
'lines-around-comment': 'off',
|
|
239
296
|
'lines-between-class-members': 'error',
|
|
240
|
-
'max-depth': 'error',
|
|
241
297
|
'max-len': 'off',
|
|
242
|
-
'max-lines': 'warn',
|
|
243
|
-
'max-lines-per-function': 'warn',
|
|
244
|
-
'max-nested-callbacks': 'error',
|
|
245
|
-
'max-params': 'off',
|
|
246
|
-
'max-statements': 'warn',
|
|
247
298
|
'max-statements-per-line': 'error',
|
|
248
|
-
'multiline-comment-style': 'error',
|
|
249
299
|
'multiline-ternary': ['error', 'always-multiline'],
|
|
250
|
-
'new-cap': 'error',
|
|
251
300
|
'new-parens': 'error',
|
|
252
301
|
'newline-per-chained-call': 'off',
|
|
253
|
-
'no-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
302
|
+
'no-extra-parens': [
|
|
303
|
+
'error',
|
|
304
|
+
'all',
|
|
305
|
+
{
|
|
306
|
+
ignoreJSX: 'multi-line',
|
|
307
|
+
nestedBinaryExpressions: false
|
|
308
|
+
}
|
|
309
|
+
],
|
|
259
310
|
'no-mixed-spaces-and-tabs': 'error',
|
|
260
|
-
'no-multi-
|
|
311
|
+
'no-multi-spaces': 'error',
|
|
261
312
|
'no-multiple-empty-lines': [
|
|
262
313
|
'error',
|
|
263
314
|
{
|
|
@@ -266,35 +317,22 @@ module.exports = {
|
|
|
266
317
|
maxEOF: 1
|
|
267
318
|
}
|
|
268
319
|
],
|
|
269
|
-
'no-negated-condition': 'error',
|
|
270
|
-
'no-nested-ternary': 'error',
|
|
271
|
-
'no-new-object': 'error',
|
|
272
|
-
'no-plusplus': 'off',
|
|
273
|
-
'no-restricted-syntax': 'off',
|
|
274
320
|
'no-tabs': 'off',
|
|
275
|
-
'no-ternary': 'off',
|
|
276
321
|
'no-trailing-spaces': 'error',
|
|
277
|
-
'no-underscore-dangle': ['error', { allowAfterThis: true }],
|
|
278
|
-
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
279
322
|
'no-whitespace-before-property': 'error',
|
|
280
323
|
'nonblock-statement-body-position': 'error',
|
|
281
324
|
'object-curly-newline': ['error', { multiline: true }],
|
|
282
325
|
'object-curly-spacing': ['error', 'always'],
|
|
283
326
|
'object-property-newline': 'error',
|
|
284
|
-
'one-var': ['error', 'never'],
|
|
285
|
-
'one-var-declaration-per-line': 'off',
|
|
286
|
-
'operator-assignment': 'off',
|
|
287
327
|
'operator-linebreak': ['error', 'before'],
|
|
288
328
|
'padded-blocks': ['error', 'never'],
|
|
289
329
|
'padding-line-between-statements': 'error',
|
|
290
|
-
'prefer-exponentiation-operator': 'error',
|
|
291
|
-
'prefer-object-spread': 'error',
|
|
292
|
-
'quote-props': ['error', 'as-needed'],
|
|
293
330
|
quotes: [
|
|
294
331
|
'error',
|
|
295
332
|
'single',
|
|
296
333
|
'avoid-escape'
|
|
297
334
|
],
|
|
335
|
+
'rest-spread-spacing': ['error', 'never'],
|
|
298
336
|
semi: ['error', 'always'],
|
|
299
337
|
'semi-spacing': [
|
|
300
338
|
'error',
|
|
@@ -304,62 +342,17 @@ module.exports = {
|
|
|
304
342
|
}
|
|
305
343
|
],
|
|
306
344
|
'semi-style': ['error', 'last'],
|
|
307
|
-
'sort-keys': 'error',
|
|
308
|
-
'sort-vars': 'error',
|
|
309
345
|
'space-before-blocks': 'error',
|
|
310
346
|
'space-before-function-paren': ['error', 'always'],
|
|
311
347
|
'space-in-parens': ['error', 'never'],
|
|
312
348
|
'space-infix-ops': 'error',
|
|
313
349
|
'space-unary-ops': 'error',
|
|
314
|
-
'spaced-comment': [
|
|
315
|
-
'error',
|
|
316
|
-
'always',
|
|
317
|
-
{ block: { balanced: true } }
|
|
318
|
-
],
|
|
319
350
|
'switch-colon-spacing': 'error',
|
|
351
|
+
'template-curly-spacing': ['error', 'never'],
|
|
320
352
|
'template-tag-spacing': ['error', 'never'],
|
|
321
353
|
'unicode-bom': ['error', 'never'],
|
|
322
|
-
'wrap-
|
|
323
|
-
|
|
324
|
-
...{
|
|
325
|
-
// ECMAScript 6
|
|
326
|
-
'arrow-body-style': ['error', 'as-needed'],
|
|
327
|
-
'arrow-parens': ['error', 'as-needed'],
|
|
328
|
-
'arrow-spacing': [
|
|
329
|
-
'error',
|
|
330
|
-
{
|
|
331
|
-
after: true,
|
|
332
|
-
before: true
|
|
333
|
-
}
|
|
334
|
-
],
|
|
335
|
-
'constructor-super': 'error',
|
|
336
|
-
'generator-star-spacing': ['error', 'after'],
|
|
337
|
-
'no-class-assign': 'error',
|
|
338
|
-
'no-confusing-arrow': ['error', { allowParens: false }],
|
|
339
|
-
'no-const-assign': 'error',
|
|
340
|
-
'no-dupe-class-members': 'error',
|
|
341
|
-
'no-duplicate-imports': 'error',
|
|
342
|
-
'no-new-symbol': 'error',
|
|
343
|
-
'no-restricted-exports': 'off',
|
|
344
|
-
'no-restricted-imports': 'off',
|
|
345
|
-
'no-this-before-super': 'error',
|
|
346
|
-
'no-useless-computed-key': 'error',
|
|
347
|
-
'no-useless-constructor': 'error',
|
|
348
|
-
'no-useless-rename': 'error',
|
|
349
|
-
'no-var': 'error',
|
|
350
|
-
'object-shorthand': ['error', 'always'],
|
|
351
|
-
'prefer-arrow-callback': 'error',
|
|
352
|
-
'prefer-const': 'error',
|
|
353
|
-
'prefer-destructuring': 'error',
|
|
354
|
-
'prefer-numeric-literals': 'error',
|
|
355
|
-
'prefer-rest-params': 'error',
|
|
356
|
-
'prefer-spread': 'error',
|
|
357
|
-
'prefer-template': 'error',
|
|
358
|
-
'require-yield': 'error',
|
|
359
|
-
'rest-spread-spacing': ['error', 'never'],
|
|
360
|
-
'sort-imports': 'error',
|
|
361
|
-
'symbol-description': 'error',
|
|
362
|
-
'template-curly-spacing': ['error', 'never'],
|
|
354
|
+
'wrap-iife': ['error', 'inside'],
|
|
355
|
+
'wrap-regex': 'off',
|
|
363
356
|
'yield-star-spacing': [
|
|
364
357
|
'error',
|
|
365
358
|
{
|
package/jest.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
env: { jest: true },
|
|
5
|
+
plugins: ['jest'],
|
|
6
|
+
rules: {
|
|
7
|
+
'jest/consistent-test-it': 'error',
|
|
8
|
+
'jest/expect-expect': 'error',
|
|
9
|
+
'jest/max-nested-describe': 'error',
|
|
10
|
+
'jest/no-alias-methods': 'error',
|
|
11
|
+
'jest/no-commented-out-tests': 'error',
|
|
12
|
+
'jest/no-conditional-expect': 'error',
|
|
13
|
+
'jest/no-deprecated-functions': 'error',
|
|
14
|
+
'jest/no-disabled-tests': 'error',
|
|
15
|
+
'jest/no-done-callback': 'error',
|
|
16
|
+
'jest/no-duplicate-hooks': 'error',
|
|
17
|
+
'jest/no-export': 'error',
|
|
18
|
+
'jest/no-focused-tests': 'error',
|
|
19
|
+
'jest/no-hooks': 'off',
|
|
20
|
+
'jest/no-identical-title': 'error',
|
|
21
|
+
'jest/no-if': 'error',
|
|
22
|
+
'jest/no-interpolation-in-snapshots': 'error',
|
|
23
|
+
'jest/no-jasmine-globals': 'error',
|
|
24
|
+
'jest/no-jest-import': 'error',
|
|
25
|
+
'jest/no-large-snapshots': 'warn',
|
|
26
|
+
'jest/no-mocks-import': 'error',
|
|
27
|
+
'jest/no-restricted-matchers': 'off',
|
|
28
|
+
'jest/no-standalone-expect': 'error',
|
|
29
|
+
'jest/no-test-prefixes': 'error',
|
|
30
|
+
'jest/no-test-return-statement': 'error',
|
|
31
|
+
'jest/prefer-called-with': 'error',
|
|
32
|
+
'jest/prefer-comparison-matcher': 'error',
|
|
33
|
+
'jest/prefer-equality-matcher': 'error',
|
|
34
|
+
'jest/prefer-expect-assertions': ['warn', { onlyFunctionsWithAsyncKeyword: true }],
|
|
35
|
+
'jest/prefer-expect-resolves': 'error',
|
|
36
|
+
'jest/prefer-hooks-on-top': 'error',
|
|
37
|
+
'jest/prefer-lowercase-title': 'error',
|
|
38
|
+
'jest/prefer-spy-on': 'error',
|
|
39
|
+
'jest/prefer-strict-equal': 'error',
|
|
40
|
+
'jest/prefer-to-be': 'error',
|
|
41
|
+
'jest/prefer-to-contain': 'error',
|
|
42
|
+
'jest/prefer-to-have-length': 'error',
|
|
43
|
+
'jest/prefer-todo': 'error',
|
|
44
|
+
'jest/require-hook': 'error',
|
|
45
|
+
'jest/require-to-throw-message': 'error',
|
|
46
|
+
'jest/require-top-level-describe': 'error',
|
|
47
|
+
'jest/unbound-method': 'error',
|
|
48
|
+
'jest/valid-describe-callback': 'error',
|
|
49
|
+
'jest/valid-expect': 'error',
|
|
50
|
+
'jest/valid-expect-in-promise': 'error',
|
|
51
|
+
'jest/valid-title': 'error',
|
|
52
|
+
'max-lines-per-function': 'off',
|
|
53
|
+
'max-statements': 'off'
|
|
54
|
+
}
|
|
55
|
+
};
|
package/jsdoc.js
CHANGED
|
@@ -5,7 +5,7 @@ module.exports = {
|
|
|
5
5
|
rules: {
|
|
6
6
|
'jsdoc/check-access': 'error',
|
|
7
7
|
'jsdoc/check-alignment': 'error',
|
|
8
|
-
'jsdoc/check-examples': '
|
|
8
|
+
'jsdoc/check-examples': 'off',
|
|
9
9
|
'jsdoc/check-indentation': 'error',
|
|
10
10
|
'jsdoc/check-line-alignment': 'off',
|
|
11
11
|
'jsdoc/check-param-names': 'error',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.67.0",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
@@ -10,25 +10,27 @@
|
|
|
10
10
|
"lodash": "^4.17.21"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "~
|
|
14
|
-
"@typescript-eslint/parser": "~
|
|
15
|
-
"eslint": "~7.
|
|
16
|
-
"eslint-plugin-import": "~2.
|
|
17
|
-
"eslint-plugin-
|
|
13
|
+
"@typescript-eslint/eslint-plugin": "~5.10.0",
|
|
14
|
+
"@typescript-eslint/parser": "~5.10.0",
|
|
15
|
+
"eslint": "~8.7.0",
|
|
16
|
+
"eslint-plugin-import": "~2.25.4",
|
|
17
|
+
"eslint-plugin-jest": "~25.7.0",
|
|
18
|
+
"eslint-plugin-jsdoc": "~37.6.1",
|
|
18
19
|
"eslint-plugin-node": "~11.1.0",
|
|
19
|
-
"eslint-plugin-react": "~7.
|
|
20
|
-
"eslint-plugin-react-hooks": "~4.
|
|
21
|
-
"husky": "^7.0.
|
|
20
|
+
"eslint-plugin-react": "~7.28.0",
|
|
21
|
+
"eslint-plugin-react-hooks": "~4.3.0",
|
|
22
|
+
"husky": "^7.0.4",
|
|
22
23
|
"require-dir": "^1.2.0",
|
|
23
|
-
"typescript": "^4.4
|
|
24
|
+
"typescript": "^4.5.4"
|
|
24
25
|
},
|
|
25
26
|
"engines": {
|
|
26
|
-
"node": ">=12"
|
|
27
|
+
"node": ">=12.22.0"
|
|
27
28
|
},
|
|
28
29
|
"files": [
|
|
29
30
|
"base.js",
|
|
30
31
|
"browser.js",
|
|
31
32
|
"index.js",
|
|
33
|
+
"jest.js",
|
|
32
34
|
"jsdoc.js",
|
|
33
35
|
"modules.js",
|
|
34
36
|
"node.js",
|
|
@@ -43,15 +45,16 @@
|
|
|
43
45
|
"license": "MIT",
|
|
44
46
|
"main": "index.js",
|
|
45
47
|
"peerDependencies": {
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
47
|
-
"@typescript-eslint/parser": "^
|
|
48
|
-
"eslint": "^
|
|
49
|
-
"eslint-plugin-import": "^2.
|
|
50
|
-
"eslint-plugin-
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
49
|
+
"@typescript-eslint/parser": "^5.3.1",
|
|
50
|
+
"eslint": "^8.5.0",
|
|
51
|
+
"eslint-plugin-import": "^2.25.3",
|
|
52
|
+
"eslint-plugin-jest": "^25.7.0",
|
|
53
|
+
"eslint-plugin-jsdoc": "^37.0.3",
|
|
51
54
|
"eslint-plugin-node": "^11.1.0",
|
|
52
|
-
"eslint-plugin-react": "^7.
|
|
53
|
-
"eslint-plugin-react-hooks": "^4.
|
|
54
|
-
"typescript": "^4.
|
|
55
|
+
"eslint-plugin-react": "^7.27.0",
|
|
56
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
57
|
+
"typescript": "^4.4.4"
|
|
55
58
|
},
|
|
56
59
|
"peerDependenciesMeta": {
|
|
57
60
|
"@typescript-eslint/eslint-plugin": {
|
package/react.js
CHANGED
|
@@ -83,6 +83,7 @@ module.exports = {
|
|
|
83
83
|
'react/no-access-state-in-setstate': 'error',
|
|
84
84
|
'react/no-adjacent-inline-elements': 'error',
|
|
85
85
|
'react/no-array-index-key': 'error',
|
|
86
|
+
'react/no-arrow-function-lifecycle': 'error',
|
|
86
87
|
'react/no-children-prop': 'error',
|
|
87
88
|
'react/no-danger': 'error',
|
|
88
89
|
'react/no-danger-with-children': 'error',
|
|
@@ -91,6 +92,7 @@ module.exports = {
|
|
|
91
92
|
'react/no-did-update-set-state': 'error',
|
|
92
93
|
'react/no-direct-mutation-state': 'error',
|
|
93
94
|
'react/no-find-dom-node': 'error',
|
|
95
|
+
'react/no-invalid-html-attribute': 'error',
|
|
94
96
|
'react/no-is-mounted': 'error',
|
|
95
97
|
'react/no-multi-comp': 'error',
|
|
96
98
|
'react/no-namespace': 'error',
|
|
@@ -104,6 +106,7 @@ module.exports = {
|
|
|
104
106
|
'react/no-unknown-property': 'error',
|
|
105
107
|
'react/no-unsafe': 'error',
|
|
106
108
|
'react/no-unstable-nested-components': 'error',
|
|
109
|
+
'react/no-unused-class-component-methods': 'error',
|
|
107
110
|
'react/no-unused-prop-types': 'error',
|
|
108
111
|
'react/no-unused-state': 'error',
|
|
109
112
|
'react/no-will-update-set-state': 'error',
|
package/typescript.js
CHANGED
|
@@ -17,6 +17,7 @@ module.exports = {
|
|
|
17
17
|
'@typescript-eslint/consistent-indexed-object-style': ['error', 'index-signature'],
|
|
18
18
|
'@typescript-eslint/consistent-type-assertions': 'error',
|
|
19
19
|
'@typescript-eslint/consistent-type-definitions': 'error',
|
|
20
|
+
'@typescript-eslint/consistent-type-exports': 'error',
|
|
20
21
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
21
22
|
'@typescript-eslint/default-param-last': 'error',
|
|
22
23
|
'@typescript-eslint/dot-notation': 'error',
|
|
@@ -91,7 +92,6 @@ module.exports = {
|
|
|
91
92
|
'@typescript-eslint/no-extraneous-class': 'error',
|
|
92
93
|
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
|
|
93
94
|
'@typescript-eslint/no-for-in-array': 'error',
|
|
94
|
-
'@typescript-eslint/no-implicit-any-catch': 'error',
|
|
95
95
|
'@typescript-eslint/no-implied-eval': 'error',
|
|
96
96
|
'@typescript-eslint/no-inferrable-types': 'error',
|
|
97
97
|
'@typescript-eslint/no-invalid-this': 'error',
|