@lntvow/eslint-config 9.29.1 → 9.30.1
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/README.md +9 -6
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +994 -50
- package/dist/index.mjs +1 -1
- package/package.json +21 -24
package/dist/index.d.ts
CHANGED
|
@@ -276,233 +276,238 @@ interface RuleOptions {
|
|
|
276
276
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
277
277
|
/**
|
|
278
278
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
279
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
279
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/consistent-type-specifier-style.md
|
|
280
280
|
*/
|
|
281
281
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
282
282
|
/**
|
|
283
283
|
* Ensure a default export is present, given a default import.
|
|
284
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
284
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/default.md
|
|
285
285
|
*/
|
|
286
286
|
'import/default'?: Linter.RuleEntry<[]>
|
|
287
287
|
/**
|
|
288
288
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
289
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
289
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/dynamic-import-chunkname.md
|
|
290
290
|
*/
|
|
291
291
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
292
292
|
/**
|
|
293
293
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
294
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
294
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/export.md
|
|
295
295
|
*/
|
|
296
296
|
'import/export'?: Linter.RuleEntry<[]>
|
|
297
297
|
/**
|
|
298
298
|
* Ensure all exports appear after other statements.
|
|
299
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
299
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/exports-last.md
|
|
300
300
|
*/
|
|
301
301
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
302
302
|
/**
|
|
303
303
|
* Ensure consistent use of file extension within the import path.
|
|
304
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
304
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/extensions.md
|
|
305
305
|
*/
|
|
306
306
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
307
307
|
/**
|
|
308
308
|
* Ensure all imports appear before other statements.
|
|
309
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
309
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/first.md
|
|
310
310
|
*/
|
|
311
311
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
312
312
|
/**
|
|
313
313
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
314
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
314
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/group-exports.md
|
|
315
315
|
*/
|
|
316
316
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
317
317
|
/**
|
|
318
318
|
* Replaced by `import-x/first`.
|
|
319
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
319
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/imports-first.md
|
|
320
320
|
* @deprecated
|
|
321
321
|
*/
|
|
322
322
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
323
323
|
/**
|
|
324
324
|
* Enforce the maximum number of dependencies a module can have.
|
|
325
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
325
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/max-dependencies.md
|
|
326
326
|
*/
|
|
327
327
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
328
328
|
/**
|
|
329
329
|
* Ensure named imports correspond to a named export in the remote file.
|
|
330
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
330
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/named.md
|
|
331
331
|
*/
|
|
332
332
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
333
333
|
/**
|
|
334
334
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
335
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
335
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/namespace.md
|
|
336
336
|
*/
|
|
337
337
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
338
338
|
/**
|
|
339
339
|
* Enforce a newline after import statements.
|
|
340
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
340
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/newline-after-import.md
|
|
341
341
|
*/
|
|
342
342
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
343
343
|
/**
|
|
344
344
|
* Forbid import of modules using absolute paths.
|
|
345
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
345
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-absolute-path.md
|
|
346
346
|
*/
|
|
347
347
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
348
348
|
/**
|
|
349
349
|
* Forbid AMD `require` and `define` calls.
|
|
350
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
350
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-amd.md
|
|
351
351
|
*/
|
|
352
352
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
353
353
|
/**
|
|
354
354
|
* Forbid anonymous values as default exports.
|
|
355
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
355
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-anonymous-default-export.md
|
|
356
356
|
*/
|
|
357
357
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
358
358
|
/**
|
|
359
359
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
360
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
360
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-commonjs.md
|
|
361
361
|
*/
|
|
362
362
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
363
363
|
/**
|
|
364
364
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
365
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
365
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-cycle.md
|
|
366
366
|
*/
|
|
367
367
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
368
368
|
/**
|
|
369
369
|
* Forbid default exports.
|
|
370
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
370
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-default-export.md
|
|
371
371
|
*/
|
|
372
372
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
373
373
|
/**
|
|
374
374
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
375
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
375
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-deprecated.md
|
|
376
376
|
*/
|
|
377
377
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
378
378
|
/**
|
|
379
379
|
* Forbid repeated import of the same module in multiple places.
|
|
380
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
380
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-duplicates.md
|
|
381
381
|
*/
|
|
382
382
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
383
383
|
/**
|
|
384
384
|
* Forbid `require()` calls with expressions.
|
|
385
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
385
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-dynamic-require.md
|
|
386
386
|
*/
|
|
387
387
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
388
388
|
/**
|
|
389
389
|
* Forbid empty named import blocks.
|
|
390
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
390
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-empty-named-blocks.md
|
|
391
391
|
*/
|
|
392
392
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
393
393
|
/**
|
|
394
394
|
* Forbid the use of extraneous packages.
|
|
395
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
395
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-extraneous-dependencies.md
|
|
396
396
|
*/
|
|
397
397
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
398
398
|
/**
|
|
399
399
|
* Forbid import statements with CommonJS module.exports.
|
|
400
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
400
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-import-module-exports.md
|
|
401
401
|
*/
|
|
402
402
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
403
403
|
/**
|
|
404
404
|
* Forbid importing the submodules of other modules.
|
|
405
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
405
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-internal-modules.md
|
|
406
406
|
*/
|
|
407
407
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
408
408
|
/**
|
|
409
409
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
410
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
410
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-mutable-exports.md
|
|
411
411
|
*/
|
|
412
412
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
413
413
|
/**
|
|
414
414
|
* Forbid use of exported name as identifier of default export.
|
|
415
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
415
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default.md
|
|
416
416
|
*/
|
|
417
417
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
418
418
|
/**
|
|
419
419
|
* Forbid use of exported name as property of default export.
|
|
420
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
420
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-as-default-member.md
|
|
421
421
|
*/
|
|
422
422
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
423
423
|
/**
|
|
424
424
|
* Forbid named default exports.
|
|
425
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
425
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-default.md
|
|
426
426
|
*/
|
|
427
427
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
428
428
|
/**
|
|
429
429
|
* Forbid named exports.
|
|
430
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
430
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-named-export.md
|
|
431
431
|
*/
|
|
432
432
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
433
433
|
/**
|
|
434
434
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
435
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
435
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-namespace.md
|
|
436
436
|
*/
|
|
437
437
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
438
438
|
/**
|
|
439
439
|
* Forbid Node.js builtin modules.
|
|
440
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
440
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-nodejs-modules.md
|
|
441
441
|
*/
|
|
442
442
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
443
443
|
/**
|
|
444
444
|
* Forbid importing packages through relative paths.
|
|
445
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
445
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-packages.md
|
|
446
446
|
*/
|
|
447
447
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
448
448
|
/**
|
|
449
449
|
* Forbid importing modules from parent directories.
|
|
450
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
450
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-relative-parent-imports.md
|
|
451
451
|
*/
|
|
452
452
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
453
453
|
/**
|
|
454
454
|
* Forbid importing a default export by a different name.
|
|
455
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
455
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-rename-default.md
|
|
456
456
|
*/
|
|
457
457
|
'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
|
|
458
458
|
/**
|
|
459
459
|
* Enforce which files can be imported in a given folder.
|
|
460
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
460
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-restricted-paths.md
|
|
461
461
|
*/
|
|
462
462
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
463
463
|
/**
|
|
464
464
|
* Forbid a module from importing itself.
|
|
465
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
465
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-self-import.md
|
|
466
466
|
*/
|
|
467
467
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
468
468
|
/**
|
|
469
469
|
* Forbid unassigned imports.
|
|
470
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
470
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unassigned-import.md
|
|
471
471
|
*/
|
|
472
472
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
473
473
|
/**
|
|
474
474
|
* Ensure imports point to a file/module that can be resolved.
|
|
475
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
475
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unresolved.md
|
|
476
476
|
*/
|
|
477
477
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
478
478
|
/**
|
|
479
479
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
480
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
480
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-unused-modules.md
|
|
481
481
|
*/
|
|
482
482
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
483
483
|
/**
|
|
484
484
|
* Forbid unnecessary path segments in import and require statements.
|
|
485
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
485
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-useless-path-segments.md
|
|
486
486
|
*/
|
|
487
487
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
488
488
|
/**
|
|
489
489
|
* Forbid webpack loader syntax in imports.
|
|
490
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
490
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/no-webpack-loader-syntax.md
|
|
491
491
|
*/
|
|
492
492
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
493
493
|
/**
|
|
494
494
|
* Enforce a convention in module import order.
|
|
495
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
495
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/order.md
|
|
496
496
|
*/
|
|
497
497
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
498
498
|
/**
|
|
499
499
|
* Prefer a default export if module exports a single name or multiple names.
|
|
500
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
500
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/prefer-default-export.md
|
|
501
501
|
*/
|
|
502
502
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
503
|
+
/**
|
|
504
|
+
* Enforce using namespace imports for specific modules, like `react`/`react-dom`, etc.
|
|
505
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/prefer-namespace-import.md
|
|
506
|
+
*/
|
|
507
|
+
'import/prefer-namespace-import'?: Linter.RuleEntry<ImportPreferNamespaceImport>
|
|
503
508
|
/**
|
|
504
509
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
505
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
510
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.16.1/docs/rules/unambiguous.md
|
|
506
511
|
*/
|
|
507
512
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
508
513
|
/**
|
|
@@ -1943,7 +1948,7 @@ interface RuleOptions {
|
|
|
1943
1948
|
* enforce using quantifier
|
|
1944
1949
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html
|
|
1945
1950
|
*/
|
|
1946
|
-
'regexp/prefer-quantifier'?: Linter.RuleEntry<
|
|
1951
|
+
'regexp/prefer-quantifier'?: Linter.RuleEntry<RegexpPreferQuantifier>
|
|
1947
1952
|
/**
|
|
1948
1953
|
* enforce using `?` quantifier
|
|
1949
1954
|
* @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-question-quantifier.html
|
|
@@ -3277,6 +3282,11 @@ interface RuleOptions {
|
|
|
3277
3282
|
* @see https://typescript-eslint.io/rules/no-unnecessary-type-constraint
|
|
3278
3283
|
*/
|
|
3279
3284
|
'ts/no-unnecessary-type-constraint'?: Linter.RuleEntry<[]>
|
|
3285
|
+
/**
|
|
3286
|
+
* Disallow conversion idioms when they do not change the type or value of the expression
|
|
3287
|
+
* @see https://typescript-eslint.io/rules/no-unnecessary-type-conversion
|
|
3288
|
+
*/
|
|
3289
|
+
'ts/no-unnecessary-type-conversion'?: Linter.RuleEntry<[]>
|
|
3280
3290
|
/**
|
|
3281
3291
|
* Disallow type parameters that aren't used multiple times
|
|
3282
3292
|
* @see https://typescript-eslint.io/rules/no-unnecessary-type-parameters
|
|
@@ -3538,6 +3548,7 @@ interface RuleOptions {
|
|
|
3538
3548
|
/**
|
|
3539
3549
|
* Require type annotations in certain places
|
|
3540
3550
|
* @see https://typescript-eslint.io/rules/typedef
|
|
3551
|
+
* @deprecated
|
|
3541
3552
|
*/
|
|
3542
3553
|
'ts/typedef'?: Linter.RuleEntry<TsTypedef>
|
|
3543
3554
|
/**
|
|
@@ -3560,6 +3571,694 @@ interface RuleOptions {
|
|
|
3560
3571
|
* @see https://eslint.org/docs/latest/rules/unicode-bom
|
|
3561
3572
|
*/
|
|
3562
3573
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
3574
|
+
/**
|
|
3575
|
+
* Improve regexes by making them shorter, consistent, and safer.
|
|
3576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/better-regex.md
|
|
3577
|
+
*/
|
|
3578
|
+
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
3579
|
+
/**
|
|
3580
|
+
* Enforce a specific parameter name in catch clauses.
|
|
3581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/catch-error-name.md
|
|
3582
|
+
*/
|
|
3583
|
+
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
3584
|
+
/**
|
|
3585
|
+
* Enforce consistent assertion style with `node:assert`.
|
|
3586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-assert.md
|
|
3587
|
+
*/
|
|
3588
|
+
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
|
|
3589
|
+
/**
|
|
3590
|
+
* Prefer passing `Date` directly to the constructor when cloning.
|
|
3591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-date-clone.md
|
|
3592
|
+
*/
|
|
3593
|
+
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
|
|
3594
|
+
/**
|
|
3595
|
+
* Use destructured variables over properties.
|
|
3596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-destructuring.md
|
|
3597
|
+
*/
|
|
3598
|
+
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
3599
|
+
/**
|
|
3600
|
+
* Prefer consistent types when spreading a ternary in an array literal.
|
|
3601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-empty-array-spread.md
|
|
3602
|
+
*/
|
|
3603
|
+
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
3604
|
+
/**
|
|
3605
|
+
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
3606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-existence-index-check.md
|
|
3607
|
+
*/
|
|
3608
|
+
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
|
|
3609
|
+
/**
|
|
3610
|
+
* Move function definitions to the highest possible scope.
|
|
3611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/consistent-function-scoping.md
|
|
3612
|
+
*/
|
|
3613
|
+
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
3614
|
+
/**
|
|
3615
|
+
* Enforce correct `Error` subclassing.
|
|
3616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/custom-error-definition.md
|
|
3617
|
+
*/
|
|
3618
|
+
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
3619
|
+
/**
|
|
3620
|
+
* Enforce no spaces between braces.
|
|
3621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/empty-brace-spaces.md
|
|
3622
|
+
*/
|
|
3623
|
+
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
3624
|
+
/**
|
|
3625
|
+
* Enforce passing a `message` value when creating a built-in error.
|
|
3626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/error-message.md
|
|
3627
|
+
*/
|
|
3628
|
+
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
3629
|
+
/**
|
|
3630
|
+
* Require escape sequences to use uppercase or lowercase values.
|
|
3631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/escape-case.md
|
|
3632
|
+
*/
|
|
3633
|
+
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
|
|
3634
|
+
/**
|
|
3635
|
+
* Add expiration conditions to TODO comments.
|
|
3636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/expiring-todo-comments.md
|
|
3637
|
+
*/
|
|
3638
|
+
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
3639
|
+
/**
|
|
3640
|
+
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
3641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/explicit-length-check.md
|
|
3642
|
+
*/
|
|
3643
|
+
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
3644
|
+
/**
|
|
3645
|
+
* Enforce a case style for filenames.
|
|
3646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/filename-case.md
|
|
3647
|
+
*/
|
|
3648
|
+
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
3649
|
+
/**
|
|
3650
|
+
* Enforce specific import styles per module.
|
|
3651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/import-style.md
|
|
3652
|
+
*/
|
|
3653
|
+
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
3654
|
+
/**
|
|
3655
|
+
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
3656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/new-for-builtins.md
|
|
3657
|
+
*/
|
|
3658
|
+
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
3659
|
+
/**
|
|
3660
|
+
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
3661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
3662
|
+
*/
|
|
3663
|
+
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
3664
|
+
/**
|
|
3665
|
+
* Disallow recursive access to `this` within getters and setters.
|
|
3666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-accessor-recursion.md
|
|
3667
|
+
*/
|
|
3668
|
+
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
|
|
3669
|
+
/**
|
|
3670
|
+
* Disallow anonymous functions and classes as the default export.
|
|
3671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-anonymous-default-export.md
|
|
3672
|
+
*/
|
|
3673
|
+
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
3674
|
+
/**
|
|
3675
|
+
* Prevent passing a function reference directly to iterator methods.
|
|
3676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-callback-reference.md
|
|
3677
|
+
*/
|
|
3678
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
3679
|
+
/**
|
|
3680
|
+
* Prefer `for…of` over the `forEach` method.
|
|
3681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-for-each.md
|
|
3682
|
+
*/
|
|
3683
|
+
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
3684
|
+
/**
|
|
3685
|
+
* Disallow using the `this` argument in array methods.
|
|
3686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-method-this-argument.md
|
|
3687
|
+
*/
|
|
3688
|
+
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
3689
|
+
/**
|
|
3690
|
+
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
3691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
3692
|
+
* @deprecated
|
|
3693
|
+
*/
|
|
3694
|
+
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
|
|
3695
|
+
/**
|
|
3696
|
+
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
3697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reduce.md
|
|
3698
|
+
*/
|
|
3699
|
+
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
3700
|
+
/**
|
|
3701
|
+
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
3702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-array-reverse.md
|
|
3703
|
+
*/
|
|
3704
|
+
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
|
|
3705
|
+
/**
|
|
3706
|
+
* Disallow member access from await expression.
|
|
3707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-expression-member.md
|
|
3708
|
+
*/
|
|
3709
|
+
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
3710
|
+
/**
|
|
3711
|
+
* Disallow using `await` in `Promise` method parameters.
|
|
3712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-await-in-promise-methods.md
|
|
3713
|
+
*/
|
|
3714
|
+
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3715
|
+
/**
|
|
3716
|
+
* Do not use leading/trailing space between `console.log` parameters.
|
|
3717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-console-spaces.md
|
|
3718
|
+
*/
|
|
3719
|
+
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
3720
|
+
/**
|
|
3721
|
+
* Do not use `document.cookie` directly.
|
|
3722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-document-cookie.md
|
|
3723
|
+
*/
|
|
3724
|
+
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
3725
|
+
/**
|
|
3726
|
+
* Disallow empty files.
|
|
3727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-empty-file.md
|
|
3728
|
+
*/
|
|
3729
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
3730
|
+
/**
|
|
3731
|
+
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
3732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-for-loop.md
|
|
3733
|
+
*/
|
|
3734
|
+
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
3735
|
+
/**
|
|
3736
|
+
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
3737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-hex-escape.md
|
|
3738
|
+
*/
|
|
3739
|
+
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
3740
|
+
/**
|
|
3741
|
+
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
3742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
3743
|
+
* @deprecated
|
|
3744
|
+
*/
|
|
3745
|
+
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
3746
|
+
/**
|
|
3747
|
+
* Disallow `instanceof` with built-in objects
|
|
3748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-instanceof-builtins.md
|
|
3749
|
+
*/
|
|
3750
|
+
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
|
|
3751
|
+
/**
|
|
3752
|
+
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
3753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-fetch-options.md
|
|
3754
|
+
*/
|
|
3755
|
+
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
3756
|
+
/**
|
|
3757
|
+
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
3758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
3759
|
+
*/
|
|
3760
|
+
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
3761
|
+
/**
|
|
3762
|
+
* Disallow identifiers starting with `new` or `class`.
|
|
3763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-keyword-prefix.md
|
|
3764
|
+
*/
|
|
3765
|
+
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
3766
|
+
/**
|
|
3767
|
+
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
3768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
3769
|
+
* @deprecated
|
|
3770
|
+
*/
|
|
3771
|
+
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
|
|
3772
|
+
/**
|
|
3773
|
+
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
3774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-lonely-if.md
|
|
3775
|
+
*/
|
|
3776
|
+
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
3777
|
+
/**
|
|
3778
|
+
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
3779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
3780
|
+
*/
|
|
3781
|
+
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
3782
|
+
/**
|
|
3783
|
+
* Disallow named usage of default import and export.
|
|
3784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-named-default.md
|
|
3785
|
+
*/
|
|
3786
|
+
'unicorn/no-named-default'?: Linter.RuleEntry<[]>
|
|
3787
|
+
/**
|
|
3788
|
+
* Disallow negated conditions.
|
|
3789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negated-condition.md
|
|
3790
|
+
*/
|
|
3791
|
+
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
3792
|
+
/**
|
|
3793
|
+
* Disallow negated expression in equality check.
|
|
3794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-negation-in-equality-check.md
|
|
3795
|
+
*/
|
|
3796
|
+
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
3797
|
+
/**
|
|
3798
|
+
* Disallow nested ternary expressions.
|
|
3799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-nested-ternary.md
|
|
3800
|
+
*/
|
|
3801
|
+
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
3802
|
+
/**
|
|
3803
|
+
* Disallow `new Array()`.
|
|
3804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-array.md
|
|
3805
|
+
*/
|
|
3806
|
+
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
3807
|
+
/**
|
|
3808
|
+
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
3809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-new-buffer.md
|
|
3810
|
+
*/
|
|
3811
|
+
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
3812
|
+
/**
|
|
3813
|
+
* Disallow the use of the `null` literal.
|
|
3814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-null.md
|
|
3815
|
+
*/
|
|
3816
|
+
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
3817
|
+
/**
|
|
3818
|
+
* Disallow the use of objects as default parameters.
|
|
3819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-object-as-default-parameter.md
|
|
3820
|
+
*/
|
|
3821
|
+
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
3822
|
+
/**
|
|
3823
|
+
* Disallow `process.exit()`.
|
|
3824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-process-exit.md
|
|
3825
|
+
*/
|
|
3826
|
+
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
3827
|
+
/**
|
|
3828
|
+
* Disallow passing single-element arrays to `Promise` methods.
|
|
3829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
3830
|
+
*/
|
|
3831
|
+
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
3832
|
+
/**
|
|
3833
|
+
* Disallow classes that only have static members.
|
|
3834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-static-only-class.md
|
|
3835
|
+
*/
|
|
3836
|
+
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
3837
|
+
/**
|
|
3838
|
+
* Disallow `then` property.
|
|
3839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-thenable.md
|
|
3840
|
+
*/
|
|
3841
|
+
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
3842
|
+
/**
|
|
3843
|
+
* Disallow assigning `this` to a variable.
|
|
3844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-this-assignment.md
|
|
3845
|
+
*/
|
|
3846
|
+
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
3847
|
+
/**
|
|
3848
|
+
* Disallow comparing `undefined` using `typeof`.
|
|
3849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-typeof-undefined.md
|
|
3850
|
+
*/
|
|
3851
|
+
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
3852
|
+
/**
|
|
3853
|
+
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
3854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
3855
|
+
*/
|
|
3856
|
+
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
3857
|
+
/**
|
|
3858
|
+
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
3859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
3860
|
+
*/
|
|
3861
|
+
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
|
|
3862
|
+
/**
|
|
3863
|
+
* Disallow awaiting non-promise values.
|
|
3864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-await.md
|
|
3865
|
+
*/
|
|
3866
|
+
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
3867
|
+
/**
|
|
3868
|
+
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
3869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
3870
|
+
*/
|
|
3871
|
+
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
3872
|
+
/**
|
|
3873
|
+
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
3874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
3875
|
+
*/
|
|
3876
|
+
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
|
|
3877
|
+
/**
|
|
3878
|
+
* Disallow unreadable array destructuring.
|
|
3879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
3880
|
+
*/
|
|
3881
|
+
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
3882
|
+
/**
|
|
3883
|
+
* Disallow unreadable IIFEs.
|
|
3884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unreadable-iife.md
|
|
3885
|
+
*/
|
|
3886
|
+
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
3887
|
+
/**
|
|
3888
|
+
* Disallow unused object properties.
|
|
3889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-unused-properties.md
|
|
3890
|
+
*/
|
|
3891
|
+
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
3892
|
+
/**
|
|
3893
|
+
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
3894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
3895
|
+
*/
|
|
3896
|
+
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
|
|
3897
|
+
/**
|
|
3898
|
+
* Disallow useless fallback when spreading in object literals.
|
|
3899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
3900
|
+
*/
|
|
3901
|
+
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
3902
|
+
/**
|
|
3903
|
+
* Disallow useless array length check.
|
|
3904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-length-check.md
|
|
3905
|
+
*/
|
|
3906
|
+
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
3907
|
+
/**
|
|
3908
|
+
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
3909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
3910
|
+
*/
|
|
3911
|
+
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
3912
|
+
/**
|
|
3913
|
+
* Disallow unnecessary spread.
|
|
3914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-spread.md
|
|
3915
|
+
*/
|
|
3916
|
+
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
3917
|
+
/**
|
|
3918
|
+
* Disallow useless case in switch statements.
|
|
3919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-switch-case.md
|
|
3920
|
+
*/
|
|
3921
|
+
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
3922
|
+
/**
|
|
3923
|
+
* Disallow useless `undefined`.
|
|
3924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-useless-undefined.md
|
|
3925
|
+
*/
|
|
3926
|
+
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
3927
|
+
/**
|
|
3928
|
+
* Disallow number literals with zero fractions or dangling dots.
|
|
3929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/no-zero-fractions.md
|
|
3930
|
+
*/
|
|
3931
|
+
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
3932
|
+
/**
|
|
3933
|
+
* Enforce proper case for numeric literals.
|
|
3934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/number-literal-case.md
|
|
3935
|
+
*/
|
|
3936
|
+
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
|
|
3937
|
+
/**
|
|
3938
|
+
* Enforce the style of numeric separators by correctly grouping digits.
|
|
3939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/numeric-separators-style.md
|
|
3940
|
+
*/
|
|
3941
|
+
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
3942
|
+
/**
|
|
3943
|
+
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
3944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-add-event-listener.md
|
|
3945
|
+
*/
|
|
3946
|
+
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
3947
|
+
/**
|
|
3948
|
+
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
3949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-find.md
|
|
3950
|
+
*/
|
|
3951
|
+
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
3952
|
+
/**
|
|
3953
|
+
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
3954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat.md
|
|
3955
|
+
*/
|
|
3956
|
+
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
3957
|
+
/**
|
|
3958
|
+
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
3959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-flat-map.md
|
|
3960
|
+
*/
|
|
3961
|
+
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
3962
|
+
/**
|
|
3963
|
+
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
3964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-index-of.md
|
|
3965
|
+
*/
|
|
3966
|
+
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
3967
|
+
/**
|
|
3968
|
+
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
3969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-array-some.md
|
|
3970
|
+
*/
|
|
3971
|
+
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
3972
|
+
/**
|
|
3973
|
+
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
3974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-at.md
|
|
3975
|
+
*/
|
|
3976
|
+
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
3977
|
+
/**
|
|
3978
|
+
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
3979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
3980
|
+
*/
|
|
3981
|
+
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
3982
|
+
/**
|
|
3983
|
+
* Prefer class field declarations over `this` assignments in constructors.
|
|
3984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-class-fields.md
|
|
3985
|
+
*/
|
|
3986
|
+
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
|
|
3987
|
+
/**
|
|
3988
|
+
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
3989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-code-point.md
|
|
3990
|
+
*/
|
|
3991
|
+
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
3992
|
+
/**
|
|
3993
|
+
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
3994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-date-now.md
|
|
3995
|
+
*/
|
|
3996
|
+
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
3997
|
+
/**
|
|
3998
|
+
* Prefer default parameters over reassignment.
|
|
3999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-default-parameters.md
|
|
4000
|
+
*/
|
|
4001
|
+
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
4002
|
+
/**
|
|
4003
|
+
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
4004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-append.md
|
|
4005
|
+
*/
|
|
4006
|
+
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
4007
|
+
/**
|
|
4008
|
+
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
4009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
4010
|
+
*/
|
|
4011
|
+
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
4012
|
+
/**
|
|
4013
|
+
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
4014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-remove.md
|
|
4015
|
+
*/
|
|
4016
|
+
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
4017
|
+
/**
|
|
4018
|
+
* Prefer `.textContent` over `.innerText`.
|
|
4019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
4020
|
+
*/
|
|
4021
|
+
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
4022
|
+
/**
|
|
4023
|
+
* Prefer `EventTarget` over `EventEmitter`.
|
|
4024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-event-target.md
|
|
4025
|
+
*/
|
|
4026
|
+
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
4027
|
+
/**
|
|
4028
|
+
* Prefer `export…from` when re-exporting.
|
|
4029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-export-from.md
|
|
4030
|
+
*/
|
|
4031
|
+
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
4032
|
+
/**
|
|
4033
|
+
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
4034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-global-this.md
|
|
4035
|
+
*/
|
|
4036
|
+
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
|
|
4037
|
+
/**
|
|
4038
|
+
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
4039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-import-meta-properties.md
|
|
4040
|
+
*/
|
|
4041
|
+
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
|
|
4042
|
+
/**
|
|
4043
|
+
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
4044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-includes.md
|
|
4045
|
+
*/
|
|
4046
|
+
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
4047
|
+
/**
|
|
4048
|
+
* Prefer reading a JSON file as a buffer.
|
|
4049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
4050
|
+
*/
|
|
4051
|
+
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
4052
|
+
/**
|
|
4053
|
+
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
4054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
4055
|
+
*/
|
|
4056
|
+
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
4057
|
+
/**
|
|
4058
|
+
* Prefer using a logical operator over a ternary.
|
|
4059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
4060
|
+
*/
|
|
4061
|
+
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
4062
|
+
/**
|
|
4063
|
+
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
4064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-min-max.md
|
|
4065
|
+
*/
|
|
4066
|
+
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
|
|
4067
|
+
/**
|
|
4068
|
+
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
4069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-math-trunc.md
|
|
4070
|
+
*/
|
|
4071
|
+
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
4072
|
+
/**
|
|
4073
|
+
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
4074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
4075
|
+
*/
|
|
4076
|
+
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
4077
|
+
/**
|
|
4078
|
+
* Prefer modern `Math` APIs over legacy patterns.
|
|
4079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-modern-math-apis.md
|
|
4080
|
+
*/
|
|
4081
|
+
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
4082
|
+
/**
|
|
4083
|
+
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
4084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-module.md
|
|
4085
|
+
*/
|
|
4086
|
+
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
4087
|
+
/**
|
|
4088
|
+
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
4089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
4090
|
+
*/
|
|
4091
|
+
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
4092
|
+
/**
|
|
4093
|
+
* Prefer negative index over `.length - index` when possible.
|
|
4094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-negative-index.md
|
|
4095
|
+
*/
|
|
4096
|
+
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
4097
|
+
/**
|
|
4098
|
+
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
4099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-node-protocol.md
|
|
4100
|
+
*/
|
|
4101
|
+
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
4102
|
+
/**
|
|
4103
|
+
* Prefer `Number` static properties over global ones.
|
|
4104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-number-properties.md
|
|
4105
|
+
*/
|
|
4106
|
+
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
4107
|
+
/**
|
|
4108
|
+
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
4109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-object-from-entries.md
|
|
4110
|
+
*/
|
|
4111
|
+
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
4112
|
+
/**
|
|
4113
|
+
* Prefer omitting the `catch` binding parameter.
|
|
4114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
4115
|
+
*/
|
|
4116
|
+
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
4117
|
+
/**
|
|
4118
|
+
* Prefer borrowing methods from the prototype instead of the instance.
|
|
4119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-prototype-methods.md
|
|
4120
|
+
*/
|
|
4121
|
+
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
4122
|
+
/**
|
|
4123
|
+
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
4124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-query-selector.md
|
|
4125
|
+
*/
|
|
4126
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
4127
|
+
/**
|
|
4128
|
+
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
4129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-reflect-apply.md
|
|
4130
|
+
*/
|
|
4131
|
+
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
4132
|
+
/**
|
|
4133
|
+
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
4134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-regexp-test.md
|
|
4135
|
+
*/
|
|
4136
|
+
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
4137
|
+
/**
|
|
4138
|
+
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
4139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-has.md
|
|
4140
|
+
*/
|
|
4141
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
4142
|
+
/**
|
|
4143
|
+
* Prefer using `Set#size` instead of `Array#length`.
|
|
4144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-set-size.md
|
|
4145
|
+
*/
|
|
4146
|
+
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
4147
|
+
/**
|
|
4148
|
+
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
4149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-single-call.md
|
|
4150
|
+
*/
|
|
4151
|
+
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
|
|
4152
|
+
/**
|
|
4153
|
+
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
4154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-spread.md
|
|
4155
|
+
*/
|
|
4156
|
+
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
4157
|
+
/**
|
|
4158
|
+
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
4159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-raw.md
|
|
4160
|
+
*/
|
|
4161
|
+
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
4162
|
+
/**
|
|
4163
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
4164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-replace-all.md
|
|
4165
|
+
*/
|
|
4166
|
+
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
4167
|
+
/**
|
|
4168
|
+
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
4169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-slice.md
|
|
4170
|
+
*/
|
|
4171
|
+
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
4172
|
+
/**
|
|
4173
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
4174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
4175
|
+
*/
|
|
4176
|
+
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
4177
|
+
/**
|
|
4178
|
+
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
4179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
4180
|
+
*/
|
|
4181
|
+
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
4182
|
+
/**
|
|
4183
|
+
* Prefer using `structuredClone` to create a deep clone.
|
|
4184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-structured-clone.md
|
|
4185
|
+
*/
|
|
4186
|
+
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
4187
|
+
/**
|
|
4188
|
+
* Prefer `switch` over multiple `else-if`.
|
|
4189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-switch.md
|
|
4190
|
+
*/
|
|
4191
|
+
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
4192
|
+
/**
|
|
4193
|
+
* Prefer ternary expressions over simple `if-else` statements.
|
|
4194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-ternary.md
|
|
4195
|
+
*/
|
|
4196
|
+
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
4197
|
+
/**
|
|
4198
|
+
* Prefer top-level await over top-level promises and async function calls.
|
|
4199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-top-level-await.md
|
|
4200
|
+
*/
|
|
4201
|
+
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
4202
|
+
/**
|
|
4203
|
+
* Enforce throwing `TypeError` in type checking conditions.
|
|
4204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prefer-type-error.md
|
|
4205
|
+
*/
|
|
4206
|
+
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
4207
|
+
/**
|
|
4208
|
+
* Prevent abbreviations.
|
|
4209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/prevent-abbreviations.md
|
|
4210
|
+
*/
|
|
4211
|
+
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
4212
|
+
/**
|
|
4213
|
+
* Enforce consistent relative URL style.
|
|
4214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/relative-url-style.md
|
|
4215
|
+
*/
|
|
4216
|
+
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
4217
|
+
/**
|
|
4218
|
+
* Enforce using the separator argument with `Array#join()`.
|
|
4219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-array-join-separator.md
|
|
4220
|
+
*/
|
|
4221
|
+
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
4222
|
+
/**
|
|
4223
|
+
* Require non-empty specifier list in import and export statements.
|
|
4224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-module-specifiers.md
|
|
4225
|
+
*/
|
|
4226
|
+
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
|
|
4227
|
+
/**
|
|
4228
|
+
* Enforce using the digits argument with `Number#toFixed()`.
|
|
4229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
4230
|
+
*/
|
|
4231
|
+
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
4232
|
+
/**
|
|
4233
|
+
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
4234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/require-post-message-target-origin.md
|
|
4235
|
+
*/
|
|
4236
|
+
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
4237
|
+
/**
|
|
4238
|
+
* Enforce better string content.
|
|
4239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/string-content.md
|
|
4240
|
+
*/
|
|
4241
|
+
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
4242
|
+
/**
|
|
4243
|
+
* Enforce consistent brace style for `case` clauses.
|
|
4244
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/switch-case-braces.md
|
|
4245
|
+
*/
|
|
4246
|
+
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
4247
|
+
/**
|
|
4248
|
+
* Fix whitespace-insensitive template indentation.
|
|
4249
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/template-indent.md
|
|
4250
|
+
*/
|
|
4251
|
+
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
4252
|
+
/**
|
|
4253
|
+
* Enforce consistent case for text encoding identifiers.
|
|
4254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/text-encoding-identifier-case.md
|
|
4255
|
+
*/
|
|
4256
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
4257
|
+
/**
|
|
4258
|
+
* Require `new` when creating an error.
|
|
4259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v60.0.0/docs/rules/throw-new-error.md
|
|
4260
|
+
*/
|
|
4261
|
+
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
3563
4262
|
/**
|
|
3564
4263
|
* Require calls to `isNaN()` when checking for `NaN`
|
|
3565
4264
|
* @see https://eslint.org/docs/latest/rules/use-isnan
|
|
@@ -5090,6 +5789,14 @@ type ImportExtensions = ([]|[("always" | "ignorePackages" | "never")] | []|[("al
|
|
|
5090
5789
|
}
|
|
5091
5790
|
ignorePackages?: boolean
|
|
5092
5791
|
checkTypeImports?: boolean
|
|
5792
|
+
pathGroupOverrides?: {
|
|
5793
|
+
pattern: string
|
|
5794
|
+
patternOptions?: {
|
|
5795
|
+
[k: string]: unknown | undefined
|
|
5796
|
+
}
|
|
5797
|
+
action: ("enforce" | "ignore")
|
|
5798
|
+
}[]
|
|
5799
|
+
fix?: boolean
|
|
5093
5800
|
[k: string]: unknown | undefined
|
|
5094
5801
|
}] | []|[{
|
|
5095
5802
|
pattern?: {
|
|
@@ -5097,6 +5804,14 @@ type ImportExtensions = ([]|[("always" | "ignorePackages" | "never")] | []|[("al
|
|
|
5097
5804
|
}
|
|
5098
5805
|
ignorePackages?: boolean
|
|
5099
5806
|
checkTypeImports?: boolean
|
|
5807
|
+
pathGroupOverrides?: {
|
|
5808
|
+
pattern: string
|
|
5809
|
+
patternOptions?: {
|
|
5810
|
+
[k: string]: unknown | undefined
|
|
5811
|
+
}
|
|
5812
|
+
action: ("enforce" | "ignore")
|
|
5813
|
+
}[]
|
|
5814
|
+
fix?: boolean
|
|
5100
5815
|
[k: string]: unknown | undefined
|
|
5101
5816
|
}] | []|[("always" | "ignorePackages" | "never")]|[("always" | "ignorePackages" | "never"), {
|
|
5102
5817
|
[k: string]: ("always" | "ignorePackages" | "never")
|
|
@@ -5317,6 +6032,10 @@ type ImportOrder = []|[{
|
|
|
5317
6032
|
type ImportPreferDefaultExport = []|[{
|
|
5318
6033
|
target?: ("single" | "any")
|
|
5319
6034
|
}]
|
|
6035
|
+
// ----- import/prefer-namespace-import -----
|
|
6036
|
+
type ImportPreferNamespaceImport = []|[{
|
|
6037
|
+
patterns?: string[]
|
|
6038
|
+
}]
|
|
5320
6039
|
// ----- indent -----
|
|
5321
6040
|
type Indent = []|[("tab" | number)]|[("tab" | number), {
|
|
5322
6041
|
SwitchCase?: number
|
|
@@ -6552,6 +7271,10 @@ type RegexpPreferLookaround = []|[{
|
|
|
6552
7271
|
type RegexpPreferNamedReplacement = []|[{
|
|
6553
7272
|
strictTypes?: boolean
|
|
6554
7273
|
}]
|
|
7274
|
+
// ----- regexp/prefer-quantifier -----
|
|
7275
|
+
type RegexpPreferQuantifier = []|[{
|
|
7276
|
+
allows?: string[]
|
|
7277
|
+
}]
|
|
6555
7278
|
// ----- regexp/prefer-range -----
|
|
6556
7279
|
type RegexpPreferRange = []|[{
|
|
6557
7280
|
target?: (("all" | "alphanumeric") | [("all" | "alphanumeric")] | [("alphanumeric" | string), ...(("alphanumeric" | string))[]])
|
|
@@ -8433,6 +9156,8 @@ interface _TsNamingConvention_MatchRegexConfig {
|
|
|
8433
9156
|
// ----- ts/no-base-to-string -----
|
|
8434
9157
|
type TsNoBaseToString = []|[{
|
|
8435
9158
|
|
|
9159
|
+
checkUnknown?: boolean
|
|
9160
|
+
|
|
8436
9161
|
ignoredTypeNames?: string[]
|
|
8437
9162
|
}]
|
|
8438
9163
|
// ----- ts/no-confusing-void-expression -----
|
|
@@ -8747,6 +9472,8 @@ type TsNoUnnecessaryCondition = []|[{
|
|
|
8747
9472
|
// ----- ts/no-unnecessary-type-assertion -----
|
|
8748
9473
|
type TsNoUnnecessaryTypeAssertion = []|[{
|
|
8749
9474
|
|
|
9475
|
+
checkLiteralConstAssertions?: boolean
|
|
9476
|
+
|
|
8750
9477
|
typesToIgnore?: string[]
|
|
8751
9478
|
}]
|
|
8752
9479
|
// ----- ts/no-unused-expressions -----
|
|
@@ -8818,6 +9545,8 @@ type TsOnlyThrowError = []|[{
|
|
|
8818
9545
|
package: string
|
|
8819
9546
|
})[]
|
|
8820
9547
|
|
|
9548
|
+
allowRethrowing?: boolean
|
|
9549
|
+
|
|
8821
9550
|
allowThrowingAny?: boolean
|
|
8822
9551
|
|
|
8823
9552
|
allowThrowingUnknown?: boolean
|
|
@@ -8859,7 +9588,6 @@ type TsPreferDestructuring = []|[({
|
|
|
8859
9588
|
enforceForDeclarationWithTypeAnnotation?: boolean
|
|
8860
9589
|
|
|
8861
9590
|
enforceForRenamedProperties?: boolean
|
|
8862
|
-
[k: string]: unknown | undefined
|
|
8863
9591
|
}]
|
|
8864
9592
|
// ----- ts/prefer-literal-enum-member -----
|
|
8865
9593
|
type TsPreferLiteralEnumMember = []|[{
|
|
@@ -8875,6 +9603,8 @@ type TsPreferNullishCoalescing = []|[{
|
|
|
8875
9603
|
|
|
8876
9604
|
ignoreConditionalTests?: boolean
|
|
8877
9605
|
|
|
9606
|
+
ignoreIfStatements?: boolean
|
|
9607
|
+
|
|
8878
9608
|
ignoreMixedLogicalExpressions?: boolean
|
|
8879
9609
|
|
|
8880
9610
|
ignorePrimitives?: ({
|
|
@@ -8886,7 +9616,6 @@ type TsPreferNullishCoalescing = []|[{
|
|
|
8886
9616
|
number?: boolean
|
|
8887
9617
|
|
|
8888
9618
|
string?: boolean
|
|
8889
|
-
[k: string]: unknown | undefined
|
|
8890
9619
|
} | true)
|
|
8891
9620
|
|
|
8892
9621
|
ignoreTernaryTests?: boolean
|
|
@@ -9103,6 +9832,221 @@ type TsUnifiedSignatures = []|[{
|
|
|
9103
9832
|
}]
|
|
9104
9833
|
// ----- unicode-bom -----
|
|
9105
9834
|
type UnicodeBom = []|[("always" | "never")]
|
|
9835
|
+
// ----- unicorn/better-regex -----
|
|
9836
|
+
type UnicornBetterRegex = []|[{
|
|
9837
|
+
sortCharacterClasses?: boolean
|
|
9838
|
+
}]
|
|
9839
|
+
// ----- unicorn/catch-error-name -----
|
|
9840
|
+
type UnicornCatchErrorName = []|[{
|
|
9841
|
+
name?: string
|
|
9842
|
+
ignore?: unknown[]
|
|
9843
|
+
}]
|
|
9844
|
+
// ----- unicorn/consistent-function-scoping -----
|
|
9845
|
+
type UnicornConsistentFunctionScoping = []|[{
|
|
9846
|
+
checkArrowFunctions?: boolean
|
|
9847
|
+
}]
|
|
9848
|
+
// ----- unicorn/escape-case -----
|
|
9849
|
+
type UnicornEscapeCase = []|[("uppercase" | "lowercase")]
|
|
9850
|
+
// ----- unicorn/expiring-todo-comments -----
|
|
9851
|
+
type UnicornExpiringTodoComments = []|[{
|
|
9852
|
+
terms?: string[]
|
|
9853
|
+
ignore?: unknown[]
|
|
9854
|
+
ignoreDatesOnPullRequests?: boolean
|
|
9855
|
+
allowWarningComments?: boolean
|
|
9856
|
+
date?: string
|
|
9857
|
+
}]
|
|
9858
|
+
// ----- unicorn/explicit-length-check -----
|
|
9859
|
+
type UnicornExplicitLengthCheck = []|[{
|
|
9860
|
+
"non-zero"?: ("greater-than" | "not-equal")
|
|
9861
|
+
}]
|
|
9862
|
+
// ----- unicorn/filename-case -----
|
|
9863
|
+
type UnicornFilenameCase = []|[({
|
|
9864
|
+
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase")
|
|
9865
|
+
ignore?: unknown[]
|
|
9866
|
+
multipleFileExtensions?: boolean
|
|
9867
|
+
} | {
|
|
9868
|
+
cases?: {
|
|
9869
|
+
camelCase?: boolean
|
|
9870
|
+
snakeCase?: boolean
|
|
9871
|
+
kebabCase?: boolean
|
|
9872
|
+
pascalCase?: boolean
|
|
9873
|
+
}
|
|
9874
|
+
ignore?: unknown[]
|
|
9875
|
+
multipleFileExtensions?: boolean
|
|
9876
|
+
})]
|
|
9877
|
+
// ----- unicorn/import-style -----
|
|
9878
|
+
type UnicornImportStyle = []|[{
|
|
9879
|
+
checkImport?: boolean
|
|
9880
|
+
checkDynamicImport?: boolean
|
|
9881
|
+
checkExportFrom?: boolean
|
|
9882
|
+
checkRequire?: boolean
|
|
9883
|
+
extendDefaultStyles?: boolean
|
|
9884
|
+
styles?: _UnicornImportStyle_ModuleStyles
|
|
9885
|
+
}]
|
|
9886
|
+
type _UnicornImportStyleStyles = (false | _UnicornImportStyle_BooleanObject) | undefined
|
|
9887
|
+
interface _UnicornImportStyle_ModuleStyles {
|
|
9888
|
+
[k: string]: _UnicornImportStyleStyles | undefined
|
|
9889
|
+
}
|
|
9890
|
+
interface _UnicornImportStyle_BooleanObject {
|
|
9891
|
+
[k: string]: boolean | undefined
|
|
9892
|
+
}
|
|
9893
|
+
// ----- unicorn/no-array-reduce -----
|
|
9894
|
+
type UnicornNoArrayReduce = []|[{
|
|
9895
|
+
allowSimpleOperations?: boolean
|
|
9896
|
+
}]
|
|
9897
|
+
// ----- unicorn/no-array-reverse -----
|
|
9898
|
+
type UnicornNoArrayReverse = []|[{
|
|
9899
|
+
allowExpressionStatement?: boolean
|
|
9900
|
+
}]
|
|
9901
|
+
// ----- unicorn/no-instanceof-builtins -----
|
|
9902
|
+
type UnicornNoInstanceofBuiltins = []|[{
|
|
9903
|
+
useErrorIsError?: boolean
|
|
9904
|
+
strategy?: ("loose" | "strict")
|
|
9905
|
+
include?: string[]
|
|
9906
|
+
exclude?: string[]
|
|
9907
|
+
}]
|
|
9908
|
+
// ----- unicorn/no-keyword-prefix -----
|
|
9909
|
+
type UnicornNoKeywordPrefix = []|[{
|
|
9910
|
+
|
|
9911
|
+
disallowedPrefixes?: []|[string]
|
|
9912
|
+
checkProperties?: boolean
|
|
9913
|
+
onlyCamelCase?: boolean
|
|
9914
|
+
}]
|
|
9915
|
+
// ----- unicorn/no-null -----
|
|
9916
|
+
type UnicornNoNull = []|[{
|
|
9917
|
+
checkStrictEquality?: boolean
|
|
9918
|
+
}]
|
|
9919
|
+
// ----- unicorn/no-typeof-undefined -----
|
|
9920
|
+
type UnicornNoTypeofUndefined = []|[{
|
|
9921
|
+
checkGlobalVariables?: boolean
|
|
9922
|
+
}]
|
|
9923
|
+
// ----- unicorn/no-unnecessary-polyfills -----
|
|
9924
|
+
type UnicornNoUnnecessaryPolyfills = []|[{
|
|
9925
|
+
targets: (string | unknown[] | {
|
|
9926
|
+
[k: string]: unknown | undefined
|
|
9927
|
+
})
|
|
9928
|
+
}]
|
|
9929
|
+
// ----- unicorn/no-useless-undefined -----
|
|
9930
|
+
type UnicornNoUselessUndefined = []|[{
|
|
9931
|
+
checkArguments?: boolean
|
|
9932
|
+
checkArrowFunctionBody?: boolean
|
|
9933
|
+
}]
|
|
9934
|
+
// ----- unicorn/number-literal-case -----
|
|
9935
|
+
type UnicornNumberLiteralCase = []|[{
|
|
9936
|
+
hexadecimalValue?: ("uppercase" | "lowercase")
|
|
9937
|
+
}]
|
|
9938
|
+
// ----- unicorn/numeric-separators-style -----
|
|
9939
|
+
type UnicornNumericSeparatorsStyle = []|[{
|
|
9940
|
+
binary?: {
|
|
9941
|
+
onlyIfContainsSeparator?: boolean
|
|
9942
|
+
minimumDigits?: number
|
|
9943
|
+
groupLength?: number
|
|
9944
|
+
}
|
|
9945
|
+
octal?: {
|
|
9946
|
+
onlyIfContainsSeparator?: boolean
|
|
9947
|
+
minimumDigits?: number
|
|
9948
|
+
groupLength?: number
|
|
9949
|
+
}
|
|
9950
|
+
hexadecimal?: {
|
|
9951
|
+
onlyIfContainsSeparator?: boolean
|
|
9952
|
+
minimumDigits?: number
|
|
9953
|
+
groupLength?: number
|
|
9954
|
+
}
|
|
9955
|
+
number?: {
|
|
9956
|
+
onlyIfContainsSeparator?: boolean
|
|
9957
|
+
minimumDigits?: number
|
|
9958
|
+
groupLength?: number
|
|
9959
|
+
}
|
|
9960
|
+
onlyIfContainsSeparator?: boolean
|
|
9961
|
+
}]
|
|
9962
|
+
// ----- unicorn/prefer-add-event-listener -----
|
|
9963
|
+
type UnicornPreferAddEventListener = []|[{
|
|
9964
|
+
excludedPackages?: string[]
|
|
9965
|
+
}]
|
|
9966
|
+
// ----- unicorn/prefer-array-find -----
|
|
9967
|
+
type UnicornPreferArrayFind = []|[{
|
|
9968
|
+
checkFromLast?: boolean
|
|
9969
|
+
}]
|
|
9970
|
+
// ----- unicorn/prefer-array-flat -----
|
|
9971
|
+
type UnicornPreferArrayFlat = []|[{
|
|
9972
|
+
functions?: unknown[]
|
|
9973
|
+
}]
|
|
9974
|
+
// ----- unicorn/prefer-at -----
|
|
9975
|
+
type UnicornPreferAt = []|[{
|
|
9976
|
+
getLastElementFunctions?: unknown[]
|
|
9977
|
+
checkAllIndexAccess?: boolean
|
|
9978
|
+
}]
|
|
9979
|
+
// ----- unicorn/prefer-export-from -----
|
|
9980
|
+
type UnicornPreferExportFrom = []|[{
|
|
9981
|
+
ignoreUsedVariables?: boolean
|
|
9982
|
+
}]
|
|
9983
|
+
// ----- unicorn/prefer-number-properties -----
|
|
9984
|
+
type UnicornPreferNumberProperties = []|[{
|
|
9985
|
+
checkInfinity?: boolean
|
|
9986
|
+
checkNaN?: boolean
|
|
9987
|
+
}]
|
|
9988
|
+
// ----- unicorn/prefer-object-from-entries -----
|
|
9989
|
+
type UnicornPreferObjectFromEntries = []|[{
|
|
9990
|
+
functions?: unknown[]
|
|
9991
|
+
}]
|
|
9992
|
+
// ----- unicorn/prefer-single-call -----
|
|
9993
|
+
type UnicornPreferSingleCall = []|[{
|
|
9994
|
+
ignore?: unknown[]
|
|
9995
|
+
}]
|
|
9996
|
+
// ----- unicorn/prefer-structured-clone -----
|
|
9997
|
+
type UnicornPreferStructuredClone = []|[{
|
|
9998
|
+
functions?: unknown[]
|
|
9999
|
+
}]
|
|
10000
|
+
// ----- unicorn/prefer-switch -----
|
|
10001
|
+
type UnicornPreferSwitch = []|[{
|
|
10002
|
+
minimumCases?: number
|
|
10003
|
+
emptyDefaultCase?: ("no-default-comment" | "do-nothing-comment" | "no-default-case")
|
|
10004
|
+
}]
|
|
10005
|
+
// ----- unicorn/prefer-ternary -----
|
|
10006
|
+
type UnicornPreferTernary = []|[("always" | "only-single-line")]
|
|
10007
|
+
// ----- unicorn/prevent-abbreviations -----
|
|
10008
|
+
type UnicornPreventAbbreviations = []|[{
|
|
10009
|
+
checkProperties?: boolean
|
|
10010
|
+
checkVariables?: boolean
|
|
10011
|
+
checkDefaultAndNamespaceImports?: (boolean | string)
|
|
10012
|
+
checkShorthandImports?: (boolean | string)
|
|
10013
|
+
checkShorthandProperties?: boolean
|
|
10014
|
+
checkFilenames?: boolean
|
|
10015
|
+
extendDefaultReplacements?: boolean
|
|
10016
|
+
replacements?: _UnicornPreventAbbreviations_Abbreviations
|
|
10017
|
+
extendDefaultAllowList?: boolean
|
|
10018
|
+
allowList?: _UnicornPreventAbbreviations_BooleanObject
|
|
10019
|
+
ignore?: unknown[]
|
|
10020
|
+
}]
|
|
10021
|
+
type _UnicornPreventAbbreviationsReplacements = (false | _UnicornPreventAbbreviations_BooleanObject) | undefined
|
|
10022
|
+
interface _UnicornPreventAbbreviations_Abbreviations {
|
|
10023
|
+
[k: string]: _UnicornPreventAbbreviationsReplacements | undefined
|
|
10024
|
+
}
|
|
10025
|
+
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
10026
|
+
[k: string]: boolean | undefined
|
|
10027
|
+
}
|
|
10028
|
+
// ----- unicorn/relative-url-style -----
|
|
10029
|
+
type UnicornRelativeUrlStyle = []|[("never" | "always")]
|
|
10030
|
+
// ----- unicorn/string-content -----
|
|
10031
|
+
type UnicornStringContent = []|[{
|
|
10032
|
+
patterns?: {
|
|
10033
|
+
[k: string]: (string | {
|
|
10034
|
+
suggest: string
|
|
10035
|
+
fix?: boolean
|
|
10036
|
+
message?: string
|
|
10037
|
+
}) | undefined
|
|
10038
|
+
}
|
|
10039
|
+
}]
|
|
10040
|
+
// ----- unicorn/switch-case-braces -----
|
|
10041
|
+
type UnicornSwitchCaseBraces = []|[("always" | "avoid")]
|
|
10042
|
+
// ----- unicorn/template-indent -----
|
|
10043
|
+
type UnicornTemplateIndent = []|[{
|
|
10044
|
+
indent?: (string | number)
|
|
10045
|
+
tags?: string[]
|
|
10046
|
+
functions?: string[]
|
|
10047
|
+
selectors?: string[]
|
|
10048
|
+
comments?: string[]
|
|
10049
|
+
}]
|
|
9106
10050
|
// ----- use-isnan -----
|
|
9107
10051
|
type UseIsnan = []|[{
|
|
9108
10052
|
enforceForSwitchCase?: boolean
|
|
@@ -10312,7 +11256,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
10312
11256
|
onlyEquality?: boolean
|
|
10313
11257
|
}]
|
|
10314
11258
|
// Names of all the configs
|
|
10315
|
-
type ConfigNames = 'lntvow/custom/setup' | 'lntvow/javascript/setup' | 'lntvow/javascript/rules' | 'lntvow/prettier/setup' | 'lntvow/prettier/rules' | 'lntvow/imports/setup' | 'lntvow/imports/rules' | 'lntvow/typescript/setup' | 'lntvow/typescript/rules' | 'lntvow/vue/setup' | 'lntvow/vue/rules' | 'lntvow/regexp/setup' | 'lntvow/regexp/rules' | 'lntvow/test/setup' | 'lntvow/test/rules' | 'lntvow/
|
|
11259
|
+
type ConfigNames = 'lntvow/custom/setup' | 'lntvow/javascript/setup' | 'lntvow/javascript/rules' | 'lntvow/prettier/setup' | 'lntvow/prettier/rules' | 'lntvow/imports/setup' | 'lntvow/imports/rules' | 'lntvow/unicorn/setup' | 'lntvow/unicorn/rules' | 'lntvow/typescript/setup' | 'lntvow/typescript/rules' | 'lntvow/vue/setup' | 'lntvow/vue/rules' | 'lntvow/regexp/setup' | 'lntvow/regexp/rules' | 'lntvow/test/setup' | 'lntvow/test/rules' | 'lntvow/prettier/setup' | 'lntvow/prettier/rules' | 'lntvow/disables/scripts' | 'lntvow/disables/cli' | 'lntvow/disables/dts' | 'lntvow/disables/test' | 'lntvow/disables/cjs' | 'lntvow/stylistic/setup' | 'lntvow/stylistic/rules'
|
|
10316
11260
|
|
|
10317
11261
|
type Awaitable<T> = T | Promise<T>;
|
|
10318
11262
|
type Rules = RuleOptions;
|