eslint-config-seekingalpha-base 12.0.2 → 12.2.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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -16,12 +16,31 @@ export default {
|
|
|
16
16
|
},
|
|
17
17
|
],
|
|
18
18
|
|
|
19
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/class-reference-in-static-methods.md
|
|
20
|
+
'unicorn/class-reference-in-static-methods': [
|
|
21
|
+
'error',
|
|
22
|
+
{ preferThis: true },
|
|
23
|
+
],
|
|
24
|
+
|
|
25
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/comment-content.md
|
|
26
|
+
'unicorn/comment-content': 'error',
|
|
27
|
+
|
|
19
28
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md
|
|
20
29
|
'unicorn/consistent-assert': 'error',
|
|
21
30
|
|
|
31
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-boolean-name.md
|
|
32
|
+
'unicorn/consistent-boolean-name': 'off',
|
|
33
|
+
|
|
34
|
+
// prefer @typescript-eslint/member-ordering
|
|
35
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-class-member-order.md
|
|
36
|
+
'unicorn/consistent-class-member-order': 'off',
|
|
37
|
+
|
|
22
38
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-compound-words.md
|
|
23
39
|
'unicorn/consistent-compound-words': 'off',
|
|
24
40
|
|
|
41
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-conditional-object-spread.md
|
|
42
|
+
'unicorn/consistent-conditional-object-spread': ['error', 'logical'],
|
|
43
|
+
|
|
25
44
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md
|
|
26
45
|
'unicorn/consistent-date-clone': 'error',
|
|
27
46
|
|
|
@@ -34,18 +53,40 @@ export default {
|
|
|
34
53
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md
|
|
35
54
|
'unicorn/consistent-existence-index-check': 'error',
|
|
36
55
|
|
|
56
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-export-decorator-position.md
|
|
57
|
+
'unicorn/consistent-export-decorator-position': 'error',
|
|
58
|
+
|
|
37
59
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/consistent-function-scoping.md
|
|
38
60
|
'unicorn/consistent-function-scoping': 'error',
|
|
39
61
|
|
|
62
|
+
// prefer func-style
|
|
63
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-style.md
|
|
64
|
+
'unicorn/consistent-function-style': 'off',
|
|
65
|
+
|
|
40
66
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-json-file-read.md
|
|
41
67
|
'unicorn/consistent-json-file-read': 'error',
|
|
42
68
|
|
|
69
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-optional-chaining.md
|
|
70
|
+
'unicorn/consistent-optional-chaining': 'error',
|
|
71
|
+
|
|
43
72
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-template-literal-escape.md
|
|
44
73
|
'unicorn/consistent-template-literal-escape': 'error',
|
|
45
74
|
|
|
75
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-tuple-labels.md
|
|
76
|
+
'unicorn/consistent-tuple-labels': 'error',
|
|
77
|
+
|
|
46
78
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/custom-error-definition.md
|
|
47
79
|
'unicorn/custom-error-definition': 'error',
|
|
48
80
|
|
|
81
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/default-export-style.md
|
|
82
|
+
'unicorn/default-export-style': [
|
|
83
|
+
'error',
|
|
84
|
+
{ classes: 'separate', functions: 'separate' },
|
|
85
|
+
],
|
|
86
|
+
|
|
87
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-dataset.md
|
|
88
|
+
'unicorn/dom-node-dataset': 'error',
|
|
89
|
+
|
|
49
90
|
/*
|
|
50
91
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/empty-brace-spaces.md
|
|
51
92
|
* Disabled to work with oxfmt
|
|
@@ -64,18 +105,33 @@ export default {
|
|
|
64
105
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/explicit-length-check.md
|
|
65
106
|
'unicorn/explicit-length-check': 'off',
|
|
66
107
|
|
|
108
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-timer-delay.md
|
|
109
|
+
'unicorn/explicit-timer-delay': ['error', 'always'],
|
|
110
|
+
|
|
67
111
|
/*
|
|
68
112
|
* check if can replace plugin-filenames
|
|
69
113
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md
|
|
70
114
|
*/
|
|
71
115
|
'unicorn/filename-case': 'off',
|
|
72
116
|
|
|
117
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/id-match.md
|
|
118
|
+
'unicorn/id-match': 'off',
|
|
119
|
+
|
|
73
120
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md
|
|
74
121
|
'unicorn/import-style': 'off',
|
|
75
122
|
|
|
76
123
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/isolated-functions.md
|
|
77
124
|
'unicorn/isolated-functions': 'off',
|
|
78
125
|
|
|
126
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/logical-assignment-operators.md
|
|
127
|
+
'unicorn/logical-assignment-operators': 'error',
|
|
128
|
+
|
|
129
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/max-nested-calls.md
|
|
130
|
+
'unicorn/max-nested-calls': 'off',
|
|
131
|
+
|
|
132
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/name-replacements.md
|
|
133
|
+
'unicorn/name-replacements': 'off',
|
|
134
|
+
|
|
79
135
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/new-for-builtins.md
|
|
80
136
|
'unicorn/new-for-builtins': 'error',
|
|
81
137
|
|
|
@@ -85,6 +141,9 @@ export default {
|
|
|
85
141
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md
|
|
86
142
|
'unicorn/no-accessor-recursion': 'error',
|
|
87
143
|
|
|
144
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accidental-bitwise-operator.md
|
|
145
|
+
'unicorn/no-accidental-bitwise-operator': 'error',
|
|
146
|
+
|
|
88
147
|
/*
|
|
89
148
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md
|
|
90
149
|
* Duplicates import/no-anonymous-default-export
|
|
@@ -94,6 +153,9 @@ export default {
|
|
|
94
153
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-callback-reference.md
|
|
95
154
|
'unicorn/no-array-callback-reference': 'error',
|
|
96
155
|
|
|
156
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-concat-in-loop.md
|
|
157
|
+
'unicorn/no-array-concat-in-loop': 'error',
|
|
158
|
+
|
|
97
159
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-fill-with-reference-type.md
|
|
98
160
|
'unicorn/no-array-fill-with-reference-type': 'error',
|
|
99
161
|
|
|
@@ -103,21 +165,33 @@ export default {
|
|
|
103
165
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-from-fill.md
|
|
104
166
|
'unicorn/no-array-from-fill': 'error',
|
|
105
167
|
|
|
168
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-front-mutation.md
|
|
169
|
+
'unicorn/no-array-front-mutation': 'off',
|
|
170
|
+
|
|
106
171
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md
|
|
107
172
|
'unicorn/no-array-method-this-argument': 'error',
|
|
108
173
|
|
|
109
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md
|
|
110
|
-
'unicorn/no-array-sort': 'error',
|
|
111
|
-
|
|
112
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md
|
|
113
|
-
'unicorn/prefer-single-call': 'error',
|
|
114
|
-
|
|
115
174
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-array-reduce.md
|
|
116
175
|
'unicorn/no-array-reduce': 'off',
|
|
117
176
|
|
|
118
177
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reverse.md
|
|
119
178
|
'unicorn/no-array-reverse': 'error',
|
|
120
179
|
|
|
180
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md
|
|
181
|
+
'unicorn/no-array-sort': 'error',
|
|
182
|
+
|
|
183
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort-for-min-max.md
|
|
184
|
+
'unicorn/no-array-sort-for-min-max': 'error',
|
|
185
|
+
|
|
186
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-splice.md
|
|
187
|
+
'unicorn/no-array-splice': 'error',
|
|
188
|
+
|
|
189
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
190
|
+
'unicorn/no-asterisk-prefix-in-documentation-comments': 'error',
|
|
191
|
+
|
|
192
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-async-promise-finally.md
|
|
193
|
+
'unicorn/no-async-promise-finally': 'error',
|
|
194
|
+
|
|
121
195
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
|
|
122
196
|
'unicorn/no-await-expression-member': 'error',
|
|
123
197
|
|
|
@@ -127,45 +201,100 @@ export default {
|
|
|
127
201
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-blob-to-file.md
|
|
128
202
|
'unicorn/no-blob-to-file': 'error',
|
|
129
203
|
|
|
204
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-boolean-sort-comparator.md
|
|
205
|
+
'unicorn/no-boolean-sort-comparator': 'error',
|
|
206
|
+
|
|
207
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-break-in-nested-loop.md
|
|
208
|
+
'unicorn/no-break-in-nested-loop': 'error',
|
|
209
|
+
|
|
130
210
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-canvas-to-image.md
|
|
131
211
|
'unicorn/no-canvas-to-image': 'error',
|
|
132
212
|
|
|
213
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-chained-comparison.md
|
|
214
|
+
'unicorn/no-chained-comparison': 'error',
|
|
215
|
+
|
|
216
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-collection-bracket-access.md
|
|
217
|
+
'unicorn/no-collection-bracket-access': 'error',
|
|
218
|
+
|
|
219
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-computed-property-existence-check.md
|
|
220
|
+
'unicorn/no-computed-property-existence-check': 'off',
|
|
221
|
+
|
|
133
222
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-confusing-array-splice.md
|
|
134
223
|
'unicorn/no-confusing-array-splice': 'error',
|
|
135
224
|
|
|
225
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-confusing-array-with.md
|
|
226
|
+
'unicorn/no-confusing-array-with': 'error',
|
|
227
|
+
|
|
136
228
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-console-spaces.md
|
|
137
229
|
'unicorn/no-console-spaces': 'error',
|
|
138
230
|
|
|
231
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-constant-zero-expression.md
|
|
232
|
+
'unicorn/no-constant-zero-expression': 'error',
|
|
233
|
+
|
|
234
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-declarations-before-early-exit.md
|
|
235
|
+
'unicorn/no-declarations-before-early-exit': 'error',
|
|
236
|
+
|
|
139
237
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md
|
|
140
238
|
'unicorn/no-document-cookie': 'error',
|
|
141
239
|
|
|
240
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-double-comparison.md
|
|
241
|
+
'unicorn/no-double-comparison': 'error',
|
|
242
|
+
|
|
243
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-duplicate-if-branches.md
|
|
244
|
+
'unicorn/no-duplicate-if-branches': 'error',
|
|
245
|
+
|
|
246
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-duplicate-logical-operands.md
|
|
247
|
+
'unicorn/no-duplicate-logical-operands': 'error',
|
|
248
|
+
|
|
249
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-duplicate-loops.md
|
|
250
|
+
'unicorn/no-duplicate-loops': 'error',
|
|
251
|
+
|
|
142
252
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-duplicate-set-values.md
|
|
143
253
|
'unicorn/no-duplicate-set-values': 'error',
|
|
144
254
|
|
|
145
255
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md
|
|
146
256
|
'unicorn/no-empty-file': 'error',
|
|
147
257
|
|
|
258
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-error-property-assignment.md
|
|
259
|
+
'unicorn/no-error-property-assignment': 'error',
|
|
260
|
+
|
|
148
261
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-exports-in-scripts.md
|
|
149
262
|
'unicorn/no-exports-in-scripts': 'error',
|
|
150
263
|
|
|
151
264
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-for-loop.md
|
|
152
265
|
'unicorn/no-for-loop': 'error',
|
|
153
266
|
|
|
267
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-global-object-property-assignment.md
|
|
268
|
+
'unicorn/no-global-object-property-assignment': 'error',
|
|
269
|
+
|
|
154
270
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-hex-escape.md
|
|
155
271
|
'unicorn/no-hex-escape': 'error',
|
|
156
272
|
|
|
157
273
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md
|
|
158
274
|
'unicorn/no-immediate-mutation': 'error',
|
|
159
275
|
|
|
276
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-impossible-length-comparison.md
|
|
277
|
+
'unicorn/no-impossible-length-comparison': 'error',
|
|
278
|
+
|
|
160
279
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-incorrect-query-selector.md
|
|
161
280
|
'unicorn/no-incorrect-query-selector': 'error',
|
|
162
281
|
|
|
282
|
+
// we use custom templates for API calls
|
|
283
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-incorrect-template-string-interpolation.md
|
|
284
|
+
'unicorn/no-incorrect-template-string-interpolation': 'off',
|
|
285
|
+
|
|
163
286
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-instanceof-array.md
|
|
164
287
|
'unicorn/no-instanceof-array': 'error',
|
|
165
288
|
|
|
166
289
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md
|
|
167
290
|
'unicorn/no-instanceof-builtins': 'error',
|
|
168
291
|
|
|
292
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-argument-count.md
|
|
293
|
+
'unicorn/no-invalid-argument-count': 'error',
|
|
294
|
+
|
|
295
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-character-comparison.md
|
|
296
|
+
'unicorn/no-invalid-character-comparison': 'error',
|
|
297
|
+
|
|
169
298
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md
|
|
170
299
|
'unicorn/no-invalid-fetch-options': 'error',
|
|
171
300
|
|
|
@@ -175,6 +304,9 @@ export default {
|
|
|
175
304
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md
|
|
176
305
|
'unicorn/no-invalid-remove-event-listener': 'error',
|
|
177
306
|
|
|
307
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
308
|
+
'unicorn/no-invalid-well-known-symbol-methods': 'error',
|
|
309
|
+
|
|
178
310
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-keyword-prefix.md
|
|
179
311
|
'unicorn/no-keyword-prefix': [
|
|
180
312
|
'error',
|
|
@@ -187,20 +319,42 @@ export default {
|
|
|
187
319
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-late-current-target-access.md
|
|
188
320
|
'unicorn/no-late-current-target-access': 'error',
|
|
189
321
|
|
|
322
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-late-event-control.md
|
|
323
|
+
'unicorn/no-late-event-control': 'error',
|
|
324
|
+
|
|
190
325
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-lonely-if.md
|
|
191
326
|
'unicorn/no-lonely-if': 'error',
|
|
192
327
|
|
|
328
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-loop-iterable-mutation.md
|
|
329
|
+
'unicorn/no-loop-iterable-mutation': 'error',
|
|
330
|
+
|
|
193
331
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md
|
|
194
332
|
'unicorn/no-magic-array-flat-depth': 'error',
|
|
195
333
|
|
|
196
334
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-manually-wrapped-comments.md
|
|
197
335
|
'unicorn/no-manually-wrapped-comments': 'error',
|
|
198
336
|
|
|
337
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-mismatched-map-key.md
|
|
338
|
+
'unicorn/no-mismatched-map-key': 'error',
|
|
339
|
+
|
|
340
|
+
// oxlint-disable-next-line @cspell/spellchecker
|
|
341
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-misrefactored-assignment.md
|
|
342
|
+
'unicorn/no-misrefactored-assignment': 'error',
|
|
343
|
+
|
|
344
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-missing-local-resource.md
|
|
345
|
+
'unicorn/no-missing-local-resource': 'off',
|
|
346
|
+
|
|
347
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-multiple-promise-resolver-calls.md
|
|
348
|
+
'unicorn/no-multiple-promise-resolver-calls': 'error',
|
|
349
|
+
|
|
199
350
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md
|
|
200
351
|
'unicorn/no-named-default': 'error',
|
|
201
352
|
|
|
202
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-
|
|
203
|
-
'unicorn/no-
|
|
353
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-array-predicate.md
|
|
354
|
+
'unicorn/no-negated-array-predicate': 'error',
|
|
355
|
+
|
|
356
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-comparison.md
|
|
357
|
+
'unicorn/no-negated-comparison': 'error',
|
|
204
358
|
|
|
205
359
|
/*
|
|
206
360
|
* Disabled in favour of native ESLint no-negated-condition rule
|
|
@@ -208,6 +362,9 @@ export default {
|
|
|
208
362
|
*/
|
|
209
363
|
'unicorn/no-negated-condition': 'off',
|
|
210
364
|
|
|
365
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md
|
|
366
|
+
'unicorn/no-negation-in-equality-check': 'error',
|
|
367
|
+
|
|
211
368
|
/*
|
|
212
369
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-nested-ternary.md
|
|
213
370
|
* Disabled in favour of ESLint's rule and it does not work with Prettier
|
|
@@ -221,27 +378,49 @@ export default {
|
|
|
221
378
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-new-buffer.md
|
|
222
379
|
'unicorn/no-new-buffer': 'error',
|
|
223
380
|
|
|
381
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-non-function-verb-prefix.md
|
|
382
|
+
'unicorn/no-non-function-verb-prefix': 'off',
|
|
383
|
+
|
|
384
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nonstandard-builtin-properties.md
|
|
385
|
+
'unicorn/no-nonstandard-builtin-properties': 'error',
|
|
386
|
+
|
|
224
387
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md
|
|
225
388
|
'unicorn/no-null': 'off',
|
|
226
389
|
|
|
227
390
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-object-as-default-parameter.md
|
|
228
391
|
'unicorn/no-object-as-default-parameter': 'error',
|
|
229
392
|
|
|
393
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-object-methods-with-collections.md
|
|
394
|
+
'unicorn/no-object-methods-with-collections': 'error',
|
|
395
|
+
|
|
396
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
397
|
+
'unicorn/no-optional-chaining-on-undeclared-variable': 'error',
|
|
398
|
+
|
|
230
399
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-process-exit.md
|
|
231
400
|
'unicorn/no-process-exit': 'error',
|
|
232
401
|
|
|
233
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-
|
|
234
|
-
'unicorn/no-
|
|
402
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-redundant-comparison.md
|
|
403
|
+
'unicorn/no-redundant-comparison': 'error',
|
|
235
404
|
|
|
236
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-
|
|
237
|
-
'unicorn/no-
|
|
405
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-return-array-push.md
|
|
406
|
+
'unicorn/no-return-array-push': 'error',
|
|
238
407
|
|
|
239
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-
|
|
240
|
-
'unicorn/no-
|
|
408
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-selector-as-dom-name.md
|
|
409
|
+
'unicorn/no-selector-as-dom-name': 'error',
|
|
410
|
+
|
|
411
|
+
// handled by stylelint
|
|
412
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-shorthand-property-overrides.md
|
|
413
|
+
'unicorn/no-shorthand-property-overrides': 'off',
|
|
414
|
+
|
|
415
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md
|
|
416
|
+
'unicorn/no-single-promise-in-promise-methods': 'error',
|
|
241
417
|
|
|
242
418
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md
|
|
243
419
|
'unicorn/no-static-only-class': 'error',
|
|
244
420
|
|
|
421
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-subtraction-comparison.md
|
|
422
|
+
'unicorn/no-subtraction-comparison': 'error',
|
|
423
|
+
|
|
245
424
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md
|
|
246
425
|
'unicorn/no-thenable': 'error',
|
|
247
426
|
|
|
@@ -251,11 +430,24 @@ export default {
|
|
|
251
430
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-outside-of-class.md
|
|
252
431
|
'unicorn/no-this-outside-of-class': 'off',
|
|
253
432
|
|
|
433
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-top-level-assignment-in-function.md
|
|
434
|
+
'unicorn/no-top-level-assignment-in-function': 'off',
|
|
435
|
+
|
|
436
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-top-level-side-effects.md
|
|
437
|
+
'unicorn/no-top-level-side-effects': 'error',
|
|
438
|
+
|
|
439
|
+
// handled by stylelint
|
|
440
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-transition-all.md
|
|
441
|
+
'unicorn/no-transition-all': 'off',
|
|
442
|
+
|
|
254
443
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md
|
|
255
444
|
'unicorn/no-typeof-undefined': 'error',
|
|
256
445
|
|
|
257
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-
|
|
258
|
-
'unicorn/no-
|
|
446
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-uncalled-method.md
|
|
447
|
+
'unicorn/no-uncalled-method': 'error',
|
|
448
|
+
|
|
449
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-undeclared-class-members.md
|
|
450
|
+
'unicorn/no-undeclared-class-members': 'error',
|
|
259
451
|
|
|
260
452
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-flat-depth.md
|
|
261
453
|
'unicorn/no-unnecessary-array-flat-depth': 'error',
|
|
@@ -263,32 +455,94 @@ export default {
|
|
|
263
455
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-splice-count.md
|
|
264
456
|
'unicorn/no-unnecessary-array-splice-count': 'error',
|
|
265
457
|
|
|
458
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md
|
|
459
|
+
'unicorn/no-unnecessary-await': 'error',
|
|
460
|
+
|
|
461
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-boolean-comparison.md
|
|
462
|
+
'unicorn/no-unnecessary-boolean-comparison': 'error',
|
|
463
|
+
|
|
464
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-fetch-options.md
|
|
465
|
+
'unicorn/no-unnecessary-fetch-options': 'error',
|
|
466
|
+
|
|
467
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-global-this.md
|
|
468
|
+
'unicorn/no-unnecessary-global-this': 'error',
|
|
469
|
+
|
|
470
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-nested-ternary.md
|
|
471
|
+
'unicorn/no-unnecessary-nested-ternary': 'error',
|
|
472
|
+
|
|
266
473
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md
|
|
267
474
|
'unicorn/no-unnecessary-polyfills': 'error',
|
|
268
475
|
|
|
476
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md
|
|
477
|
+
'unicorn/no-unnecessary-slice-end': 'error',
|
|
478
|
+
|
|
479
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-splice.md
|
|
480
|
+
'unicorn/no-unnecessary-splice': 'error',
|
|
481
|
+
|
|
482
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-string-trim.md
|
|
483
|
+
'unicorn/no-unnecessary-string-trim': 'error',
|
|
484
|
+
|
|
269
485
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unreadable-array-destructuring.md
|
|
270
486
|
'unicorn/no-unreadable-array-destructuring': 'error',
|
|
271
487
|
|
|
488
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-for-of-expression.md
|
|
489
|
+
'unicorn/no-unreadable-for-of-expression': 'error',
|
|
490
|
+
|
|
272
491
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md
|
|
273
492
|
'unicorn/no-unreadable-iife': 'error',
|
|
274
493
|
|
|
494
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-new-expression.md
|
|
495
|
+
'unicorn/no-unreadable-new-expression': 'off',
|
|
496
|
+
|
|
497
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-object-destructuring.md
|
|
498
|
+
'unicorn/no-unreadable-object-destructuring': 'off',
|
|
499
|
+
|
|
500
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-buffer-conversion.md
|
|
501
|
+
'unicorn/no-unsafe-buffer-conversion': 'off',
|
|
502
|
+
|
|
503
|
+
// does not support older browsers
|
|
504
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-dom-html.md
|
|
505
|
+
'unicorn/no-unsafe-dom-html': 'off',
|
|
506
|
+
|
|
507
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
508
|
+
'unicorn/no-unsafe-promise-all-settled-values': 'error',
|
|
509
|
+
|
|
510
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-property-key.md
|
|
511
|
+
'unicorn/no-unsafe-property-key': 'off',
|
|
512
|
+
|
|
513
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unsafe-string-replacement.md
|
|
514
|
+
'unicorn/no-unsafe-string-replacement': 'off',
|
|
515
|
+
|
|
275
516
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-array-method-return.md
|
|
276
517
|
'unicorn/no-unused-array-method-return': 'error',
|
|
277
518
|
|
|
519
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-unused-properties.md
|
|
520
|
+
'unicorn/no-unused-properties': 'error',
|
|
521
|
+
|
|
522
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-boolean-cast.md
|
|
523
|
+
'unicorn/no-useless-boolean-cast': 'error',
|
|
524
|
+
|
|
525
|
+
// conflict with translation String()
|
|
526
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-coercion.md
|
|
527
|
+
'unicorn/no-useless-coercion': 'off',
|
|
528
|
+
|
|
278
529
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md
|
|
279
530
|
'unicorn/no-useless-collection-argument': 'error',
|
|
280
531
|
|
|
281
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-
|
|
282
|
-
'unicorn/no-useless-
|
|
532
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-compound-assignment.md
|
|
533
|
+
'unicorn/no-useless-compound-assignment': 'error',
|
|
283
534
|
|
|
284
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
285
|
-
'unicorn/no-
|
|
535
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-concat.md
|
|
536
|
+
'unicorn/no-useless-concat': 'error',
|
|
286
537
|
|
|
287
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-
|
|
288
|
-
'unicorn/no-useless-
|
|
538
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-continue.md
|
|
539
|
+
'unicorn/no-useless-continue': 'error',
|
|
289
540
|
|
|
290
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-
|
|
291
|
-
'unicorn/no-useless-
|
|
541
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-delete-check.md
|
|
542
|
+
'unicorn/no-useless-delete-check': 'error',
|
|
543
|
+
|
|
544
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-else.md
|
|
545
|
+
'unicorn/no-useless-else': 'error',
|
|
292
546
|
|
|
293
547
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-error-capture-stack-trace.md
|
|
294
548
|
'unicorn/no-useless-error-capture-stack-trace': 'error',
|
|
@@ -296,15 +550,42 @@ export default {
|
|
|
296
550
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md
|
|
297
551
|
'unicorn/no-useless-fallback-in-spread': 'error',
|
|
298
552
|
|
|
553
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-iterator-to-array.md
|
|
554
|
+
'unicorn/no-useless-iterator-to-array': 'error',
|
|
555
|
+
|
|
299
556
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md
|
|
300
557
|
'unicorn/no-useless-length-check': 'error',
|
|
301
558
|
|
|
559
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-logical-operand.md
|
|
560
|
+
'unicorn/no-useless-logical-operand': 'error',
|
|
561
|
+
|
|
562
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-override.md
|
|
563
|
+
'unicorn/no-useless-override': 'error',
|
|
564
|
+
|
|
302
565
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md
|
|
303
566
|
'unicorn/no-useless-promise-resolve-reject': 'error',
|
|
304
567
|
|
|
568
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-re-export.md
|
|
569
|
+
'unicorn/no-useless-re-export': 'error',
|
|
570
|
+
|
|
571
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-recursion.md
|
|
572
|
+
'unicorn/no-useless-recursion': 'error',
|
|
573
|
+
|
|
574
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md
|
|
575
|
+
'unicorn/no-useless-spread': 'error',
|
|
576
|
+
|
|
577
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md
|
|
578
|
+
'unicorn/no-useless-switch-case': 'error',
|
|
579
|
+
|
|
580
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-template-literals.md
|
|
581
|
+
'unicorn/no-useless-template-literals': 'error',
|
|
582
|
+
|
|
305
583
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-useless-undefined.md
|
|
306
584
|
'unicorn/no-useless-undefined': 'error',
|
|
307
585
|
|
|
586
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-xor-as-exponentiation.md
|
|
587
|
+
'unicorn/no-xor-as-exponentiation': 'error',
|
|
588
|
+
|
|
308
589
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/no-zero-fractions.md
|
|
309
590
|
'unicorn/no-zero-fractions': 'error',
|
|
310
591
|
|
|
@@ -317,9 +598,24 @@ export default {
|
|
|
317
598
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/numeric-separators-style.md
|
|
318
599
|
'unicorn/numeric-separators-style': 'off',
|
|
319
600
|
|
|
601
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/operator-assignment.md
|
|
602
|
+
'unicorn/operator-assignment': ['error', 'never'],
|
|
603
|
+
|
|
604
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-abort-signal-any.md
|
|
605
|
+
'unicorn/prefer-abort-signal-any': 'error',
|
|
606
|
+
|
|
607
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-abort-signal-timeout.md
|
|
608
|
+
'unicorn/prefer-abort-signal-timeout': 'error',
|
|
609
|
+
|
|
320
610
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-add-event-listener.md
|
|
321
611
|
'unicorn/prefer-add-event-listener': 'error',
|
|
322
612
|
|
|
613
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener-options.md
|
|
614
|
+
'unicorn/prefer-add-event-listener-options': 'error',
|
|
615
|
+
|
|
616
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-aggregate-error.md
|
|
617
|
+
'unicorn/prefer-aggregate-error': 'error',
|
|
618
|
+
|
|
323
619
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-find.md
|
|
324
620
|
'unicorn/prefer-array-find': 'error',
|
|
325
621
|
|
|
@@ -334,102 +630,192 @@ export default {
|
|
|
334
630
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-flat-map.md
|
|
335
631
|
'unicorn/prefer-array-flat-map': 'error',
|
|
336
632
|
|
|
633
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-from-async.md
|
|
634
|
+
'unicorn/prefer-array-from-async': 'error',
|
|
635
|
+
|
|
636
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-from-map.md
|
|
637
|
+
'unicorn/prefer-array-from-map': 'error',
|
|
638
|
+
|
|
639
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-from-range.md
|
|
640
|
+
'unicorn/prefer-array-from-range': 'error',
|
|
641
|
+
|
|
642
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-index-of.md
|
|
643
|
+
'unicorn/prefer-array-index-of': 'error',
|
|
644
|
+
|
|
645
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-iterable-methods.md
|
|
646
|
+
'unicorn/prefer-array-iterable-methods': 'error',
|
|
647
|
+
|
|
337
648
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-last-methods.md
|
|
338
649
|
'unicorn/prefer-array-last-methods': 'error',
|
|
339
650
|
|
|
651
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-slice.md
|
|
652
|
+
'unicorn/prefer-array-slice': 'error',
|
|
653
|
+
|
|
340
654
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-some.md
|
|
341
655
|
'unicorn/prefer-array-some': 'error',
|
|
342
656
|
|
|
343
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md
|
|
344
|
-
'unicorn/prefer-blob-reading-methods': 'error',
|
|
345
|
-
|
|
346
657
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md
|
|
347
658
|
'unicorn/prefer-at': 'off',
|
|
348
659
|
|
|
349
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-
|
|
350
|
-
'unicorn/prefer-
|
|
351
|
-
|
|
352
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-array-index-of.md
|
|
353
|
-
'unicorn/prefer-array-index-of': 'error',
|
|
660
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-await.md
|
|
661
|
+
'unicorn/prefer-await': 'off',
|
|
354
662
|
|
|
355
663
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-bigint-literals.md
|
|
356
664
|
'unicorn/prefer-bigint-literals': 'error',
|
|
357
665
|
|
|
666
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md
|
|
667
|
+
'unicorn/prefer-blob-reading-methods': 'error',
|
|
668
|
+
|
|
669
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-block-statement-over-iife.md
|
|
670
|
+
'unicorn/prefer-block-statement-over-iife': 'error',
|
|
671
|
+
|
|
672
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-boolean-return.md
|
|
673
|
+
'unicorn/prefer-boolean-return': 'error',
|
|
674
|
+
|
|
358
675
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md
|
|
359
676
|
'unicorn/prefer-class-fields': 'error',
|
|
360
677
|
|
|
361
678
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-classlist-toggle.md
|
|
362
679
|
'unicorn/prefer-classlist-toggle': 'error',
|
|
363
680
|
|
|
681
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md
|
|
682
|
+
'unicorn/prefer-code-point': 'error',
|
|
683
|
+
|
|
684
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-continue.md
|
|
685
|
+
'unicorn/prefer-continue': 'off',
|
|
686
|
+
|
|
364
687
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-date-now.md
|
|
365
688
|
'unicorn/prefer-date-now': 'error',
|
|
366
689
|
|
|
367
690
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-default-parameters.md
|
|
368
691
|
'unicorn/prefer-default-parameters': 'error',
|
|
369
692
|
|
|
370
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
371
|
-
'unicorn/prefer-
|
|
372
|
-
|
|
373
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-get-or-insert-computed.md
|
|
374
|
-
'unicorn/prefer-get-or-insert-computed': 'error',
|
|
375
|
-
|
|
376
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-https.md
|
|
377
|
-
'unicorn/prefer-https': 'error',
|
|
378
|
-
|
|
379
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
380
|
-
'unicorn/prefer-includes-over-repeated-comparisons': 'error',
|
|
381
|
-
|
|
382
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-concat.md
|
|
383
|
-
'unicorn/prefer-iterator-concat': 'off',
|
|
384
|
-
|
|
385
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array-at-end.md
|
|
386
|
-
'unicorn/prefer-iterator-to-array-at-end': 'error',
|
|
693
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-direct-iteration.md
|
|
694
|
+
'unicorn/prefer-direct-iteration': 'off',
|
|
387
695
|
|
|
388
|
-
//
|
|
389
|
-
|
|
696
|
+
// only stage 4
|
|
697
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dispose.md
|
|
698
|
+
'unicorn/prefer-dispose': 'off',
|
|
390
699
|
|
|
391
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
392
|
-
'unicorn/prefer-
|
|
700
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-append.md
|
|
701
|
+
'unicorn/prefer-dom-node-append': 'error',
|
|
393
702
|
|
|
394
|
-
//
|
|
395
|
-
|
|
703
|
+
// does not support older browsers
|
|
704
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-html-methods.md
|
|
705
|
+
'unicorn/prefer-dom-node-html-methods': 'off',
|
|
396
706
|
|
|
397
707
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-remove.md
|
|
398
708
|
'unicorn/prefer-dom-node-remove': 'error',
|
|
399
709
|
|
|
710
|
+
// low browser support
|
|
711
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-replace-children.md
|
|
712
|
+
'unicorn/prefer-dom-node-replace-children': 'off',
|
|
713
|
+
|
|
400
714
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-dom-node-text-content.md
|
|
401
715
|
'unicorn/prefer-dom-node-text-content': 'error',
|
|
402
716
|
|
|
717
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-early-return.md
|
|
718
|
+
'unicorn/prefer-early-return': 'off',
|
|
719
|
+
|
|
720
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-else-if.md
|
|
721
|
+
'unicorn/prefer-else-if': 'off',
|
|
722
|
+
|
|
723
|
+
// low browser support
|
|
724
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-error-is-error.md
|
|
725
|
+
'unicorn/prefer-error-is-error': 'off',
|
|
726
|
+
|
|
403
727
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md
|
|
404
728
|
'unicorn/prefer-event-target': 'error',
|
|
405
729
|
|
|
730
|
+
// handled by stylelint
|
|
731
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-explicit-viewport-units.md
|
|
732
|
+
'unicorn/prefer-explicit-viewport-units': 'off',
|
|
733
|
+
|
|
406
734
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md
|
|
407
735
|
'unicorn/prefer-export-from': 'error',
|
|
408
736
|
|
|
737
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-flat-math-min-max.md
|
|
738
|
+
'unicorn/prefer-flat-math-min-max': 'error',
|
|
739
|
+
|
|
740
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-get-or-insert-computed.md
|
|
741
|
+
'unicorn/prefer-get-or-insert-computed': 'error',
|
|
742
|
+
|
|
743
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-number-constants.md
|
|
744
|
+
'unicorn/prefer-global-number-constants': 'off',
|
|
745
|
+
|
|
409
746
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md
|
|
410
747
|
'unicorn/prefer-global-this': 'off',
|
|
411
748
|
|
|
749
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-group-by.md
|
|
750
|
+
'unicorn/prefer-group-by': 'error',
|
|
751
|
+
|
|
752
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-has-check.md
|
|
753
|
+
'unicorn/prefer-has-check': 'error',
|
|
754
|
+
|
|
755
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-hoisting-branch-code.md
|
|
756
|
+
'unicorn/prefer-hoisting-branch-code': 'error',
|
|
757
|
+
|
|
758
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-https.md
|
|
759
|
+
'unicorn/prefer-https': 'error',
|
|
760
|
+
|
|
761
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
762
|
+
'unicorn/prefer-identifier-import-export-specifiers': 'error',
|
|
763
|
+
|
|
412
764
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md
|
|
413
765
|
'unicorn/prefer-import-meta-properties': 'error',
|
|
414
766
|
|
|
415
767
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-includes.md
|
|
416
768
|
'unicorn/prefer-includes': 'error',
|
|
417
769
|
|
|
770
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
771
|
+
'unicorn/prefer-includes-over-repeated-comparisons': 'error',
|
|
772
|
+
|
|
773
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterable-in-constructor.md
|
|
774
|
+
'unicorn/prefer-iterable-in-constructor': 'error',
|
|
775
|
+
|
|
776
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-concat.md
|
|
777
|
+
'unicorn/prefer-iterator-concat': 'off',
|
|
778
|
+
|
|
779
|
+
// not yet supported by TS
|
|
780
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-helpers.md
|
|
781
|
+
'unicorn/prefer-iterator-helpers': 'off',
|
|
782
|
+
|
|
783
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array.md
|
|
784
|
+
'unicorn/prefer-iterator-to-array': 'off',
|
|
785
|
+
|
|
786
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-iterator-to-array-at-end.md
|
|
787
|
+
'unicorn/prefer-iterator-to-array-at-end': 'error',
|
|
788
|
+
|
|
418
789
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md
|
|
419
790
|
'unicorn/prefer-json-parse-buffer': 'error',
|
|
420
791
|
|
|
421
792
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-keyboard-event-key.md
|
|
422
793
|
'unicorn/prefer-keyboard-event-key': 'error',
|
|
423
794
|
|
|
795
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-location-assign.md
|
|
796
|
+
'unicorn/prefer-location-assign': 'error',
|
|
797
|
+
|
|
424
798
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md
|
|
425
799
|
'unicorn/prefer-logical-operator-over-ternary': 'error',
|
|
426
800
|
|
|
801
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-map-from-entries.md
|
|
802
|
+
'unicorn/prefer-map-from-entries': 'error',
|
|
803
|
+
|
|
804
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-abs.md
|
|
805
|
+
'unicorn/prefer-math-abs': 'error',
|
|
806
|
+
|
|
807
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-constants.md
|
|
808
|
+
'unicorn/prefer-math-constants': 'error',
|
|
809
|
+
|
|
427
810
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md
|
|
428
811
|
'unicorn/prefer-math-min-max': 'error',
|
|
429
812
|
|
|
430
813
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-math-trunc.md
|
|
431
814
|
'unicorn/prefer-math-trunc': 'error',
|
|
432
815
|
|
|
816
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-minimal-ternary.md
|
|
817
|
+
'unicorn/prefer-minimal-ternary': 'off',
|
|
818
|
+
|
|
433
819
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-modern-dom-apis.md
|
|
434
820
|
'unicorn/prefer-modern-dom-apis': 'error',
|
|
435
821
|
|
|
@@ -448,38 +834,109 @@ export default {
|
|
|
448
834
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
|
|
449
835
|
'unicorn/prefer-node-protocol': 'error',
|
|
450
836
|
|
|
837
|
+
// enable
|
|
838
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-coercion.md
|
|
839
|
+
'unicorn/prefer-number-coercion': 'off',
|
|
840
|
+
|
|
841
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-is-safe-integer.md
|
|
842
|
+
'unicorn/prefer-number-is-safe-integer': 'off',
|
|
843
|
+
|
|
451
844
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-number-properties.md
|
|
452
845
|
'unicorn/prefer-number-properties': 'error',
|
|
453
846
|
|
|
847
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-define-properties.md
|
|
848
|
+
'unicorn/prefer-object-define-properties': 'error',
|
|
849
|
+
|
|
850
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-destructuring-defaults.md
|
|
851
|
+
'unicorn/prefer-object-destructuring-defaults': 'error',
|
|
852
|
+
|
|
454
853
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md
|
|
455
854
|
'unicorn/prefer-object-from-entries': 'error',
|
|
456
855
|
|
|
856
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-iterable-methods.md
|
|
857
|
+
'unicorn/prefer-object-iterable-methods': 'error',
|
|
858
|
+
|
|
859
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-observer-apis.md
|
|
860
|
+
'unicorn/prefer-observer-apis': 'error',
|
|
861
|
+
|
|
457
862
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-optional-catch-binding.md
|
|
458
863
|
'unicorn/prefer-optional-catch-binding': 'error',
|
|
459
864
|
|
|
865
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-path2d.md
|
|
866
|
+
'unicorn/prefer-path2d': 'error',
|
|
867
|
+
|
|
868
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-private-class-fields.md
|
|
869
|
+
'unicorn/prefer-private-class-fields': 'error',
|
|
870
|
+
|
|
871
|
+
// enable. Need to wait for support
|
|
872
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-promise-try.md
|
|
873
|
+
'unicorn/prefer-promise-try': 'off',
|
|
874
|
+
|
|
875
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-promise-with-resolvers.md
|
|
876
|
+
'unicorn/prefer-promise-with-resolvers': 'error',
|
|
877
|
+
|
|
460
878
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md
|
|
461
879
|
'unicorn/prefer-prototype-methods': 'error',
|
|
462
880
|
|
|
463
881
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-query-selector.md
|
|
464
882
|
'unicorn/prefer-query-selector': 'error',
|
|
465
883
|
|
|
884
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-queue-microtask.md
|
|
885
|
+
'unicorn/prefer-queue-microtask': 'error',
|
|
886
|
+
|
|
466
887
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-reflect-apply.md
|
|
467
888
|
'unicorn/prefer-reflect-apply': 'off',
|
|
468
889
|
|
|
890
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-escape.md
|
|
891
|
+
'unicorn/prefer-regexp-escape': 'error',
|
|
892
|
+
|
|
469
893
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-regexp-test.md
|
|
470
894
|
'unicorn/prefer-regexp-test': 'error',
|
|
471
895
|
|
|
472
896
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-response-static-json.md
|
|
473
897
|
'unicorn/prefer-response-static-json': 'error',
|
|
474
898
|
|
|
899
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-scoped-selector.md
|
|
900
|
+
'unicorn/prefer-scoped-selector': 'error',
|
|
901
|
+
|
|
475
902
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-set-has.md
|
|
476
903
|
'unicorn/prefer-set-has': 'error',
|
|
477
904
|
|
|
905
|
+
// enable. Need to wait for support
|
|
906
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-methods.md
|
|
907
|
+
'unicorn/prefer-set-methods': 'off',
|
|
908
|
+
|
|
478
909
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md
|
|
479
910
|
'unicorn/prefer-set-size': 'error',
|
|
480
911
|
|
|
912
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-short-arrow-method.md
|
|
913
|
+
'unicorn/prefer-short-arrow-method': 'off',
|
|
914
|
+
|
|
915
|
+
// waiting for autofix
|
|
481
916
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-simple-condition-first.md
|
|
482
|
-
'unicorn/prefer-simple-condition-first': '
|
|
917
|
+
'unicorn/prefer-simple-condition-first': 'off',
|
|
918
|
+
|
|
919
|
+
// enable
|
|
920
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-simple-sort-comparator.md
|
|
921
|
+
'unicorn/prefer-simple-sort-comparator': 'off',
|
|
922
|
+
|
|
923
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-simplified-conditions.md
|
|
924
|
+
'unicorn/prefer-simplified-conditions': 'error',
|
|
925
|
+
|
|
926
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-array-predicate.md
|
|
927
|
+
'unicorn/prefer-single-array-predicate': 'error',
|
|
928
|
+
|
|
929
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md
|
|
930
|
+
'unicorn/prefer-single-call': 'error',
|
|
931
|
+
|
|
932
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-object-destructuring.md
|
|
933
|
+
'unicorn/prefer-single-object-destructuring': 'error',
|
|
934
|
+
|
|
935
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-replace.md
|
|
936
|
+
'unicorn/prefer-single-replace': 'error',
|
|
937
|
+
|
|
938
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-smaller-scope.md
|
|
939
|
+
'unicorn/prefer-smaller-scope': 'error',
|
|
483
940
|
|
|
484
941
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-split-limit.md
|
|
485
942
|
'unicorn/prefer-split-limit': 'error',
|
|
@@ -517,9 +974,20 @@ export default {
|
|
|
517
974
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
|
|
518
975
|
'unicorn/prefer-switch': 'error',
|
|
519
976
|
|
|
977
|
+
// waiting for support
|
|
978
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-temporal.md
|
|
979
|
+
'unicorn/prefer-temporal': 'off',
|
|
980
|
+
|
|
520
981
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-ternary.md
|
|
521
982
|
'unicorn/prefer-ternary': 'error',
|
|
522
983
|
|
|
984
|
+
// handled by oxlint promise plugin
|
|
985
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-then-catch.md
|
|
986
|
+
'unicorn/prefer-then-catch': 'off',
|
|
987
|
+
|
|
988
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-toggle-attribute.md
|
|
989
|
+
'unicorn/prefer-toggle-attribute': 'error',
|
|
990
|
+
|
|
523
991
|
/*
|
|
524
992
|
* https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md
|
|
525
993
|
* low browser support
|
|
@@ -529,17 +997,46 @@ export default {
|
|
|
529
997
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-type-error.md
|
|
530
998
|
'unicorn/prefer-type-error': 'error',
|
|
531
999
|
|
|
532
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
533
|
-
'unicorn/
|
|
1000
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-literal-last.md
|
|
1001
|
+
'unicorn/prefer-type-literal-last': 'error',
|
|
1002
|
+
|
|
1003
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-uint8array-base64.md
|
|
1004
|
+
'unicorn/prefer-uint8array-base64': 'off',
|
|
1005
|
+
|
|
1006
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-unary-minus.md
|
|
1007
|
+
'unicorn/prefer-unary-minus': 'error',
|
|
534
1008
|
|
|
1009
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-unicode-code-point-escapes.md
|
|
1010
|
+
'unicorn/prefer-unicode-code-point-escapes': 'error',
|
|
1011
|
+
|
|
1012
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-url-can-parse.md
|
|
1013
|
+
'unicorn/prefer-url-can-parse': 'error',
|
|
1014
|
+
|
|
1015
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-url-href.md
|
|
1016
|
+
'unicorn/prefer-url-href': 'error',
|
|
1017
|
+
|
|
1018
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-url-search-parameters.md
|
|
1019
|
+
'unicorn/prefer-url-search-parameters': 'error',
|
|
1020
|
+
|
|
1021
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-while-loop-condition.md
|
|
1022
|
+
'unicorn/prefer-while-loop-condition': 'error',
|
|
1023
|
+
|
|
1024
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md
|
|
535
1025
|
'unicorn/relative-url-style': ['error', 'never'],
|
|
536
1026
|
|
|
537
1027
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md
|
|
538
1028
|
'unicorn/require-array-join-separator': 'error',
|
|
539
1029
|
|
|
1030
|
+
// enable
|
|
1031
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-sort-compare.md
|
|
1032
|
+
'unicorn/require-array-sort-compare': 'off',
|
|
1033
|
+
|
|
540
1034
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-css-escape.md
|
|
541
1035
|
'unicorn/require-css-escape': 'off',
|
|
542
1036
|
|
|
1037
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-frontmatter-fields.md
|
|
1038
|
+
'unicorn/require-frontmatter-fields': 'off',
|
|
1039
|
+
|
|
543
1040
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-attributes.md
|
|
544
1041
|
'unicorn/require-module-attributes': 'error',
|
|
545
1042
|
|
|
@@ -555,6 +1052,9 @@ export default {
|
|
|
555
1052
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md
|
|
556
1053
|
'unicorn/require-post-message-target-origin': 'error',
|
|
557
1054
|
|
|
1055
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-proxy-trap-boolean-return.md
|
|
1056
|
+
'unicorn/require-proxy-trap-boolean-return': 'error',
|
|
1057
|
+
|
|
558
1058
|
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md
|
|
559
1059
|
'unicorn/string-content': 'off',
|
|
560
1060
|
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
'unicorn/error-message': 'error',
|
|
19
19
|
'unicorn/escape-case': 'error',
|
|
20
20
|
'unicorn/explicit-length-check': 'off',
|
|
21
|
-
'unicorn/explicit-timer-delay': 'error',
|
|
21
|
+
'unicorn/explicit-timer-delay': ['error', 'always'],
|
|
22
22
|
'unicorn/filename-case': 'off',
|
|
23
23
|
'unicorn/import-style': 'off',
|
|
24
24
|
'unicorn/new-for-builtins': 'error',
|
|
@@ -11,8 +11,7 @@ export const ESLintPluginUnicornDisabled = {
|
|
|
11
11
|
'unicorn/error-message': 'off',
|
|
12
12
|
'unicorn/escape-case': 'off',
|
|
13
13
|
'unicorn/explicit-length-check': 'off',
|
|
14
|
-
|
|
15
|
-
// 'unicorn/explicit-timer-delay': 'off',
|
|
14
|
+
'unicorn/explicit-timer-delay': 'off',
|
|
16
15
|
'unicorn/filename-case': 'off',
|
|
17
16
|
'unicorn/import-style': 'off',
|
|
18
17
|
'unicorn/new-for-builtins': 'off',
|
|
@@ -28,8 +27,7 @@ export const ESLintPluginUnicornDisabled = {
|
|
|
28
27
|
'unicorn/no-array-reverse': 'off',
|
|
29
28
|
'unicorn/no-await-expression-member': 'off',
|
|
30
29
|
'unicorn/no-await-in-promise-methods': 'off',
|
|
31
|
-
|
|
32
|
-
// 'unicorn/no-confusing-array-with': 'off',
|
|
30
|
+
'unicorn/no-confusing-array-with': 'off',
|
|
33
31
|
'unicorn/no-console-spaces': 'off',
|
|
34
32
|
'unicorn/no-document-cookie': 'off',
|
|
35
33
|
'unicorn/no-empty-file': 'off',
|