@egy186/eslint-config 0.64.0 → 0.68.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 +129 -137
- package/jest.js +55 -0
- package/package.json +13 -10
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,135 +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 }],
|
|
59
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',
|
|
60
71
|
'no-useless-backreference': 'error',
|
|
61
72
|
'require-atomic-updates': 'error',
|
|
62
73
|
'use-isnan': 'error',
|
|
63
74
|
'valid-typeof': 'error'
|
|
64
75
|
},
|
|
65
76
|
...{
|
|
66
|
-
//
|
|
77
|
+
// Suggestions
|
|
67
78
|
'accessor-pairs': 'error',
|
|
68
|
-
'
|
|
79
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
69
80
|
'block-scoped-var': 'error',
|
|
81
|
+
camelcase: ['error', { properties: 'never' }],
|
|
82
|
+
'capitalized-comments': 'error',
|
|
70
83
|
'class-methods-use-this': 'error',
|
|
71
84
|
complexity: ['warn', 12],
|
|
72
85
|
'consistent-return': 'error',
|
|
86
|
+
'consistent-this': 'error',
|
|
73
87
|
curly: ['error', 'all'],
|
|
74
88
|
'default-case': 'error',
|
|
75
89
|
'default-case-last': 'error',
|
|
76
90
|
'default-param-last': 'error',
|
|
77
|
-
'dot-location': ['error', 'property'],
|
|
78
91
|
'dot-notation': 'error',
|
|
79
92
|
eqeqeq: 'error',
|
|
93
|
+
'func-name-matching': 'error',
|
|
94
|
+
'func-names': ['error', 'as-needed'],
|
|
95
|
+
'func-style': ['error', 'expression'],
|
|
80
96
|
'grouped-accessor-pairs': ['error', 'getBeforeSet'],
|
|
81
97
|
'guard-for-in': 'error',
|
|
98
|
+
'id-denylist': 'off',
|
|
99
|
+
'id-length': 'off',
|
|
100
|
+
'id-match': 'off',
|
|
101
|
+
'init-declarations': 'error',
|
|
82
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',
|
|
83
111
|
'no-alert': 'error',
|
|
112
|
+
'no-array-constructor': 'error',
|
|
113
|
+
'no-bitwise': 'off',
|
|
84
114
|
'no-caller': 'error',
|
|
85
115
|
'no-case-declarations': 'error',
|
|
86
|
-
'no-
|
|
116
|
+
'no-confusing-arrow': ['error', { allowParens: false }],
|
|
117
|
+
'no-console': 'warn',
|
|
118
|
+
'no-continue': 'off',
|
|
119
|
+
'no-delete-var': 'error',
|
|
87
120
|
'no-div-regex': 'error',
|
|
88
121
|
'no-else-return': 'error',
|
|
122
|
+
'no-empty': 'error',
|
|
89
123
|
'no-empty-function': 'error',
|
|
90
|
-
'no-empty-pattern': 'error',
|
|
91
124
|
'no-eq-null': 'error',
|
|
92
125
|
'no-eval': 'error',
|
|
93
126
|
'no-extend-native': 'error',
|
|
94
127
|
'no-extra-bind': 'error',
|
|
128
|
+
'no-extra-boolean-cast': 'error',
|
|
95
129
|
'no-extra-label': 'off',
|
|
96
|
-
'no-
|
|
130
|
+
'no-extra-semi': 'error',
|
|
97
131
|
'no-floating-decimal': 'error',
|
|
98
132
|
'no-global-assign': 'error',
|
|
99
133
|
'no-implicit-coercion': 'error',
|
|
100
134
|
'no-implicit-globals': 'error',
|
|
101
135
|
'no-implied-eval': 'error',
|
|
136
|
+
'no-inline-comments': 'off',
|
|
102
137
|
'no-invalid-this': 'error',
|
|
103
138
|
'no-iterator': 'error',
|
|
139
|
+
'no-label-var': 'off',
|
|
104
140
|
'no-labels': 'error',
|
|
105
141
|
'no-lone-blocks': 'error',
|
|
142
|
+
'no-lonely-if': 'error',
|
|
106
143
|
'no-loop-func': 'error',
|
|
107
144
|
'no-magic-numbers': 'off',
|
|
108
|
-
'no-
|
|
145
|
+
'no-mixed-operators': 'error',
|
|
146
|
+
'no-multi-assign': 'error',
|
|
109
147
|
'no-multi-str': 'error',
|
|
148
|
+
'no-negated-condition': 'error',
|
|
149
|
+
'no-nested-ternary': 'error',
|
|
110
150
|
'no-new': 'error',
|
|
111
151
|
'no-new-func': 'error',
|
|
152
|
+
'no-new-object': 'error',
|
|
112
153
|
'no-new-wrappers': 'error',
|
|
113
154
|
'no-nonoctal-decimal-escape': 'error',
|
|
114
155
|
'no-octal': 'error',
|
|
115
156
|
'no-octal-escape': 'error',
|
|
116
157
|
'no-param-reassign': ['error', { props: false }],
|
|
158
|
+
'no-plusplus': 'off',
|
|
117
159
|
'no-proto': 'error',
|
|
118
160
|
'no-redeclare': 'error',
|
|
161
|
+
'no-regex-spaces': 'error',
|
|
162
|
+
'no-restricted-exports': 'off',
|
|
163
|
+
'no-restricted-globals': 'off',
|
|
164
|
+
'no-restricted-imports': 'off',
|
|
119
165
|
'no-restricted-properties': 'off',
|
|
166
|
+
'no-restricted-syntax': 'off',
|
|
120
167
|
'no-return-assign': 'error',
|
|
121
168
|
'no-return-await': 'error',
|
|
122
169
|
'no-script-url': 'error',
|
|
123
|
-
'no-self-assign': 'error',
|
|
124
|
-
'no-self-compare': 'error',
|
|
125
170
|
'no-sequences': 'error',
|
|
171
|
+
'no-shadow': 'error',
|
|
172
|
+
'no-shadow-restricted-names': 'error',
|
|
173
|
+
'no-ternary': 'off',
|
|
126
174
|
'no-throw-literal': 'error',
|
|
127
|
-
'no-
|
|
175
|
+
'no-undef-init': 'error',
|
|
176
|
+
'no-undefined': 'off',
|
|
177
|
+
'no-underscore-dangle': ['error', { allowAfterThis: true }],
|
|
178
|
+
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
128
179
|
'no-unused-expressions': ['error', { enforceForJSX: true }],
|
|
129
180
|
'no-unused-labels': 'off',
|
|
130
181
|
'no-useless-call': 'error',
|
|
131
182
|
'no-useless-catch': 'error',
|
|
183
|
+
'no-useless-computed-key': 'error',
|
|
132
184
|
'no-useless-concat': 'error',
|
|
185
|
+
'no-useless-constructor': 'error',
|
|
133
186
|
'no-useless-escape': 'error',
|
|
187
|
+
'no-useless-rename': 'error',
|
|
134
188
|
'no-useless-return': 'error',
|
|
189
|
+
'no-var': 'error',
|
|
135
190
|
'no-void': 'error',
|
|
136
191
|
'no-warning-comments': 'error',
|
|
137
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',
|
|
138
201
|
'prefer-named-capture-group': 'error',
|
|
202
|
+
'prefer-numeric-literals': 'error',
|
|
203
|
+
'prefer-object-has-own': 'error',
|
|
204
|
+
'prefer-object-spread': 'error',
|
|
139
205
|
'prefer-promise-reject-errors': 'error',
|
|
140
206
|
'prefer-regex-literals': 'error',
|
|
207
|
+
'prefer-rest-params': 'error',
|
|
208
|
+
'prefer-spread': 'error',
|
|
209
|
+
'prefer-template': 'error',
|
|
210
|
+
'quote-props': ['error', 'as-needed'],
|
|
141
211
|
radix: 'error',
|
|
142
212
|
'require-await': 'error',
|
|
143
213
|
'require-unicode-regexp': 'error',
|
|
144
|
-
'
|
|
145
|
-
'
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
// Strict Mode
|
|
150
|
-
strict: ['error', 'safe']
|
|
151
|
-
},
|
|
152
|
-
...{
|
|
153
|
-
// Variables
|
|
154
|
-
'init-declarations': 'error',
|
|
155
|
-
'no-delete-var': 'error',
|
|
156
|
-
'no-label-var': 'off',
|
|
157
|
-
'no-restricted-globals': 'off',
|
|
158
|
-
'no-shadow': 'error',
|
|
159
|
-
'no-shadow-restricted-names': 'error',
|
|
160
|
-
'no-undef': 'error',
|
|
161
|
-
'no-undef-init': 'error',
|
|
162
|
-
'no-undefined': 'off',
|
|
163
|
-
'no-unused-vars': [
|
|
214
|
+
'require-yield': 'error',
|
|
215
|
+
'sort-imports': 'error',
|
|
216
|
+
'sort-keys': 'error',
|
|
217
|
+
'sort-vars': 'error',
|
|
218
|
+
'spaced-comment': [
|
|
164
219
|
'error',
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
caughtErrors: 'all',
|
|
168
|
-
vars: 'all'
|
|
169
|
-
}
|
|
220
|
+
'always',
|
|
221
|
+
{ block: { balanced: true } }
|
|
170
222
|
],
|
|
171
|
-
|
|
223
|
+
strict: ['error', 'safe'],
|
|
224
|
+
'symbol-description': 'error',
|
|
225
|
+
'vars-on-top': 'error',
|
|
226
|
+
yoda: 'error'
|
|
172
227
|
},
|
|
173
228
|
...{
|
|
174
|
-
//
|
|
229
|
+
// Layout & Formatting
|
|
175
230
|
'array-bracket-newline': 'error',
|
|
176
231
|
'array-bracket-spacing': ['error', 'never'],
|
|
177
232
|
'array-element-newline': [
|
|
@@ -181,14 +236,20 @@ module.exports = {
|
|
|
181
236
|
multiline: true
|
|
182
237
|
}
|
|
183
238
|
],
|
|
239
|
+
'arrow-parens': ['error', 'as-needed'],
|
|
240
|
+
'arrow-spacing': [
|
|
241
|
+
'error',
|
|
242
|
+
{
|
|
243
|
+
after: true,
|
|
244
|
+
before: true
|
|
245
|
+
}
|
|
246
|
+
],
|
|
184
247
|
'block-spacing': ['error', 'always'],
|
|
185
248
|
'brace-style': [
|
|
186
249
|
'error',
|
|
187
250
|
'1tbs',
|
|
188
251
|
{ allowSingleLine: false }
|
|
189
252
|
],
|
|
190
|
-
camelcase: ['error', { properties: 'never' }],
|
|
191
|
-
'capitalized-comments': 'error',
|
|
192
253
|
'comma-dangle': ['error', 'never'],
|
|
193
254
|
'comma-spacing': [
|
|
194
255
|
'error',
|
|
@@ -199,17 +260,12 @@ module.exports = {
|
|
|
199
260
|
],
|
|
200
261
|
'comma-style': ['error', 'last'],
|
|
201
262
|
'computed-property-spacing': ['error', 'never'],
|
|
202
|
-
'
|
|
263
|
+
'dot-location': ['error', 'property'],
|
|
203
264
|
'eol-last': 'error',
|
|
204
265
|
'func-call-spacing': ['error', 'never'],
|
|
205
|
-
'func-name-matching': 'error',
|
|
206
|
-
'func-names': ['error', 'as-needed'],
|
|
207
|
-
'func-style': ['error', 'expression'],
|
|
208
266
|
'function-call-argument-newline': ['error', 'consistent'],
|
|
209
267
|
'function-paren-newline': ['error', 'multiline'],
|
|
210
|
-
'
|
|
211
|
-
'id-length': 'off',
|
|
212
|
-
'id-match': 'off',
|
|
268
|
+
'generator-star-spacing': ['error', 'after'],
|
|
213
269
|
'implicit-arrow-linebreak': ['error', 'beside'],
|
|
214
270
|
indent: [
|
|
215
271
|
'error',
|
|
@@ -238,27 +294,21 @@ module.exports = {
|
|
|
238
294
|
'linebreak-style': 'error',
|
|
239
295
|
'lines-around-comment': 'off',
|
|
240
296
|
'lines-between-class-members': 'error',
|
|
241
|
-
'max-depth': 'error',
|
|
242
297
|
'max-len': 'off',
|
|
243
|
-
'max-lines': 'warn',
|
|
244
|
-
'max-lines-per-function': 'warn',
|
|
245
|
-
'max-nested-callbacks': 'error',
|
|
246
|
-
'max-params': 'off',
|
|
247
|
-
'max-statements': 'warn',
|
|
248
298
|
'max-statements-per-line': 'error',
|
|
249
|
-
'multiline-comment-style': 'error',
|
|
250
299
|
'multiline-ternary': ['error', 'always-multiline'],
|
|
251
|
-
'new-cap': 'error',
|
|
252
300
|
'new-parens': 'error',
|
|
253
301
|
'newline-per-chained-call': 'off',
|
|
254
|
-
'no-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
302
|
+
'no-extra-parens': [
|
|
303
|
+
'error',
|
|
304
|
+
'all',
|
|
305
|
+
{
|
|
306
|
+
ignoreJSX: 'multi-line',
|
|
307
|
+
nestedBinaryExpressions: false
|
|
308
|
+
}
|
|
309
|
+
],
|
|
260
310
|
'no-mixed-spaces-and-tabs': 'error',
|
|
261
|
-
'no-multi-
|
|
311
|
+
'no-multi-spaces': 'error',
|
|
262
312
|
'no-multiple-empty-lines': [
|
|
263
313
|
'error',
|
|
264
314
|
{
|
|
@@ -267,35 +317,22 @@ module.exports = {
|
|
|
267
317
|
maxEOF: 1
|
|
268
318
|
}
|
|
269
319
|
],
|
|
270
|
-
'no-negated-condition': 'error',
|
|
271
|
-
'no-nested-ternary': 'error',
|
|
272
|
-
'no-new-object': 'error',
|
|
273
|
-
'no-plusplus': 'off',
|
|
274
|
-
'no-restricted-syntax': 'off',
|
|
275
320
|
'no-tabs': 'off',
|
|
276
|
-
'no-ternary': 'off',
|
|
277
321
|
'no-trailing-spaces': 'error',
|
|
278
|
-
'no-underscore-dangle': ['error', { allowAfterThis: true }],
|
|
279
|
-
'no-unneeded-ternary': ['error', { defaultAssignment: false }],
|
|
280
322
|
'no-whitespace-before-property': 'error',
|
|
281
323
|
'nonblock-statement-body-position': 'error',
|
|
282
324
|
'object-curly-newline': ['error', { multiline: true }],
|
|
283
325
|
'object-curly-spacing': ['error', 'always'],
|
|
284
326
|
'object-property-newline': 'error',
|
|
285
|
-
'one-var': ['error', 'never'],
|
|
286
|
-
'one-var-declaration-per-line': 'off',
|
|
287
|
-
'operator-assignment': 'off',
|
|
288
327
|
'operator-linebreak': ['error', 'before'],
|
|
289
328
|
'padded-blocks': ['error', 'never'],
|
|
290
329
|
'padding-line-between-statements': 'error',
|
|
291
|
-
'prefer-exponentiation-operator': 'error',
|
|
292
|
-
'prefer-object-spread': 'error',
|
|
293
|
-
'quote-props': ['error', 'as-needed'],
|
|
294
330
|
quotes: [
|
|
295
331
|
'error',
|
|
296
332
|
'single',
|
|
297
333
|
'avoid-escape'
|
|
298
334
|
],
|
|
335
|
+
'rest-spread-spacing': ['error', 'never'],
|
|
299
336
|
semi: ['error', 'always'],
|
|
300
337
|
'semi-spacing': [
|
|
301
338
|
'error',
|
|
@@ -305,62 +342,17 @@ module.exports = {
|
|
|
305
342
|
}
|
|
306
343
|
],
|
|
307
344
|
'semi-style': ['error', 'last'],
|
|
308
|
-
'sort-keys': 'error',
|
|
309
|
-
'sort-vars': 'error',
|
|
310
345
|
'space-before-blocks': 'error',
|
|
311
346
|
'space-before-function-paren': ['error', 'always'],
|
|
312
347
|
'space-in-parens': ['error', 'never'],
|
|
313
348
|
'space-infix-ops': 'error',
|
|
314
349
|
'space-unary-ops': 'error',
|
|
315
|
-
'spaced-comment': [
|
|
316
|
-
'error',
|
|
317
|
-
'always',
|
|
318
|
-
{ block: { balanced: true } }
|
|
319
|
-
],
|
|
320
350
|
'switch-colon-spacing': 'error',
|
|
351
|
+
'template-curly-spacing': ['error', 'never'],
|
|
321
352
|
'template-tag-spacing': ['error', 'never'],
|
|
322
353
|
'unicode-bom': ['error', 'never'],
|
|
323
|
-
'wrap-
|
|
324
|
-
|
|
325
|
-
...{
|
|
326
|
-
// ECMAScript 6
|
|
327
|
-
'arrow-body-style': ['error', 'as-needed'],
|
|
328
|
-
'arrow-parens': ['error', 'as-needed'],
|
|
329
|
-
'arrow-spacing': [
|
|
330
|
-
'error',
|
|
331
|
-
{
|
|
332
|
-
after: true,
|
|
333
|
-
before: true
|
|
334
|
-
}
|
|
335
|
-
],
|
|
336
|
-
'constructor-super': 'error',
|
|
337
|
-
'generator-star-spacing': ['error', 'after'],
|
|
338
|
-
'no-class-assign': 'error',
|
|
339
|
-
'no-confusing-arrow': ['error', { allowParens: false }],
|
|
340
|
-
'no-const-assign': 'error',
|
|
341
|
-
'no-dupe-class-members': 'error',
|
|
342
|
-
'no-duplicate-imports': 'error',
|
|
343
|
-
'no-new-symbol': 'error',
|
|
344
|
-
'no-restricted-exports': 'off',
|
|
345
|
-
'no-restricted-imports': 'off',
|
|
346
|
-
'no-this-before-super': 'error',
|
|
347
|
-
'no-useless-computed-key': 'error',
|
|
348
|
-
'no-useless-constructor': 'error',
|
|
349
|
-
'no-useless-rename': 'error',
|
|
350
|
-
'no-var': 'error',
|
|
351
|
-
'object-shorthand': ['error', 'always'],
|
|
352
|
-
'prefer-arrow-callback': 'error',
|
|
353
|
-
'prefer-const': 'error',
|
|
354
|
-
'prefer-destructuring': 'error',
|
|
355
|
-
'prefer-numeric-literals': 'error',
|
|
356
|
-
'prefer-rest-params': 'error',
|
|
357
|
-
'prefer-spread': 'error',
|
|
358
|
-
'prefer-template': 'error',
|
|
359
|
-
'require-yield': 'error',
|
|
360
|
-
'rest-spread-spacing': ['error', 'never'],
|
|
361
|
-
'sort-imports': 'error',
|
|
362
|
-
'symbol-description': 'error',
|
|
363
|
-
'template-curly-spacing': ['error', 'never'],
|
|
354
|
+
'wrap-iife': ['error', 'inside'],
|
|
355
|
+
'wrap-regex': 'off',
|
|
364
356
|
'yield-star-spacing': [
|
|
365
357
|
'error',
|
|
366
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/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.68.0",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
@@ -10,17 +10,18 @@
|
|
|
10
10
|
"lodash": "^4.17.21"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@typescript-eslint/eslint-plugin": "~5.
|
|
14
|
-
"@typescript-eslint/parser": "~5.
|
|
15
|
-
"eslint": "~8.
|
|
16
|
-
"eslint-plugin-import": "~2.25.
|
|
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": "~26.0.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": "~7.28.0",
|
|
20
21
|
"eslint-plugin-react-hooks": "~4.3.0",
|
|
21
|
-
"husky": "^7.0.
|
|
22
|
+
"husky": "^7.0.4",
|
|
22
23
|
"require-dir": "^1.2.0",
|
|
23
|
-
"typescript": "^4.
|
|
24
|
+
"typescript": "^4.5.4"
|
|
24
25
|
},
|
|
25
26
|
"engines": {
|
|
26
27
|
"node": ">=12.22.0"
|
|
@@ -29,6 +30,7 @@
|
|
|
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",
|
|
@@ -45,8 +47,9 @@
|
|
|
45
47
|
"peerDependencies": {
|
|
46
48
|
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
47
49
|
"@typescript-eslint/parser": "^5.3.1",
|
|
48
|
-
"eslint": "^8.
|
|
50
|
+
"eslint": "^8.5.0",
|
|
49
51
|
"eslint-plugin-import": "^2.25.3",
|
|
52
|
+
"eslint-plugin-jest": "^26.0.0",
|
|
50
53
|
"eslint-plugin-jsdoc": "^37.0.3",
|
|
51
54
|
"eslint-plugin-node": "^11.1.0",
|
|
52
55
|
"eslint-plugin-react": "^7.27.0",
|