@jpp-toolkit/eslint-config 0.0.11
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/LICENSE.md +21 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.mjs +654 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +73 -0
- package/src/configs/eslint-config.ts +1305 -0
- package/src/configs/ignore-config.ts +17 -0
- package/src/configs/import-x-config.ts +344 -0
- package/src/configs/jsx-a11y-config.ts +278 -0
- package/src/configs/perfectionist-config.ts +180 -0
- package/src/configs/prettier-config.ts +11 -0
- package/src/configs/react-config.ts +706 -0
- package/src/configs/react-hooks-config.ts +11 -0
- package/src/configs/stylistic-config.ts +746 -0
- package/src/configs/typescript-config.ts +1211 -0
- package/src/configs/unicorn-config.ts +1212 -0
- package/src/configs/vitest-config.ts +536 -0
- package/src/index.ts +73 -0
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
import unicorn from 'eslint-plugin-unicorn';
|
|
2
|
+
import { defineConfig } from 'eslint/config';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Unicorn configuration.
|
|
6
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn}
|
|
7
|
+
*/
|
|
8
|
+
export const unicornConfig = defineConfig({
|
|
9
|
+
name: 'unicorn-config',
|
|
10
|
+
plugins: { unicorn },
|
|
11
|
+
rules: {
|
|
12
|
+
/**
|
|
13
|
+
* Improve regexes by making them shorter, consistent, and safer.
|
|
14
|
+
* @fixable
|
|
15
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md}
|
|
16
|
+
*/
|
|
17
|
+
// 'unicorn/better-regex': 'error',
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Enforce a specific parameter name in catch clauses.
|
|
21
|
+
* @config recommended
|
|
22
|
+
* @fixable
|
|
23
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/catch-error-name.md}
|
|
24
|
+
*/
|
|
25
|
+
// 'unicorn/catch-error-name': 'error',
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Enforce consistent assertion style with node:assert.
|
|
29
|
+
* @config recommended
|
|
30
|
+
* @fixable
|
|
31
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-assert.md}
|
|
32
|
+
*/
|
|
33
|
+
// 'unicorn/consistent-assert': 'error',
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Prefer passing Date directly to the constructor when cloning.
|
|
37
|
+
* @config recommended
|
|
38
|
+
* @config unopinionated
|
|
39
|
+
* @fixable
|
|
40
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-date-clone.md}
|
|
41
|
+
*/
|
|
42
|
+
// 'unicorn/consistent-date-clone': 'error',
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Use destructured variables over properties.
|
|
46
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-destructuring.md}
|
|
47
|
+
*/
|
|
48
|
+
// 'unicorn/consistent-destructuring': 'error',
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Prefer consistent types when spreading a ternary in an array literal.
|
|
52
|
+
* @config recommended
|
|
53
|
+
* @fixable
|
|
54
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-empty-array-spread.md}
|
|
55
|
+
*/
|
|
56
|
+
// 'unicorn/consistent-empty-array-spread': 'error',
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Enforce consistent style for element existence checks with indexOf(), lastIndexOf(), findIndex(), and findLastIndex().
|
|
60
|
+
* @config recommended
|
|
61
|
+
* @config unopinionated
|
|
62
|
+
* @fixable
|
|
63
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-existence-index-check.md}
|
|
64
|
+
*/
|
|
65
|
+
// 'unicorn/consistent-existence-index-check': 'error',
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Move function definitions to the highest possible scope.
|
|
69
|
+
* @config recommended
|
|
70
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/consistent-function-scoping.md}
|
|
71
|
+
*/
|
|
72
|
+
// 'unicorn/consistent-function-scoping': 'error',
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Enforce correct Error subclassing.
|
|
76
|
+
* @fixable
|
|
77
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md}
|
|
78
|
+
*/
|
|
79
|
+
// 'unicorn/custom-error-definition': 'error',
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Enforce no spaces between braces.
|
|
83
|
+
* @config recommended
|
|
84
|
+
* @fixable
|
|
85
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/empty-brace-spaces.md}
|
|
86
|
+
*/
|
|
87
|
+
// 'unicorn/empty-brace-spaces': 'error',
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Enforce passing a message value when creating a built-in error.
|
|
91
|
+
* @config recommended
|
|
92
|
+
* @config unopinionated
|
|
93
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md}
|
|
94
|
+
*/
|
|
95
|
+
// 'unicorn/error-message': 'error',
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Require escape sequences to use uppercase or lowercase values.
|
|
99
|
+
* @config recommended
|
|
100
|
+
* @config unopinionated
|
|
101
|
+
* @fixable
|
|
102
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/escape-case.md}
|
|
103
|
+
*/
|
|
104
|
+
// 'unicorn/escape-case': 'error',
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Add expiration conditions to TODO comments.
|
|
108
|
+
* @config recommended
|
|
109
|
+
* @config unopinionated
|
|
110
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/expiring-todo-comments.md}
|
|
111
|
+
*/
|
|
112
|
+
// 'unicorn/expiring-todo-comments': 'error',
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Enforce explicitly comparing the length or size property of a value.
|
|
116
|
+
* @config recommended
|
|
117
|
+
* @fixable
|
|
118
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/explicit-length-check.md}
|
|
119
|
+
*/
|
|
120
|
+
// 'unicorn/explicit-length-check': 'error',
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Enforce a case style for filenames.
|
|
124
|
+
* @config recommended
|
|
125
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md}
|
|
126
|
+
*/
|
|
127
|
+
'unicorn/filename-case': ['error', { case: 'kebabCase' }],
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Enforce specific import styles per module.
|
|
131
|
+
* @config recommended
|
|
132
|
+
* @config unopinionated
|
|
133
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/import-style.md}
|
|
134
|
+
*/
|
|
135
|
+
// 'unicorn/import-style': 'error',
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Prevent usage of variables from outside the scope of isolated functions.
|
|
139
|
+
* @config recommended
|
|
140
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/isolated-functions.md}
|
|
141
|
+
*/
|
|
142
|
+
// 'unicorn/isolated-functions': 'error',
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
|
|
146
|
+
* @config recommended
|
|
147
|
+
* @config unopinionated
|
|
148
|
+
* @fixable
|
|
149
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md}
|
|
150
|
+
*/
|
|
151
|
+
// 'unicorn/new-for-builtins': 'error',
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Enforce specifying rules to disable in eslint-disable comments.
|
|
155
|
+
* @config recommended
|
|
156
|
+
* @config unopinionated
|
|
157
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-abusive-eslint-disable.md}
|
|
158
|
+
*/
|
|
159
|
+
// 'unicorn/no-abusive-eslint-disable': 'error',
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Disallow recursive access to this within getters and setters.
|
|
163
|
+
* @config recommended
|
|
164
|
+
* @config unopinionated
|
|
165
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-accessor-recursion.md}
|
|
166
|
+
*/
|
|
167
|
+
// 'unicorn/no-accessor-recursion': 'error',
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Disallow anonymous functions and classes as the default export.
|
|
171
|
+
* @config recommended
|
|
172
|
+
* @config unopinionated
|
|
173
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-anonymous-default-export.md}
|
|
174
|
+
*/
|
|
175
|
+
// 'unicorn/no-anonymous-default-export': 'error',
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Prevent passing a function reference directly to iterator methods.
|
|
179
|
+
* @config recommended
|
|
180
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-callback-reference.md}
|
|
181
|
+
*/
|
|
182
|
+
// 'unicorn/no-array-callback-reference': 'error',
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Prefer for…of over the forEach method.
|
|
186
|
+
* @config recommended
|
|
187
|
+
* @config unopinionated
|
|
188
|
+
* @fixable
|
|
189
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-for-each.md}
|
|
190
|
+
*/
|
|
191
|
+
// 'unicorn/no-array-for-each': 'error',
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Disallow using the this argument in array methods.
|
|
195
|
+
* @config recommended
|
|
196
|
+
* @config unopinionated
|
|
197
|
+
* @fixable
|
|
198
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-method-this-argument.md}
|
|
199
|
+
*/
|
|
200
|
+
// 'unicorn/no-array-method-this-argument': 'error',
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Disallow Array#reduce() and Array#reduceRight().
|
|
204
|
+
* @config recommended
|
|
205
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reduce.md}
|
|
206
|
+
*/
|
|
207
|
+
// 'unicorn/no-array-reduce': 'error',
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Prefer Array#toReversed() over Array#reverse().
|
|
211
|
+
* @config recommended
|
|
212
|
+
* @config unopinionated
|
|
213
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-reverse.md}
|
|
214
|
+
*/
|
|
215
|
+
// 'unicorn/no-array-reverse': 'error',
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Prefer Array#toSorted() over Array#sort().
|
|
219
|
+
* @config recommended
|
|
220
|
+
* @config unopinionated
|
|
221
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-array-sort.md}
|
|
222
|
+
*/
|
|
223
|
+
// 'unicorn/no-array-sort': 'error',
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Disallow member access from await expression.
|
|
227
|
+
* @config recommended
|
|
228
|
+
* @fixable
|
|
229
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md}
|
|
230
|
+
*/
|
|
231
|
+
// 'unicorn/no-await-expression-member': 'error',
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Disallow using await in Promise method parameters.
|
|
235
|
+
* @config recommended
|
|
236
|
+
* @config unopinionated
|
|
237
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-in-promise-methods.md}
|
|
238
|
+
*/
|
|
239
|
+
// 'unicorn/no-await-in-promise-methods': 'error',
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Do not use leading/trailing space between console.log parameters.
|
|
243
|
+
* @config recommended
|
|
244
|
+
* @config unopinionated
|
|
245
|
+
* @fixable
|
|
246
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-console-spaces.md}
|
|
247
|
+
*/
|
|
248
|
+
// 'unicorn/no-console-spaces': 'error',
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Do not use document.cookie directly.
|
|
252
|
+
* @config recommended
|
|
253
|
+
* @config unopinionated
|
|
254
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-document-cookie.md}
|
|
255
|
+
*/
|
|
256
|
+
// 'unicorn/no-document-cookie': 'error',
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Disallow empty files.
|
|
260
|
+
* @config recommended
|
|
261
|
+
* @config unopinionated
|
|
262
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-empty-file.md}
|
|
263
|
+
*/
|
|
264
|
+
// 'unicorn/no-empty-file': 'error',
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Do not use a for loop that can be replaced with a for-of loop.
|
|
268
|
+
* @config recommended
|
|
269
|
+
* @fixable
|
|
270
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md}
|
|
271
|
+
*/
|
|
272
|
+
// 'unicorn/no-for-loop': 'error',
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
276
|
+
* @config recommended
|
|
277
|
+
* @config unopinionated
|
|
278
|
+
* @fixable
|
|
279
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-hex-escape.md}
|
|
280
|
+
*/
|
|
281
|
+
// 'unicorn/no-hex-escape': 'error',
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Disallow immediate mutation after variable assignment.
|
|
285
|
+
* @config recommended
|
|
286
|
+
* @fixable
|
|
287
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-immediate-mutation.md}
|
|
288
|
+
*/
|
|
289
|
+
// 'unicorn/no-immediate-mutation': 'error',
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Disallow instanceof with built-in objects.
|
|
293
|
+
* @config recommended
|
|
294
|
+
* @config unopinionated
|
|
295
|
+
* @fixable
|
|
296
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-builtins.md}
|
|
297
|
+
*/
|
|
298
|
+
// 'unicorn/no-instanceof-builtins': 'error',
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Disallow invalid options in fetch() and new Request().
|
|
302
|
+
* @config recommended
|
|
303
|
+
* @config unopinionated
|
|
304
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-fetch-options.md}
|
|
305
|
+
*/
|
|
306
|
+
// 'unicorn/no-invalid-fetch-options': 'error',
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Prevent calling EventTarget#removeEventListener() with the result of an expression.
|
|
310
|
+
* @config recommended
|
|
311
|
+
* @config unopinionated
|
|
312
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-invalid-remove-event-listener.md}
|
|
313
|
+
*/
|
|
314
|
+
// 'unicorn/no-invalid-remove-event-listener': 'error',
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Disallow identifiers starting with new or class.
|
|
318
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-keyword-prefix.md}
|
|
319
|
+
*/
|
|
320
|
+
// 'unicorn/no-keyword-prefix': 'error',
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Disallow if statements as the only statement in if blocks without else.
|
|
324
|
+
* @config recommended
|
|
325
|
+
* @config unopinionated
|
|
326
|
+
* @fixable
|
|
327
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-lonely-if.md}
|
|
328
|
+
*/
|
|
329
|
+
// 'unicorn/no-lonely-if': 'error',
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Disallow a magic number as the depth argument in Array#flat(…).
|
|
333
|
+
* @config recommended
|
|
334
|
+
* @config unopinionated
|
|
335
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-magic-array-flat-depth.md}
|
|
336
|
+
*/
|
|
337
|
+
// 'unicorn/no-magic-array-flat-depth': 'error',
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Disallow named usage of default import and export.
|
|
341
|
+
* @config recommended
|
|
342
|
+
* @config unopinionated
|
|
343
|
+
* @fixable
|
|
344
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-named-default.md}
|
|
345
|
+
*/
|
|
346
|
+
// 'unicorn/no-named-default': 'error',
|
|
347
|
+
|
|
348
|
+
/**
|
|
349
|
+
* Disallow negated conditions.
|
|
350
|
+
* @config recommended
|
|
351
|
+
* @config unopinionated
|
|
352
|
+
* @fixable
|
|
353
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negated-condition.md}
|
|
354
|
+
*/
|
|
355
|
+
// 'unicorn/no-negated-condition': 'error',
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Disallow negated expression in equality check.
|
|
359
|
+
* @config recommended
|
|
360
|
+
* @config unopinionated
|
|
361
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-negation-in-equality-check.md}
|
|
362
|
+
*/
|
|
363
|
+
// 'unicorn/no-negation-in-equality-check': 'error',
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Disallow nested ternary expressions.
|
|
367
|
+
* @config recommended
|
|
368
|
+
* @fixable
|
|
369
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-nested-ternary.md}
|
|
370
|
+
*/
|
|
371
|
+
// 'unicorn/no-nested-ternary': 'error',
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Disallow new Array().
|
|
375
|
+
* @config recommended
|
|
376
|
+
* @config unopinionated
|
|
377
|
+
* @fixable
|
|
378
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-array.md}
|
|
379
|
+
*/
|
|
380
|
+
// 'unicorn/no-new-array': 'error',
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Enforce the use of Buffer.from() and Buffer.alloc() instead of the deprecated new Buffer().
|
|
384
|
+
* @config recommended
|
|
385
|
+
* @config unopinionated
|
|
386
|
+
* @fixable
|
|
387
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-new-buffer.md}
|
|
388
|
+
*/
|
|
389
|
+
// 'unicorn/no-new-buffer': 'error',
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Disallow the use of the null literal.
|
|
393
|
+
* @config recommended
|
|
394
|
+
* @fixable
|
|
395
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md}
|
|
396
|
+
*/
|
|
397
|
+
// 'unicorn/no-null': 'error',
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Disallow the use of objects as default parameters.
|
|
401
|
+
* @config recommended
|
|
402
|
+
* @config unopinionated
|
|
403
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-object-as-default-parameter.md}
|
|
404
|
+
*/
|
|
405
|
+
// 'unicorn/no-object-as-default-parameter': 'error',
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Disallow process.exit().
|
|
409
|
+
* @config recommended
|
|
410
|
+
* @config unopinionated
|
|
411
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-process-exit.md}
|
|
412
|
+
*/
|
|
413
|
+
// 'unicorn/no-process-exit': 'error',
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Disallow passing single-element arrays to Promise methods.
|
|
417
|
+
* @config recommended
|
|
418
|
+
* @config unopinionated
|
|
419
|
+
* @fixable
|
|
420
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-single-promise-in-promise-methods.md}
|
|
421
|
+
*/
|
|
422
|
+
// 'unicorn/no-single-promise-in-promise-methods': 'error',
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Disallow classes that only have static members.
|
|
426
|
+
* @config recommended
|
|
427
|
+
* @config unopinionated
|
|
428
|
+
* @fixable
|
|
429
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-static-only-class.md}
|
|
430
|
+
*/
|
|
431
|
+
// 'unicorn/no-static-only-class': 'error',
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Disallow then property.
|
|
435
|
+
* @config recommended
|
|
436
|
+
* @config unopinionated
|
|
437
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-thenable.md}
|
|
438
|
+
*/
|
|
439
|
+
// 'unicorn/no-thenable': 'error',
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Disallow assigning this to a variable.
|
|
443
|
+
* @config recommended
|
|
444
|
+
* @config unopinionated
|
|
445
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-this-assignment.md}
|
|
446
|
+
*/
|
|
447
|
+
// 'unicorn/no-this-assignment': 'error',
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Disallow comparing undefined using typeof.
|
|
451
|
+
* @config recommended
|
|
452
|
+
* @config unopinionated
|
|
453
|
+
* @fixable
|
|
454
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-typeof-undefined.md}
|
|
455
|
+
*/
|
|
456
|
+
// 'unicorn/no-typeof-undefined': 'error',
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Disallow using 1 as the depth argument of Array#flat().
|
|
460
|
+
* @config recommended
|
|
461
|
+
* @config unopinionated
|
|
462
|
+
* @fixable
|
|
463
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-flat-depth.md}
|
|
464
|
+
*/
|
|
465
|
+
// 'unicorn/no-unnecessary-array-flat-depth': 'error',
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Disallow using .length or Infinity as the deleteCount or skipCount argument of Array#{splice,toSpliced}().
|
|
469
|
+
* @config recommended
|
|
470
|
+
* @config unopinionated
|
|
471
|
+
* @fixable
|
|
472
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-array-splice-count.md}
|
|
473
|
+
*/
|
|
474
|
+
// 'unicorn/no-unnecessary-array-splice-count': 'error',
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Disallow awaiting non-promise values.
|
|
478
|
+
* @config recommended
|
|
479
|
+
* @config unopinionated
|
|
480
|
+
* @fixable
|
|
481
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md}
|
|
482
|
+
*/
|
|
483
|
+
// 'unicorn/no-unnecessary-await': 'error',
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
487
|
+
* @config recommended
|
|
488
|
+
* @config unopinionated
|
|
489
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-polyfills.md}
|
|
490
|
+
*/
|
|
491
|
+
// 'unicorn/no-unnecessary-polyfills': 'error',
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Disallow using .length or Infinity as the end argument of {Array,String,TypedArray}#slice().
|
|
495
|
+
* @config recommended
|
|
496
|
+
* @config unopinionated
|
|
497
|
+
* @fixable
|
|
498
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-slice-end.md}
|
|
499
|
+
*/
|
|
500
|
+
// 'unicorn/no-unnecessary-slice-end': 'error',
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* Disallow unreadable array destructuring.
|
|
504
|
+
* @config recommended
|
|
505
|
+
* @config unopinionated
|
|
506
|
+
* @fixable
|
|
507
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-array-destructuring.md}
|
|
508
|
+
*/
|
|
509
|
+
// 'unicorn/no-unreadable-array-destructuring': 'error',
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Disallow unreadable IIFEs.
|
|
513
|
+
* @config recommended
|
|
514
|
+
* @config unopinionated
|
|
515
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unreadable-iife.md}
|
|
516
|
+
*/
|
|
517
|
+
// 'unicorn/no-unreadable-iife': 'error',
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Disallow unused object properties.
|
|
521
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unused-properties.md}
|
|
522
|
+
*/
|
|
523
|
+
// 'unicorn/no-unused-properties': 'error',
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* Disallow useless values or fallbacks in Set, Map, WeakSet, or WeakMap.
|
|
527
|
+
* @config recommended
|
|
528
|
+
* @config unopinionated
|
|
529
|
+
* @fixable
|
|
530
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-collection-argument.md}
|
|
531
|
+
*/
|
|
532
|
+
// 'unicorn/no-useless-collection-argument': 'error',
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Disallow unnecessary Error.captureStackTrace(…).
|
|
536
|
+
* @config recommended
|
|
537
|
+
* @config unopinionated
|
|
538
|
+
* @fixable
|
|
539
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-error-capture-stack-trace.md}
|
|
540
|
+
*/
|
|
541
|
+
// 'unicorn/no-useless-error-capture-stack-trace': 'error',
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Disallow useless fallback when spreading in object literals.
|
|
545
|
+
* @config recommended
|
|
546
|
+
* @config unopinionated
|
|
547
|
+
* @fixable
|
|
548
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-fallback-in-spread.md}
|
|
549
|
+
*/
|
|
550
|
+
// 'unicorn/no-useless-fallback-in-spread': 'error',
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Disallow useless array length check.
|
|
554
|
+
* @config recommended
|
|
555
|
+
* @config unopinionated
|
|
556
|
+
* @fixable
|
|
557
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-length-check.md}
|
|
558
|
+
*/
|
|
559
|
+
// 'unicorn/no-useless-length-check': 'error',
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Disallow returning/yielding Promise.resolve/reject() in async functions or promise callbacks.
|
|
563
|
+
* @config recommended
|
|
564
|
+
* @config unopinionated
|
|
565
|
+
* @fixable
|
|
566
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md}
|
|
567
|
+
*/
|
|
568
|
+
// 'unicorn/no-useless-promise-resolve-reject': 'error',
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* Disallow unnecessary spread.
|
|
572
|
+
* @config recommended
|
|
573
|
+
* @config unopinionated
|
|
574
|
+
* @fixable
|
|
575
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-spread.md}
|
|
576
|
+
*/
|
|
577
|
+
// 'unicorn/no-useless-spread': 'error',
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Disallow useless case in switch statements.
|
|
581
|
+
* @config recommended
|
|
582
|
+
* @config unopinionated
|
|
583
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md}
|
|
584
|
+
*/
|
|
585
|
+
// 'unicorn/no-useless-switch-case': 'error',
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Disallow useless undefined.
|
|
589
|
+
* @config recommended
|
|
590
|
+
* @config unopinionated
|
|
591
|
+
* @fixable
|
|
592
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-undefined.md}
|
|
593
|
+
*/
|
|
594
|
+
// 'unicorn/no-useless-undefined': 'error',
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Disallow number literals with zero fractions or dangling dots.
|
|
598
|
+
* @config recommended
|
|
599
|
+
* @config unopinionated
|
|
600
|
+
* @fixable
|
|
601
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-zero-fractions.md}
|
|
602
|
+
*/
|
|
603
|
+
// 'unicorn/no-zero-fractions': 'error',
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Enforce proper case for numeric literals.
|
|
607
|
+
* @config recommended
|
|
608
|
+
* @config unopinionated
|
|
609
|
+
* @fixable
|
|
610
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/number-literal-case.md}
|
|
611
|
+
*/
|
|
612
|
+
// 'unicorn/number-literal-case': 'error',
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Enforce the style of numeric separators by correctly grouping digits.
|
|
616
|
+
* @config recommended
|
|
617
|
+
* @config unopinionated
|
|
618
|
+
* @fixable
|
|
619
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/numeric-separators-style.md}
|
|
620
|
+
*/
|
|
621
|
+
// 'unicorn/numeric-separators-style': 'error',
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Prefer .addEventListener() and .removeEventListener() over on-functions.
|
|
625
|
+
* @config recommended
|
|
626
|
+
* @config unopinionated
|
|
627
|
+
* @fixable
|
|
628
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md}
|
|
629
|
+
*/
|
|
630
|
+
// 'unicorn/prefer-add-event-listener': 'error',
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Prefer .find(…) and .findLast(…) over the first or last element from .filter(…).
|
|
634
|
+
* @config recommended
|
|
635
|
+
* @config unopinionated
|
|
636
|
+
* @fixable
|
|
637
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-find.md}
|
|
638
|
+
*/
|
|
639
|
+
// 'unicorn/prefer-array-find': 'error',
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Prefer Array#flat() over legacy techniques to flatten arrays.
|
|
643
|
+
* @config recommended
|
|
644
|
+
* @config unopinionated
|
|
645
|
+
* @fixable
|
|
646
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat.md}
|
|
647
|
+
*/
|
|
648
|
+
// 'unicorn/prefer-array-flat': 'error',
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Prefer .flatMap(…) over .map(…).flat().
|
|
652
|
+
* @config recommended
|
|
653
|
+
* @config unopinionated
|
|
654
|
+
* @fixable
|
|
655
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-flat-map.md}
|
|
656
|
+
*/
|
|
657
|
+
// 'unicorn/prefer-array-flat-map': 'error',
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Prefer Array#{indexOf,lastIndexOf}() over Array#{findIndex,findLastIndex}() when looking for the index of an item.
|
|
661
|
+
* @config recommended
|
|
662
|
+
* @config unopinionated
|
|
663
|
+
* @fixable
|
|
664
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-index-of.md}
|
|
665
|
+
*/
|
|
666
|
+
// 'unicorn/prefer-array-index-of': 'error',
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Prefer .some(…) over .filter(…).length check and .{find,findLast,findIndex,findLastIndex}(…).
|
|
670
|
+
* @config recommended
|
|
671
|
+
* @config unopinionated
|
|
672
|
+
* @fixable
|
|
673
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-array-some.md}
|
|
674
|
+
*/
|
|
675
|
+
// 'unicorn/prefer-array-some': 'error',
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Prefer .at() method for index access and String#charAt().
|
|
679
|
+
* @config recommended
|
|
680
|
+
* @config unopinionated
|
|
681
|
+
* @fixable
|
|
682
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-at.md}
|
|
683
|
+
*/
|
|
684
|
+
// 'unicorn/prefer-at': 'error',
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Prefer BigInt literals over the constructor.
|
|
688
|
+
* @config recommended
|
|
689
|
+
* @config unopinionated
|
|
690
|
+
* @fixable
|
|
691
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-bigint-literals.md}
|
|
692
|
+
*/
|
|
693
|
+
// 'unicorn/prefer-bigint-literals': 'error',
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Prefer Blob#arrayBuffer() over FileReader#readAsArrayBuffer(…) and Blob#text() over FileReader#readAsText(…).
|
|
697
|
+
* @config recommended
|
|
698
|
+
* @config unopinionated
|
|
699
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-blob-reading-methods.md}
|
|
700
|
+
*/
|
|
701
|
+
// 'unicorn/prefer-blob-reading-methods': 'error',
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Prefer class field declarations over this assignments in constructors.
|
|
705
|
+
* @config recommended
|
|
706
|
+
* @config unopinionated
|
|
707
|
+
* @fixable
|
|
708
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-class-fields.md}
|
|
709
|
+
*/
|
|
710
|
+
// 'unicorn/prefer-class-fields': 'error',
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Prefer using Element#classList.toggle() to toggle class names.
|
|
714
|
+
* @config recommended
|
|
715
|
+
* @config unopinionated
|
|
716
|
+
* @fixable
|
|
717
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-classlist-toggle.md}
|
|
718
|
+
*/
|
|
719
|
+
// 'unicorn/prefer-classlist-toggle': 'error',
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* Prefer String#codePointAt(…) over String#charCodeAt(…) and String.fromCodePoint(…) over String.fromCharCode(…).
|
|
723
|
+
* @config recommended
|
|
724
|
+
* @config unopinionated
|
|
725
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-code-point.md}
|
|
726
|
+
*/
|
|
727
|
+
// 'unicorn/prefer-code-point': 'error',
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Prefer Date.now() to get the number of milliseconds since the Unix Epoch.
|
|
731
|
+
* @config recommended
|
|
732
|
+
* @config unopinionated
|
|
733
|
+
* @fixable
|
|
734
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-date-now.md}
|
|
735
|
+
*/
|
|
736
|
+
// 'unicorn/prefer-date-now': 'error',
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Prefer default parameters over reassignment.
|
|
740
|
+
* @config recommended
|
|
741
|
+
* @config unopinionated
|
|
742
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-default-parameters.md}
|
|
743
|
+
*/
|
|
744
|
+
// 'unicorn/prefer-default-parameters': 'error',
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Prefer Node#append() over Node#appendChild().
|
|
748
|
+
* @config recommended
|
|
749
|
+
* @config unopinionated
|
|
750
|
+
* @fixable
|
|
751
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-append.md}
|
|
752
|
+
*/
|
|
753
|
+
// 'unicorn/prefer-dom-node-append': 'error',
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Prefer using .dataset on DOM elements over calling attribute methods.
|
|
757
|
+
* @config recommended
|
|
758
|
+
* @config unopinionated
|
|
759
|
+
* @fixable
|
|
760
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-dataset.md}
|
|
761
|
+
*/
|
|
762
|
+
// 'unicorn/prefer-dom-node-dataset': 'error',
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Prefer childNode.remove() over parentNode.removeChild(childNode).
|
|
766
|
+
* @config recommended
|
|
767
|
+
* @config unopinionated
|
|
768
|
+
* @fixable
|
|
769
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-remove.md}
|
|
770
|
+
*/
|
|
771
|
+
// 'unicorn/prefer-dom-node-remove': 'error',
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Prefer .textContent over .innerText.
|
|
775
|
+
* @config recommended
|
|
776
|
+
* @config unopinionated
|
|
777
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-dom-node-text-content.md}
|
|
778
|
+
*/
|
|
779
|
+
// 'unicorn/prefer-dom-node-text-content': 'error',
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Prefer EventTarget over EventEmitter.
|
|
783
|
+
* @config recommended
|
|
784
|
+
* @config unopinionated
|
|
785
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-event-target.md}
|
|
786
|
+
*/
|
|
787
|
+
// 'unicorn/prefer-event-target': 'error',
|
|
788
|
+
|
|
789
|
+
/**
|
|
790
|
+
* Prefer export…from when re-exporting.
|
|
791
|
+
* @config recommended
|
|
792
|
+
* @fixable
|
|
793
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-export-from.md}
|
|
794
|
+
*/
|
|
795
|
+
// 'unicorn/prefer-export-from': 'error',
|
|
796
|
+
|
|
797
|
+
/**
|
|
798
|
+
* Prefer globalThis over window, self, and global.
|
|
799
|
+
* @config recommended
|
|
800
|
+
* @config unopinionated
|
|
801
|
+
* @fixable
|
|
802
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-global-this.md}
|
|
803
|
+
*/
|
|
804
|
+
// 'unicorn/prefer-global-this': 'error',
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Prefer import.meta.{dirname,filename} over legacy techniques for getting file paths.
|
|
808
|
+
* @fixable
|
|
809
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-import-meta-properties.md}
|
|
810
|
+
*/
|
|
811
|
+
// 'unicorn/prefer-import-meta-properties': 'error',
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Prefer .includes() over .indexOf(), .lastIndexOf(), and Array#some() when checking for existence or non-existence.
|
|
815
|
+
* @config recommended
|
|
816
|
+
* @config unopinionated
|
|
817
|
+
* @fixable
|
|
818
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-includes.md}
|
|
819
|
+
*/
|
|
820
|
+
// 'unicorn/prefer-includes': 'error',
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Prefer reading a JSON file as a buffer.
|
|
824
|
+
* @fixable
|
|
825
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-json-parse-buffer.md}
|
|
826
|
+
*/
|
|
827
|
+
// 'unicorn/prefer-json-parse-buffer': 'error',
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Prefer KeyboardEvent#key over KeyboardEvent#keyCode.
|
|
831
|
+
* @config recommended
|
|
832
|
+
* @config unopinionated
|
|
833
|
+
* @fixable
|
|
834
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-keyboard-event-key.md}
|
|
835
|
+
*/
|
|
836
|
+
// 'unicorn/prefer-keyboard-event-key': 'error',
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Prefer using a logical operator over a ternary.
|
|
840
|
+
* @config recommended
|
|
841
|
+
* @config unopinionated
|
|
842
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-logical-operator-over-ternary.md}
|
|
843
|
+
*/
|
|
844
|
+
// 'unicorn/prefer-logical-operator-over-ternary': 'error',
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Prefer Math.min() and Math.max() over ternaries for simple comparisons.
|
|
848
|
+
* @config recommended
|
|
849
|
+
* @config unopinionated
|
|
850
|
+
* @fixable
|
|
851
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-min-max.md}
|
|
852
|
+
*/
|
|
853
|
+
// 'unicorn/prefer-math-min-max': 'error',
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Enforce the use of Math.trunc instead of bitwise operators.
|
|
857
|
+
* @config recommended
|
|
858
|
+
* @config unopinionated
|
|
859
|
+
* @fixable
|
|
860
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-math-trunc.md}
|
|
861
|
+
*/
|
|
862
|
+
// 'unicorn/prefer-math-trunc': 'error',
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Prefer .before() over .insertBefore(), .replaceWith() over .replaceChild(), prefer one of .before(), .after(), .append() or .prepend() over insertAdjacentText() and insertAdjacentElement().
|
|
866
|
+
* @config recommended
|
|
867
|
+
* @config unopinionated
|
|
868
|
+
* @fixable
|
|
869
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-dom-apis.md}
|
|
870
|
+
*/
|
|
871
|
+
// 'unicorn/prefer-modern-dom-apis': 'error',
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* Prefer modern Math APIs over legacy patterns.
|
|
875
|
+
* @config recommended
|
|
876
|
+
* @config unopinionated
|
|
877
|
+
* @fixable
|
|
878
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-modern-math-apis.md}
|
|
879
|
+
*/
|
|
880
|
+
// 'unicorn/prefer-modern-math-apis': 'error',
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
884
|
+
* @config recommended
|
|
885
|
+
* @config unopinionated
|
|
886
|
+
* @fixable
|
|
887
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-module.md}
|
|
888
|
+
*/
|
|
889
|
+
// 'unicorn/prefer-module': 'error',
|
|
890
|
+
|
|
891
|
+
/**
|
|
892
|
+
* Prefer using String, Number, BigInt, Boolean, and Symbol directly.
|
|
893
|
+
* @config recommended
|
|
894
|
+
* @config unopinionated
|
|
895
|
+
* @fixable
|
|
896
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-native-coercion-functions.md}
|
|
897
|
+
*/
|
|
898
|
+
// 'unicorn/prefer-native-coercion-functions': 'error',
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* Prefer negative index over .length - index when possible.
|
|
902
|
+
* @config recommended
|
|
903
|
+
* @config unopinionated
|
|
904
|
+
* @fixable
|
|
905
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-negative-index.md}
|
|
906
|
+
*/
|
|
907
|
+
// 'unicorn/prefer-negative-index': 'error',
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Prefer using the node: protocol when importing Node.js builtin modules.
|
|
911
|
+
* @config recommended
|
|
912
|
+
* @config unopinionated
|
|
913
|
+
* @fixable
|
|
914
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md}
|
|
915
|
+
*/
|
|
916
|
+
'unicorn/prefer-node-protocol': 'error',
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* Prefer Number static properties over global ones.
|
|
920
|
+
* @config recommended
|
|
921
|
+
* @config unopinionated
|
|
922
|
+
* @fixable
|
|
923
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-number-properties.md}
|
|
924
|
+
*/
|
|
925
|
+
// 'unicorn/prefer-number-properties': 'error',
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Prefer using Object.fromEntries(…) to transform a list of key-value pairs into an object.
|
|
929
|
+
* @config recommended
|
|
930
|
+
* @config unopinionated
|
|
931
|
+
* @fixable
|
|
932
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-object-from-entries.md}
|
|
933
|
+
*/
|
|
934
|
+
// 'unicorn/prefer-object-from-entries': 'error',
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Prefer omitting the catch binding parameter.
|
|
938
|
+
* @config recommended
|
|
939
|
+
* @config unopinionated
|
|
940
|
+
* @fixable
|
|
941
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-optional-catch-binding.md}
|
|
942
|
+
*/
|
|
943
|
+
// 'unicorn/prefer-optional-catch-binding': 'error',
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Prefer borrowing methods from the prototype instead of the instance.
|
|
947
|
+
* @config recommended
|
|
948
|
+
* @config unopinionated
|
|
949
|
+
* @fixable
|
|
950
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-prototype-methods.md}
|
|
951
|
+
*/
|
|
952
|
+
// 'unicorn/prefer-prototype-methods': 'error',
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Prefer .querySelector() over .getElementById(), .querySelectorAll() over .getElementsByClassName() and .getElementsByTagName() and .getElementsByName().
|
|
956
|
+
* @config recommended
|
|
957
|
+
* @fixable
|
|
958
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md}
|
|
959
|
+
*/
|
|
960
|
+
// 'unicorn/prefer-query-selector': 'error',
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Prefer Reflect.apply() over Function#apply().
|
|
964
|
+
* @config recommended
|
|
965
|
+
* @config unopinionated
|
|
966
|
+
* @fixable
|
|
967
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-reflect-apply.md}
|
|
968
|
+
*/
|
|
969
|
+
// 'unicorn/prefer-reflect-apply': 'error',
|
|
970
|
+
|
|
971
|
+
/**
|
|
972
|
+
* Prefer RegExp#test() over String#match() and RegExp#exec().
|
|
973
|
+
* @config recommended
|
|
974
|
+
* @config unopinionated
|
|
975
|
+
* @fixable
|
|
976
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-regexp-test.md}
|
|
977
|
+
*/
|
|
978
|
+
// 'unicorn/prefer-regexp-test': 'error',
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Prefer Response.json() over new Response(JSON.stringify()).
|
|
982
|
+
* @config recommended
|
|
983
|
+
* @config unopinionated
|
|
984
|
+
* @fixable
|
|
985
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-response-static-json.md}
|
|
986
|
+
*/
|
|
987
|
+
// 'unicorn/prefer-response-static-json': 'error',
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Prefer Set#has() over Array#includes() when checking for existence or non-existence.
|
|
991
|
+
* @config recommended
|
|
992
|
+
* @config unopinionated
|
|
993
|
+
* @fixable
|
|
994
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md}
|
|
995
|
+
*/
|
|
996
|
+
// 'unicorn/prefer-set-has': 'error',
|
|
997
|
+
|
|
998
|
+
/**
|
|
999
|
+
* Prefer using Set#size instead of Array#length.
|
|
1000
|
+
* @config recommended
|
|
1001
|
+
* @config unopinionated
|
|
1002
|
+
* @fixable
|
|
1003
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-size.md}
|
|
1004
|
+
*/
|
|
1005
|
+
// 'unicorn/prefer-set-size': 'error',
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Enforce combining multiple Array#push(), Element#classList.{add,remove}(), and importScripts() into one call.
|
|
1009
|
+
* @config recommended
|
|
1010
|
+
* @config unopinionated
|
|
1011
|
+
* @fixable
|
|
1012
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-single-call.md}
|
|
1013
|
+
*/
|
|
1014
|
+
// 'unicorn/prefer-single-call': 'error',
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Prefer the spread operator over Array.from(…), Array#concat(…), Array#{slice,toSpliced}() and String#split('').
|
|
1018
|
+
* @config recommended
|
|
1019
|
+
* @fixable
|
|
1020
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-spread.md}
|
|
1021
|
+
*/
|
|
1022
|
+
// 'unicorn/prefer-spread': 'error',
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* Prefer using the String.raw tag to avoid escaping \.
|
|
1026
|
+
* @config recommended
|
|
1027
|
+
* @config unopinionated
|
|
1028
|
+
* @fixable
|
|
1029
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-raw.md}
|
|
1030
|
+
*/
|
|
1031
|
+
// 'unicorn/prefer-string-raw': 'error',
|
|
1032
|
+
|
|
1033
|
+
/**
|
|
1034
|
+
* Prefer String#replaceAll() over regex searches with the global flag.
|
|
1035
|
+
* @config recommended
|
|
1036
|
+
* @config unopinionated
|
|
1037
|
+
* @fixable
|
|
1038
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md}
|
|
1039
|
+
*/
|
|
1040
|
+
// 'unicorn/prefer-string-replace-all': 'error',
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* Prefer String#slice() over String#substr() and String#substring().
|
|
1044
|
+
* @config recommended
|
|
1045
|
+
* @config unopinionated
|
|
1046
|
+
* @fixable
|
|
1047
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-slice.md}
|
|
1048
|
+
*/
|
|
1049
|
+
// 'unicorn/prefer-string-slice': 'error',
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* Prefer String#startsWith() & String#endsWith() over RegExp#test().
|
|
1053
|
+
* @config recommended
|
|
1054
|
+
* @config unopinionated
|
|
1055
|
+
* @fixable
|
|
1056
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-starts-ends-with.md}
|
|
1057
|
+
*/
|
|
1058
|
+
// 'unicorn/prefer-string-starts-ends-with': 'error',
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Prefer String#trimStart() / String#trimEnd() over String#trimLeft() / String#trimRight().
|
|
1062
|
+
* @config recommended
|
|
1063
|
+
* @config unopinionated
|
|
1064
|
+
* @fixable
|
|
1065
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-trim-start-end.md}
|
|
1066
|
+
*/
|
|
1067
|
+
// 'unicorn/prefer-string-trim-start-end': 'error',
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* Prefer using structuredClone to create a deep clone.
|
|
1071
|
+
* @config recommended
|
|
1072
|
+
* @config unopinionated
|
|
1073
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-structured-clone.md}
|
|
1074
|
+
*/
|
|
1075
|
+
// 'unicorn/prefer-structured-clone': 'error',
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* Prefer switch over multiple else-if.
|
|
1079
|
+
* @config recommended
|
|
1080
|
+
* @config unopinionated
|
|
1081
|
+
* @fixable
|
|
1082
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md}
|
|
1083
|
+
*/
|
|
1084
|
+
// 'unicorn/prefer-switch': 'error',
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Prefer ternary expressions over simple if-else statements.
|
|
1088
|
+
* @config recommended
|
|
1089
|
+
* @config unopinionated
|
|
1090
|
+
* @fixable
|
|
1091
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-ternary.md}
|
|
1092
|
+
*/
|
|
1093
|
+
// 'unicorn/prefer-ternary': 'error',
|
|
1094
|
+
|
|
1095
|
+
/**
|
|
1096
|
+
* Prefer top-level await over top-level promises and async function calls.
|
|
1097
|
+
* @config recommended
|
|
1098
|
+
* @config unopinionated
|
|
1099
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-top-level-await.md}
|
|
1100
|
+
*/
|
|
1101
|
+
// 'unicorn/prefer-top-level-await': 'error',
|
|
1102
|
+
|
|
1103
|
+
/**
|
|
1104
|
+
* Enforce throwing TypeError in type checking conditions.
|
|
1105
|
+
* @config recommended
|
|
1106
|
+
* @config unopinionated
|
|
1107
|
+
* @fixable
|
|
1108
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md}
|
|
1109
|
+
*/
|
|
1110
|
+
// 'unicorn/prefer-type-error': 'error',
|
|
1111
|
+
|
|
1112
|
+
/**
|
|
1113
|
+
* Prevent abbreviations.
|
|
1114
|
+
* @config recommended
|
|
1115
|
+
* @fixable
|
|
1116
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prevent-abbreviations.md}
|
|
1117
|
+
*/
|
|
1118
|
+
// 'unicorn/prevent-abbreviations': 'error',
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Enforce consistent relative URL style.
|
|
1122
|
+
* @config recommended
|
|
1123
|
+
* @config unopinionated
|
|
1124
|
+
* @fixable
|
|
1125
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/relative-url-style.md}
|
|
1126
|
+
*/
|
|
1127
|
+
// 'unicorn/relative-url-style': 'error',
|
|
1128
|
+
|
|
1129
|
+
/**
|
|
1130
|
+
* Enforce using the separator argument with Array#join().
|
|
1131
|
+
* @config recommended
|
|
1132
|
+
* @config unopinionated
|
|
1133
|
+
* @fixable
|
|
1134
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-array-join-separator.md}
|
|
1135
|
+
*/
|
|
1136
|
+
// 'unicorn/require-array-join-separator': 'error',
|
|
1137
|
+
|
|
1138
|
+
/**
|
|
1139
|
+
* Require non-empty module attributes for imports and exports.
|
|
1140
|
+
* @config recommended
|
|
1141
|
+
* @config unopinionated
|
|
1142
|
+
* @fixable
|
|
1143
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-attributes.md}
|
|
1144
|
+
*/
|
|
1145
|
+
// 'unicorn/require-module-attributes': 'error',
|
|
1146
|
+
|
|
1147
|
+
/**
|
|
1148
|
+
* Require non-empty specifier list in import and export statements.
|
|
1149
|
+
* @config recommended
|
|
1150
|
+
* @config unopinionated
|
|
1151
|
+
* @fixable
|
|
1152
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-module-specifiers.md}
|
|
1153
|
+
*/
|
|
1154
|
+
// 'unicorn/require-module-specifiers': 'error',
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Enforce using the digits argument with Number#toFixed().
|
|
1158
|
+
* @config recommended
|
|
1159
|
+
* @config unopinionated
|
|
1160
|
+
* @fixable
|
|
1161
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-number-to-fixed-digits-argument.md}
|
|
1162
|
+
*/
|
|
1163
|
+
// 'unicorn/require-number-to-fixed-digits-argument': 'error',
|
|
1164
|
+
|
|
1165
|
+
/**
|
|
1166
|
+
* Enforce using the targetOrigin argument with window.postMessage().
|
|
1167
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/require-post-message-target-origin.md}
|
|
1168
|
+
*/
|
|
1169
|
+
// 'unicorn/require-post-message-target-origin': 'error',
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Enforce better string content.
|
|
1173
|
+
* @fixable
|
|
1174
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/string-content.md}
|
|
1175
|
+
*/
|
|
1176
|
+
// 'unicorn/string-content': 'error',
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Enforce consistent brace style for case clauses.
|
|
1180
|
+
* @config recommended
|
|
1181
|
+
* @fixable
|
|
1182
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md}
|
|
1183
|
+
*/
|
|
1184
|
+
// 'unicorn/switch-case-braces': 'error',
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Fix whitespace-insensitive template indentation.
|
|
1188
|
+
* @config recommended
|
|
1189
|
+
* @fixable
|
|
1190
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md}
|
|
1191
|
+
*/
|
|
1192
|
+
// 'unicorn/template-indent': 'error',
|
|
1193
|
+
|
|
1194
|
+
/**
|
|
1195
|
+
* Enforce consistent case for text encoding identifiers.
|
|
1196
|
+
* @config recommended
|
|
1197
|
+
* @config unopinionated
|
|
1198
|
+
* @fixable
|
|
1199
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md}
|
|
1200
|
+
*/
|
|
1201
|
+
// 'unicorn/text-encoding-identifier-case': 'error',
|
|
1202
|
+
|
|
1203
|
+
/**
|
|
1204
|
+
* Require new when creating an error.
|
|
1205
|
+
* @config recommended
|
|
1206
|
+
* @config unopinionated
|
|
1207
|
+
* @fixable
|
|
1208
|
+
* @see {@link https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/throw-new-error.md}
|
|
1209
|
+
*/
|
|
1210
|
+
// 'unicorn/throw-new-error': 'error',
|
|
1211
|
+
},
|
|
1212
|
+
});
|