@vinicunca/eslint-config 2.6.1 → 2.6.2
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/dist/index.cjs +2 -0
- package/dist/index.d.cts +232 -186
- package/dist/index.d.ts +232 -186
- package/dist/index.js +2 -0
- package/package.json +17 -17
package/dist/index.d.ts
CHANGED
|
@@ -386,42 +386,42 @@ interface RuleOptions {
|
|
|
386
386
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
387
387
|
/**
|
|
388
388
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
389
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
389
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/consistent-type-specifier-style.md
|
|
390
390
|
*/
|
|
391
391
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
392
392
|
/**
|
|
393
393
|
* Ensure a default export is present, given a default import.
|
|
394
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
394
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/default.md
|
|
395
395
|
*/
|
|
396
396
|
'import/default'?: Linter.RuleEntry<[]>
|
|
397
397
|
/**
|
|
398
398
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
399
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
399
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/dynamic-import-chunkname.md
|
|
400
400
|
*/
|
|
401
401
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
402
402
|
/**
|
|
403
403
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
404
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
404
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/export.md
|
|
405
405
|
*/
|
|
406
406
|
'import/export'?: Linter.RuleEntry<[]>
|
|
407
407
|
/**
|
|
408
408
|
* Ensure all exports appear after other statements.
|
|
409
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
409
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/exports-last.md
|
|
410
410
|
*/
|
|
411
411
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
412
412
|
/**
|
|
413
413
|
* Ensure consistent use of file extension within the import path.
|
|
414
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
414
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/extensions.md
|
|
415
415
|
*/
|
|
416
416
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
417
417
|
/**
|
|
418
418
|
* Ensure all imports appear before other statements.
|
|
419
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
419
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/first.md
|
|
420
420
|
*/
|
|
421
421
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
422
422
|
/**
|
|
423
423
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
424
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
424
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/group-exports.md
|
|
425
425
|
*/
|
|
426
426
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
427
427
|
/**
|
|
@@ -432,182 +432,182 @@ interface RuleOptions {
|
|
|
432
432
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
433
433
|
/**
|
|
434
434
|
* Enforce the maximum number of dependencies a module can have.
|
|
435
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
435
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/max-dependencies.md
|
|
436
436
|
*/
|
|
437
437
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
438
438
|
/**
|
|
439
439
|
* Ensure named imports correspond to a named export in the remote file.
|
|
440
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
440
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/named.md
|
|
441
441
|
*/
|
|
442
442
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
443
443
|
/**
|
|
444
444
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
445
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
445
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/namespace.md
|
|
446
446
|
*/
|
|
447
447
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
448
448
|
/**
|
|
449
449
|
* Enforce a newline after import statements.
|
|
450
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
450
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/newline-after-import.md
|
|
451
451
|
*/
|
|
452
452
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
453
453
|
/**
|
|
454
454
|
* Forbid import of modules using absolute paths.
|
|
455
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
455
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-absolute-path.md
|
|
456
456
|
*/
|
|
457
457
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
458
458
|
/**
|
|
459
459
|
* Forbid AMD `require` and `define` calls.
|
|
460
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
460
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-amd.md
|
|
461
461
|
*/
|
|
462
462
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
463
463
|
/**
|
|
464
464
|
* Forbid anonymous values as default exports.
|
|
465
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
465
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-anonymous-default-export.md
|
|
466
466
|
*/
|
|
467
467
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
468
468
|
/**
|
|
469
469
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
470
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
470
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-commonjs.md
|
|
471
471
|
*/
|
|
472
472
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
473
473
|
/**
|
|
474
474
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
475
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
475
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-cycle.md
|
|
476
476
|
*/
|
|
477
477
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
478
478
|
/**
|
|
479
479
|
* Forbid default exports.
|
|
480
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
480
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-default-export.md
|
|
481
481
|
*/
|
|
482
482
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
483
483
|
/**
|
|
484
484
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
485
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
485
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-deprecated.md
|
|
486
486
|
*/
|
|
487
487
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
488
488
|
/**
|
|
489
489
|
* Forbid repeated import of the same module in multiple places.
|
|
490
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
490
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-duplicates.md
|
|
491
491
|
*/
|
|
492
492
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
493
493
|
/**
|
|
494
494
|
* Forbid `require()` calls with expressions.
|
|
495
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
495
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-dynamic-require.md
|
|
496
496
|
*/
|
|
497
497
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
498
498
|
/**
|
|
499
499
|
* Forbid empty named import blocks.
|
|
500
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
500
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-empty-named-blocks.md
|
|
501
501
|
*/
|
|
502
502
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
503
503
|
/**
|
|
504
504
|
* Forbid the use of extraneous packages.
|
|
505
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
505
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-extraneous-dependencies.md
|
|
506
506
|
*/
|
|
507
507
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
508
508
|
/**
|
|
509
509
|
* Forbid import statements with CommonJS module.exports.
|
|
510
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
510
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-import-module-exports.md
|
|
511
511
|
*/
|
|
512
512
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
513
513
|
/**
|
|
514
514
|
* Forbid importing the submodules of other modules.
|
|
515
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
515
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-internal-modules.md
|
|
516
516
|
*/
|
|
517
517
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
518
518
|
/**
|
|
519
519
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
520
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
520
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-mutable-exports.md
|
|
521
521
|
*/
|
|
522
522
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
523
523
|
/**
|
|
524
524
|
* Forbid use of exported name as identifier of default export.
|
|
525
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
525
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-named-as-default.md
|
|
526
526
|
*/
|
|
527
527
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
528
528
|
/**
|
|
529
529
|
* Forbid use of exported name as property of default export.
|
|
530
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
530
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-named-as-default-member.md
|
|
531
531
|
*/
|
|
532
532
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
533
533
|
/**
|
|
534
534
|
* Forbid named default exports.
|
|
535
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
535
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-named-default.md
|
|
536
536
|
*/
|
|
537
537
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
538
538
|
/**
|
|
539
539
|
* Forbid named exports.
|
|
540
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
540
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-named-export.md
|
|
541
541
|
*/
|
|
542
542
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
543
543
|
/**
|
|
544
544
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
545
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
545
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-namespace.md
|
|
546
546
|
*/
|
|
547
547
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
548
548
|
/**
|
|
549
549
|
* Forbid Node.js builtin modules.
|
|
550
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
550
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-nodejs-modules.md
|
|
551
551
|
*/
|
|
552
552
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
553
553
|
/**
|
|
554
554
|
* Forbid importing packages through relative paths.
|
|
555
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
555
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-relative-packages.md
|
|
556
556
|
*/
|
|
557
557
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
558
558
|
/**
|
|
559
559
|
* Forbid importing modules from parent directories.
|
|
560
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
560
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-relative-parent-imports.md
|
|
561
561
|
*/
|
|
562
562
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
563
563
|
/**
|
|
564
564
|
* Enforce which files can be imported in a given folder.
|
|
565
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
565
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-restricted-paths.md
|
|
566
566
|
*/
|
|
567
567
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
568
568
|
/**
|
|
569
569
|
* Forbid a module from importing itself.
|
|
570
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
570
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-self-import.md
|
|
571
571
|
*/
|
|
572
572
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
573
573
|
/**
|
|
574
574
|
* Forbid unassigned imports.
|
|
575
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
575
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-unassigned-import.md
|
|
576
576
|
*/
|
|
577
577
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
578
578
|
/**
|
|
579
579
|
* Ensure imports point to a file/module that can be resolved.
|
|
580
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
580
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-unresolved.md
|
|
581
581
|
*/
|
|
582
582
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
583
583
|
/**
|
|
584
584
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
585
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
585
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-unused-modules.md
|
|
586
586
|
*/
|
|
587
587
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
588
588
|
/**
|
|
589
589
|
* Forbid unnecessary path segments in import and require statements.
|
|
590
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
590
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-useless-path-segments.md
|
|
591
591
|
*/
|
|
592
592
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
593
593
|
/**
|
|
594
594
|
* Forbid webpack loader syntax in imports.
|
|
595
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
595
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/no-webpack-loader-syntax.md
|
|
596
596
|
*/
|
|
597
597
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
598
598
|
/**
|
|
599
599
|
* Enforce a convention in module import order.
|
|
600
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
600
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/order.md
|
|
601
601
|
*/
|
|
602
602
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
603
603
|
/**
|
|
604
604
|
* Prefer a default export if module exports a single name or multiple names.
|
|
605
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
605
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/prefer-default-export.md
|
|
606
606
|
*/
|
|
607
607
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
608
608
|
/**
|
|
609
609
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
610
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.
|
|
610
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v0.5.3/docs/rules/unambiguous.md
|
|
611
611
|
*/
|
|
612
612
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
613
613
|
/**
|
|
@@ -3668,8 +3668,9 @@ interface RuleOptions {
|
|
|
3668
3668
|
*/
|
|
3669
3669
|
'style/jsx-function-call-newline'?: Linter.RuleEntry<StyleJsxFunctionCallNewline>
|
|
3670
3670
|
/**
|
|
3671
|
-
* Enforce JSX indentation
|
|
3671
|
+
* Enforce JSX indentation. Deprecated, use `indent` rule instead.
|
|
3672
3672
|
* @see https://eslint.style/rules/jsx/jsx-indent
|
|
3673
|
+
* @deprecated
|
|
3673
3674
|
*/
|
|
3674
3675
|
'style/jsx-indent'?: Linter.RuleEntry<StyleJsxIndent>
|
|
3675
3676
|
/**
|
|
@@ -3854,7 +3855,7 @@ interface RuleOptions {
|
|
|
3854
3855
|
'style/nonblock-statement-body-position'?: Linter.RuleEntry<StyleNonblockStatementBodyPosition>
|
|
3855
3856
|
/**
|
|
3856
3857
|
* Enforce consistent line breaks after opening and before closing braces
|
|
3857
|
-
* @see https://eslint.style/rules/
|
|
3858
|
+
* @see https://eslint.style/rules/ts/object-curly-newline
|
|
3858
3859
|
*/
|
|
3859
3860
|
'style/object-curly-newline'?: Linter.RuleEntry<StyleObjectCurlyNewline>
|
|
3860
3861
|
/**
|
|
@@ -3864,7 +3865,7 @@ interface RuleOptions {
|
|
|
3864
3865
|
'style/object-curly-spacing'?: Linter.RuleEntry<StyleObjectCurlySpacing>
|
|
3865
3866
|
/**
|
|
3866
3867
|
* Enforce placing object properties on separate lines
|
|
3867
|
-
* @see https://eslint.style/rules/
|
|
3868
|
+
* @see https://eslint.style/rules/ts/object-property-newline
|
|
3868
3869
|
*/
|
|
3869
3870
|
'style/object-property-newline'?: Linter.RuleEntry<StyleObjectPropertyNewline>
|
|
3870
3871
|
/**
|
|
@@ -4527,6 +4528,11 @@ interface RuleOptions {
|
|
|
4527
4528
|
* @see https://typescript-eslint.io/rules/no-empty-interface
|
|
4528
4529
|
*/
|
|
4529
4530
|
'ts/no-empty-interface'?: Linter.RuleEntry<TsNoEmptyInterface>
|
|
4531
|
+
/**
|
|
4532
|
+
* Disallow accidentally using the "empty object" type
|
|
4533
|
+
* @see https://typescript-eslint.io/rules/no-empty-object-type
|
|
4534
|
+
*/
|
|
4535
|
+
'ts/no-empty-object-type'?: Linter.RuleEntry<TsNoEmptyObjectType>
|
|
4530
4536
|
/**
|
|
4531
4537
|
* Disallow the `any` type
|
|
4532
4538
|
* @see https://typescript-eslint.io/rules/no-explicit-any
|
|
@@ -4952,7 +4958,7 @@ interface RuleOptions {
|
|
|
4952
4958
|
*/
|
|
4953
4959
|
'ts/restrict-template-expressions'?: Linter.RuleEntry<TsRestrictTemplateExpressions>
|
|
4954
4960
|
/**
|
|
4955
|
-
* Enforce consistent
|
|
4961
|
+
* Enforce consistent awaiting of returned promises
|
|
4956
4962
|
* @see https://typescript-eslint.io/rules/return-await
|
|
4957
4963
|
*/
|
|
4958
4964
|
'ts/return-await'?: Linter.RuleEntry<TsReturnAwait>
|
|
@@ -4965,6 +4971,7 @@ interface RuleOptions {
|
|
|
4965
4971
|
/**
|
|
4966
4972
|
* Enforce constituents of a type union/intersection to be sorted alphabetically
|
|
4967
4973
|
* @see https://typescript-eslint.io/rules/sort-type-constituents
|
|
4974
|
+
* @deprecated
|
|
4968
4975
|
*/
|
|
4969
4976
|
'ts/sort-type-constituents'?: Linter.RuleEntry<TsSortTypeConstituents>
|
|
4970
4977
|
/**
|
|
@@ -5033,677 +5040,682 @@ interface RuleOptions {
|
|
|
5033
5040
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>
|
|
5034
5041
|
/**
|
|
5035
5042
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md
|
|
5037
5044
|
*/
|
|
5038
5045
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
|
|
5039
5046
|
/**
|
|
5040
5047
|
* Enforce a specific parameter name in catch clauses.
|
|
5041
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md
|
|
5042
5049
|
*/
|
|
5043
5050
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
|
|
5044
5051
|
/**
|
|
5045
5052
|
* Use destructured variables over properties.
|
|
5046
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md
|
|
5047
5054
|
*/
|
|
5048
5055
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
|
|
5049
5056
|
/**
|
|
5050
5057
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5051
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5052
5059
|
*/
|
|
5053
5060
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
|
|
5054
5061
|
/**
|
|
5055
5062
|
* Move function definitions to the highest possible scope.
|
|
5056
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md
|
|
5057
5064
|
*/
|
|
5058
5065
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
|
|
5059
5066
|
/**
|
|
5060
5067
|
* Enforce correct `Error` subclassing.
|
|
5061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md
|
|
5062
5069
|
*/
|
|
5063
5070
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
|
|
5064
5071
|
/**
|
|
5065
5072
|
* Enforce no spaces between braces.
|
|
5066
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md
|
|
5067
5074
|
*/
|
|
5068
5075
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
|
|
5069
5076
|
/**
|
|
5070
5077
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5071
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md
|
|
5072
5079
|
*/
|
|
5073
5080
|
'unicorn/error-message'?: Linter.RuleEntry<[]>
|
|
5074
5081
|
/**
|
|
5075
5082
|
* Require escape sequences to use uppercase values.
|
|
5076
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md
|
|
5077
5084
|
*/
|
|
5078
5085
|
'unicorn/escape-case'?: Linter.RuleEntry<[]>
|
|
5079
5086
|
/**
|
|
5080
5087
|
* Add expiration conditions to TODO comments.
|
|
5081
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md
|
|
5082
5089
|
*/
|
|
5083
5090
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
|
|
5084
5091
|
/**
|
|
5085
5092
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5086
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md
|
|
5087
5094
|
*/
|
|
5088
5095
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
|
|
5089
5096
|
/**
|
|
5090
5097
|
* Enforce a case style for filenames.
|
|
5091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md
|
|
5092
5099
|
*/
|
|
5093
5100
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
|
|
5094
5101
|
/**
|
|
5095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#import-index
|
|
5096
5103
|
* @deprecated
|
|
5097
5104
|
*/
|
|
5098
5105
|
'unicorn/import-index'?: Linter.RuleEntry<[]>
|
|
5099
5106
|
/**
|
|
5100
5107
|
* Enforce specific import styles per module.
|
|
5101
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md
|
|
5102
5109
|
*/
|
|
5103
5110
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
|
|
5104
5111
|
/**
|
|
5105
5112
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5106
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5113
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md
|
|
5107
5114
|
*/
|
|
5108
5115
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
|
|
5109
5116
|
/**
|
|
5110
5117
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5111
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5112
5119
|
*/
|
|
5113
5120
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
|
|
5114
5121
|
/**
|
|
5115
5122
|
* Disallow anonymous functions and classes as the default export.
|
|
5116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5123
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md
|
|
5117
5124
|
*/
|
|
5118
5125
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
|
|
5119
5126
|
/**
|
|
5120
5127
|
* Prevent passing a function reference directly to iterator methods.
|
|
5121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md
|
|
5122
5129
|
*/
|
|
5123
5130
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
|
|
5124
5131
|
/**
|
|
5125
5132
|
* Prefer `for…of` over the `forEach` method.
|
|
5126
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md
|
|
5127
5134
|
*/
|
|
5128
5135
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
|
|
5129
5136
|
/**
|
|
5130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-array-instanceof
|
|
5131
5138
|
* @deprecated
|
|
5132
5139
|
*/
|
|
5133
5140
|
'unicorn/no-array-instanceof'?: Linter.RuleEntry<[]>
|
|
5134
5141
|
/**
|
|
5135
5142
|
* Disallow using the `this` argument in array methods.
|
|
5136
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5143
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md
|
|
5137
5144
|
*/
|
|
5138
5145
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
|
|
5139
5146
|
/**
|
|
5140
5147
|
* Enforce combining multiple `Array#push()` into one call.
|
|
5141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5148
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md
|
|
5142
5149
|
*/
|
|
5143
5150
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<UnicornNoArrayPushPush>
|
|
5144
5151
|
/**
|
|
5145
5152
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md
|
|
5147
5154
|
*/
|
|
5148
5155
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
|
|
5149
5156
|
/**
|
|
5150
5157
|
* Disallow member access from await expression.
|
|
5151
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5158
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md
|
|
5152
5159
|
*/
|
|
5153
5160
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
|
|
5154
5161
|
/**
|
|
5155
5162
|
* Disallow using `await` in `Promise` method parameters.
|
|
5156
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5157
5164
|
*/
|
|
5158
5165
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
5159
5166
|
/**
|
|
5160
5167
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5161
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5168
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md
|
|
5162
5169
|
*/
|
|
5163
5170
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
|
|
5164
5171
|
/**
|
|
5165
5172
|
* Do not use `document.cookie` directly.
|
|
5166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5173
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-document-cookie.md
|
|
5167
5174
|
*/
|
|
5168
5175
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
|
|
5169
5176
|
/**
|
|
5170
5177
|
* Disallow empty files.
|
|
5171
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-empty-file.md
|
|
5172
5179
|
*/
|
|
5173
5180
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
|
|
5174
5181
|
/**
|
|
5175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-fn-reference-in-iterator
|
|
5176
5183
|
* @deprecated
|
|
5177
5184
|
*/
|
|
5178
5185
|
'unicorn/no-fn-reference-in-iterator'?: Linter.RuleEntry<[]>
|
|
5179
5186
|
/**
|
|
5180
5187
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5181
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md
|
|
5182
5189
|
*/
|
|
5183
5190
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
|
|
5184
5191
|
/**
|
|
5185
5192
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5186
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md
|
|
5187
5194
|
*/
|
|
5188
5195
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
|
|
5189
5196
|
/**
|
|
5190
5197
|
* Require `Array.isArray()` instead of `instanceof Array`.
|
|
5191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md
|
|
5192
5199
|
*/
|
|
5193
5200
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
|
|
5194
5201
|
/**
|
|
5195
5202
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5196
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5197
5204
|
*/
|
|
5198
5205
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
|
|
5199
5206
|
/**
|
|
5200
5207
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5201
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5202
5209
|
*/
|
|
5203
5210
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
|
|
5204
5211
|
/**
|
|
5205
5212
|
* Disallow identifiers starting with `new` or `class`.
|
|
5206
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md
|
|
5207
5214
|
*/
|
|
5208
5215
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
|
|
5209
5216
|
/**
|
|
5210
5217
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5211
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md
|
|
5212
5219
|
*/
|
|
5213
5220
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
|
|
5214
5221
|
/**
|
|
5215
5222
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5217
5224
|
*/
|
|
5218
5225
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
|
|
5219
5226
|
/**
|
|
5220
5227
|
* Disallow negated conditions.
|
|
5221
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negated-condition.md
|
|
5222
5229
|
*/
|
|
5223
5230
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
|
|
5231
|
+
/**
|
|
5232
|
+
* Disallow negated expression in equality check.
|
|
5233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5234
|
+
*/
|
|
5235
|
+
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
|
|
5224
5236
|
/**
|
|
5225
5237
|
* Disallow nested ternary expressions.
|
|
5226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md
|
|
5227
5239
|
*/
|
|
5228
5240
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
|
|
5229
5241
|
/**
|
|
5230
5242
|
* Disallow `new Array()`.
|
|
5231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-array.md
|
|
5232
5244
|
*/
|
|
5233
5245
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>
|
|
5234
5246
|
/**
|
|
5235
5247
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md
|
|
5237
5249
|
*/
|
|
5238
5250
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
|
|
5239
5251
|
/**
|
|
5240
5252
|
* Disallow the use of the `null` literal.
|
|
5241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md
|
|
5242
5254
|
*/
|
|
5243
5255
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
|
|
5244
5256
|
/**
|
|
5245
5257
|
* Disallow the use of objects as default parameters.
|
|
5246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5247
5259
|
*/
|
|
5248
5260
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
|
|
5249
5261
|
/**
|
|
5250
5262
|
* Disallow `process.exit()`.
|
|
5251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-process-exit.md
|
|
5252
5264
|
*/
|
|
5253
5265
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
|
|
5254
5266
|
/**
|
|
5255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-reduce
|
|
5256
5268
|
* @deprecated
|
|
5257
5269
|
*/
|
|
5258
5270
|
'unicorn/no-reduce'?: Linter.RuleEntry<[]>
|
|
5259
5271
|
/**
|
|
5260
5272
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5262
5274
|
*/
|
|
5263
5275
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
|
|
5264
5276
|
/**
|
|
5265
5277
|
* Disallow classes that only have static members.
|
|
5266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md
|
|
5267
5279
|
*/
|
|
5268
5280
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
|
|
5269
5281
|
/**
|
|
5270
5282
|
* Disallow `then` property.
|
|
5271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-thenable.md
|
|
5272
5284
|
*/
|
|
5273
5285
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>
|
|
5274
5286
|
/**
|
|
5275
5287
|
* Disallow assigning `this` to a variable.
|
|
5276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md
|
|
5277
5289
|
*/
|
|
5278
5290
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
|
|
5279
5291
|
/**
|
|
5280
5292
|
* Disallow comparing `undefined` using `typeof`.
|
|
5281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md
|
|
5282
5294
|
*/
|
|
5283
5295
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
|
|
5284
5296
|
/**
|
|
5285
5297
|
* Disallow awaiting non-promise values.
|
|
5286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md
|
|
5287
5299
|
*/
|
|
5288
5300
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
|
|
5289
5301
|
/**
|
|
5290
5302
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5292
5304
|
*/
|
|
5293
5305
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
|
|
5294
5306
|
/**
|
|
5295
5307
|
* Disallow unreadable array destructuring.
|
|
5296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5297
5309
|
*/
|
|
5298
5310
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
|
|
5299
5311
|
/**
|
|
5300
5312
|
* Disallow unreadable IIFEs.
|
|
5301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-iife.md
|
|
5302
5314
|
*/
|
|
5303
5315
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
|
|
5304
5316
|
/**
|
|
5305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#no-unsafe-regex
|
|
5306
5318
|
* @deprecated
|
|
5307
5319
|
*/
|
|
5308
5320
|
'unicorn/no-unsafe-regex'?: Linter.RuleEntry<[]>
|
|
5309
5321
|
/**
|
|
5310
5322
|
* Disallow unused object properties.
|
|
5311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md
|
|
5312
5324
|
*/
|
|
5313
5325
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
|
|
5314
5326
|
/**
|
|
5315
5327
|
* Disallow useless fallback when spreading in object literals.
|
|
5316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5317
5329
|
*/
|
|
5318
5330
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
|
|
5319
5331
|
/**
|
|
5320
5332
|
* Disallow useless array length check.
|
|
5321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md
|
|
5322
5334
|
*/
|
|
5323
5335
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
|
|
5324
5336
|
/**
|
|
5325
5337
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5327
5339
|
*/
|
|
5328
5340
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
|
|
5329
5341
|
/**
|
|
5330
5342
|
* Disallow unnecessary spread.
|
|
5331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-spread.md
|
|
5332
5344
|
*/
|
|
5333
5345
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
|
|
5334
5346
|
/**
|
|
5335
5347
|
* Disallow useless case in switch statements.
|
|
5336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md
|
|
5337
5349
|
*/
|
|
5338
5350
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
|
|
5339
5351
|
/**
|
|
5340
5352
|
* Disallow useless `undefined`.
|
|
5341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md
|
|
5342
5354
|
*/
|
|
5343
5355
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
|
|
5344
5356
|
/**
|
|
5345
5357
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md
|
|
5347
5359
|
*/
|
|
5348
5360
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
|
|
5349
5361
|
/**
|
|
5350
5362
|
* Enforce proper case for numeric literals.
|
|
5351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md
|
|
5352
5364
|
*/
|
|
5353
5365
|
'unicorn/number-literal-case'?: Linter.RuleEntry<[]>
|
|
5354
5366
|
/**
|
|
5355
5367
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md
|
|
5357
5369
|
*/
|
|
5358
5370
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
|
|
5359
5371
|
/**
|
|
5360
5372
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md
|
|
5362
5374
|
*/
|
|
5363
5375
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
|
|
5364
5376
|
/**
|
|
5365
5377
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md
|
|
5367
5379
|
*/
|
|
5368
5380
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
|
|
5369
5381
|
/**
|
|
5370
5382
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md
|
|
5372
5384
|
*/
|
|
5373
5385
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
|
|
5374
5386
|
/**
|
|
5375
5387
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md
|
|
5377
5389
|
*/
|
|
5378
5390
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
|
|
5379
5391
|
/**
|
|
5380
5392
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md
|
|
5382
5394
|
*/
|
|
5383
5395
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
|
|
5384
5396
|
/**
|
|
5385
|
-
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast}(…)`.
|
|
5386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5397
|
+
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md
|
|
5387
5399
|
*/
|
|
5388
5400
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
|
|
5389
5401
|
/**
|
|
5390
5402
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md
|
|
5392
5404
|
*/
|
|
5393
5405
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
|
|
5394
5406
|
/**
|
|
5395
5407
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5397
5409
|
*/
|
|
5398
5410
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
|
|
5399
5411
|
/**
|
|
5400
5412
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md
|
|
5402
5414
|
*/
|
|
5403
5415
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
|
|
5404
5416
|
/**
|
|
5405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-dataset
|
|
5406
5418
|
* @deprecated
|
|
5407
5419
|
*/
|
|
5408
5420
|
'unicorn/prefer-dataset'?: Linter.RuleEntry<[]>
|
|
5409
5421
|
/**
|
|
5410
5422
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md
|
|
5412
5424
|
*/
|
|
5413
5425
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
|
|
5414
5426
|
/**
|
|
5415
5427
|
* Prefer default parameters over reassignment.
|
|
5416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md
|
|
5417
5429
|
*/
|
|
5418
5430
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
|
|
5419
5431
|
/**
|
|
5420
5432
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md
|
|
5422
5434
|
*/
|
|
5423
5435
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
|
|
5424
5436
|
/**
|
|
5425
5437
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5427
5439
|
*/
|
|
5428
5440
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
|
|
5429
5441
|
/**
|
|
5430
5442
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5432
5444
|
*/
|
|
5433
5445
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
|
|
5434
5446
|
/**
|
|
5435
5447
|
* Prefer `.textContent` over `.innerText`.
|
|
5436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5437
5449
|
*/
|
|
5438
5450
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
|
|
5439
5451
|
/**
|
|
5440
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-event-key
|
|
5441
5453
|
* @deprecated
|
|
5442
5454
|
*/
|
|
5443
5455
|
'unicorn/prefer-event-key'?: Linter.RuleEntry<[]>
|
|
5444
5456
|
/**
|
|
5445
5457
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md
|
|
5447
5459
|
*/
|
|
5448
5460
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
|
|
5449
5461
|
/**
|
|
5450
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-exponentiation-operator
|
|
5451
5463
|
* @deprecated
|
|
5452
5464
|
*/
|
|
5453
5465
|
'unicorn/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>
|
|
5454
5466
|
/**
|
|
5455
5467
|
* Prefer `export…from` when re-exporting.
|
|
5456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md
|
|
5457
5469
|
*/
|
|
5458
5470
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
|
|
5459
5471
|
/**
|
|
5460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-flat-map
|
|
5461
5473
|
* @deprecated
|
|
5462
5474
|
*/
|
|
5463
5475
|
'unicorn/prefer-flat-map'?: Linter.RuleEntry<[]>
|
|
5464
5476
|
/**
|
|
5465
|
-
* Prefer `.includes()` over `.indexOf()
|
|
5466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5477
|
+
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md
|
|
5467
5479
|
*/
|
|
5468
5480
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
|
|
5469
5481
|
/**
|
|
5470
5482
|
* Prefer reading a JSON file as a buffer.
|
|
5471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5472
5484
|
*/
|
|
5473
5485
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
|
|
5474
5486
|
/**
|
|
5475
5487
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5477
5489
|
*/
|
|
5478
5490
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
|
|
5479
5491
|
/**
|
|
5480
5492
|
* Prefer using a logical operator over a ternary.
|
|
5481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5482
5494
|
*/
|
|
5483
5495
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
|
|
5484
5496
|
/**
|
|
5485
5497
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md
|
|
5487
5499
|
*/
|
|
5488
5500
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
|
|
5489
5501
|
/**
|
|
5490
5502
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5492
5504
|
*/
|
|
5493
5505
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
|
|
5494
5506
|
/**
|
|
5495
5507
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5497
5509
|
*/
|
|
5498
5510
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
|
|
5499
5511
|
/**
|
|
5500
5512
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md
|
|
5502
5514
|
*/
|
|
5503
5515
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>
|
|
5504
5516
|
/**
|
|
5505
5517
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5507
5519
|
*/
|
|
5508
5520
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
|
|
5509
5521
|
/**
|
|
5510
5522
|
* Prefer negative index over `.length - index` when possible.
|
|
5511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md
|
|
5512
5524
|
*/
|
|
5513
5525
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
|
|
5514
5526
|
/**
|
|
5515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-append
|
|
5516
5528
|
* @deprecated
|
|
5517
5529
|
*/
|
|
5518
5530
|
'unicorn/prefer-node-append'?: Linter.RuleEntry<[]>
|
|
5519
5531
|
/**
|
|
5520
5532
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md
|
|
5522
5534
|
*/
|
|
5523
5535
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
|
|
5524
5536
|
/**
|
|
5525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-node-remove
|
|
5526
5538
|
* @deprecated
|
|
5527
5539
|
*/
|
|
5528
5540
|
'unicorn/prefer-node-remove'?: Linter.RuleEntry<[]>
|
|
5529
5541
|
/**
|
|
5530
5542
|
* Prefer `Number` static properties over global ones.
|
|
5531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md
|
|
5532
5544
|
*/
|
|
5533
5545
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
|
|
5534
5546
|
/**
|
|
5535
5547
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md
|
|
5537
5549
|
*/
|
|
5538
5550
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
|
|
5539
5551
|
/**
|
|
5540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-object-has-own
|
|
5541
5553
|
* @deprecated
|
|
5542
5554
|
*/
|
|
5543
5555
|
'unicorn/prefer-object-has-own'?: Linter.RuleEntry<[]>
|
|
5544
5556
|
/**
|
|
5545
5557
|
* Prefer omitting the `catch` binding parameter.
|
|
5546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5547
5559
|
*/
|
|
5548
5560
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
|
|
5549
5561
|
/**
|
|
5550
5562
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md
|
|
5552
5564
|
*/
|
|
5553
5565
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
|
|
5554
5566
|
/**
|
|
5555
5567
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`.
|
|
5556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md
|
|
5557
5569
|
*/
|
|
5558
5570
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
|
|
5559
5571
|
/**
|
|
5560
5572
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md
|
|
5562
5574
|
*/
|
|
5563
5575
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
|
|
5564
5576
|
/**
|
|
5565
5577
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md
|
|
5567
5579
|
*/
|
|
5568
5580
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
|
|
5569
5581
|
/**
|
|
5570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-replace-all
|
|
5571
5583
|
* @deprecated
|
|
5572
5584
|
*/
|
|
5573
5585
|
'unicorn/prefer-replace-all'?: Linter.RuleEntry<[]>
|
|
5574
5586
|
/**
|
|
5575
5587
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md
|
|
5577
5589
|
*/
|
|
5578
5590
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
|
|
5579
5591
|
/**
|
|
5580
5592
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md
|
|
5582
5594
|
*/
|
|
5583
5595
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
|
|
5584
5596
|
/**
|
|
5585
5597
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md
|
|
5587
5599
|
*/
|
|
5588
5600
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
|
|
5589
5601
|
/**
|
|
5590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-starts-ends-with
|
|
5591
5603
|
* @deprecated
|
|
5592
5604
|
*/
|
|
5593
5605
|
'unicorn/prefer-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
5594
5606
|
/**
|
|
5595
5607
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md
|
|
5597
5609
|
*/
|
|
5598
5610
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
|
|
5599
5611
|
/**
|
|
5600
5612
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md
|
|
5602
5614
|
*/
|
|
5603
5615
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
|
|
5604
5616
|
/**
|
|
5605
5617
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md
|
|
5607
5619
|
*/
|
|
5608
5620
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
|
|
5609
5621
|
/**
|
|
5610
5622
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5612
5624
|
*/
|
|
5613
5625
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
|
|
5614
5626
|
/**
|
|
5615
5627
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5617
5629
|
*/
|
|
5618
5630
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
|
|
5619
5631
|
/**
|
|
5620
5632
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md
|
|
5622
5634
|
*/
|
|
5623
5635
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
|
|
5624
5636
|
/**
|
|
5625
5637
|
* Prefer `switch` over multiple `else-if`.
|
|
5626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md
|
|
5627
5639
|
*/
|
|
5628
5640
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
|
|
5629
5641
|
/**
|
|
5630
5642
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md
|
|
5632
5644
|
*/
|
|
5633
5645
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
|
|
5634
5646
|
/**
|
|
5635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-text-content
|
|
5636
5648
|
* @deprecated
|
|
5637
5649
|
*/
|
|
5638
5650
|
'unicorn/prefer-text-content'?: Linter.RuleEntry<[]>
|
|
5639
5651
|
/**
|
|
5640
5652
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md
|
|
5642
5654
|
*/
|
|
5643
5655
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
|
|
5644
5656
|
/**
|
|
5645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#prefer-trim-start-end
|
|
5646
5658
|
* @deprecated
|
|
5647
5659
|
*/
|
|
5648
5660
|
'unicorn/prefer-trim-start-end'?: Linter.RuleEntry<[]>
|
|
5649
5661
|
/**
|
|
5650
5662
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md
|
|
5652
5664
|
*/
|
|
5653
5665
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
|
|
5654
5666
|
/**
|
|
5655
5667
|
* Prevent abbreviations.
|
|
5656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prevent-abbreviations.md
|
|
5657
5669
|
*/
|
|
5658
5670
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
|
|
5659
5671
|
/**
|
|
5660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/deprecated-rules.md#regex-shorthand
|
|
5661
5673
|
* @deprecated
|
|
5662
5674
|
*/
|
|
5663
5675
|
'unicorn/regex-shorthand'?: Linter.RuleEntry<[]>
|
|
5664
5676
|
/**
|
|
5665
5677
|
* Enforce consistent relative URL style.
|
|
5666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md
|
|
5667
5679
|
*/
|
|
5668
5680
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
|
|
5669
5681
|
/**
|
|
5670
5682
|
* Enforce using the separator argument with `Array#join()`.
|
|
5671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md
|
|
5672
5684
|
*/
|
|
5673
5685
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
|
|
5674
5686
|
/**
|
|
5675
5687
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5677
5689
|
*/
|
|
5678
5690
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
|
|
5679
5691
|
/**
|
|
5680
5692
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md
|
|
5682
5694
|
*/
|
|
5683
5695
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
|
|
5684
5696
|
/**
|
|
5685
5697
|
* Enforce better string content.
|
|
5686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md
|
|
5687
5699
|
*/
|
|
5688
5700
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
|
|
5689
5701
|
/**
|
|
5690
5702
|
* Enforce consistent brace style for `case` clauses.
|
|
5691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md
|
|
5692
5704
|
*/
|
|
5693
5705
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
|
|
5694
5706
|
/**
|
|
5695
5707
|
* Fix whitespace-insensitive template indentation.
|
|
5696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md
|
|
5697
5709
|
*/
|
|
5698
5710
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
|
|
5699
5711
|
/**
|
|
5700
5712
|
* Enforce consistent case for text encoding identifiers.
|
|
5701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5702
5714
|
*/
|
|
5703
5715
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
|
|
5704
5716
|
/**
|
|
5705
5717
|
* Require `new` when creating an error.
|
|
5706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
|
|
5707
5719
|
*/
|
|
5708
5720
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
|
|
5709
5721
|
/**
|
|
@@ -9438,6 +9450,7 @@ type NodeNoUnpublishedImport = []|[{
|
|
|
9438
9450
|
})[]])
|
|
9439
9451
|
resolvePaths?: string[]
|
|
9440
9452
|
ignoreTypeImport?: boolean
|
|
9453
|
+
ignorePrivate?: boolean
|
|
9441
9454
|
}]
|
|
9442
9455
|
// ----- node/no-unpublished-require -----
|
|
9443
9456
|
type NodeNoUnpublishedRequire = []|[{
|
|
@@ -9460,6 +9473,7 @@ type NodeNoUnpublishedRequire = []|[{
|
|
|
9460
9473
|
})[]])
|
|
9461
9474
|
resolvePaths?: string[]
|
|
9462
9475
|
tryExtensions?: string[]
|
|
9476
|
+
ignorePrivate?: boolean
|
|
9463
9477
|
}]
|
|
9464
9478
|
// ----- node/no-unsupported-features/es-builtins -----
|
|
9465
9479
|
type NodeNoUnsupportedFeaturesEsBuiltins = []|[{
|
|
@@ -9634,6 +9648,9 @@ type PerfectionistSortAstroAttributes = []|[{
|
|
|
9634
9648
|
}]
|
|
9635
9649
|
// ----- perfectionist/sort-classes -----
|
|
9636
9650
|
type PerfectionistSortClasses = []|[{
|
|
9651
|
+
"custom-groups"?: {
|
|
9652
|
+
[k: string]: unknown | undefined
|
|
9653
|
+
}
|
|
9637
9654
|
type?: ("alphabetical" | "natural" | "line-length")
|
|
9638
9655
|
"ignore-case"?: boolean
|
|
9639
9656
|
order?: ("asc" | "desc")
|
|
@@ -10494,6 +10511,7 @@ type StyleArrayElementNewline = []|[(_StyleArrayElementNewlineBasicConfig | {
|
|
|
10494
10511
|
ArrayPattern?: _StyleArrayElementNewlineBasicConfig
|
|
10495
10512
|
})]
|
|
10496
10513
|
type _StyleArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
|
|
10514
|
+
consistent?: boolean
|
|
10497
10515
|
multiline?: boolean
|
|
10498
10516
|
minItems?: (number | null)
|
|
10499
10517
|
})
|
|
@@ -10690,7 +10708,7 @@ type StyleJsxNewline = []|[{
|
|
|
10690
10708
|
}]
|
|
10691
10709
|
// ----- style/jsx-one-expression-per-line -----
|
|
10692
10710
|
type StyleJsxOneExpressionPerLine = []|[{
|
|
10693
|
-
allow?: ("none" | "literal" | "single-child" | "single-line")
|
|
10711
|
+
allow?: ("none" | "literal" | "single-child" | "single-line" | "non-jsx")
|
|
10694
10712
|
}]
|
|
10695
10713
|
// ----- style/jsx-pascal-case -----
|
|
10696
10714
|
type StyleJsxPascalCase = []|[{
|
|
@@ -11323,6 +11341,16 @@ type StyleObjectCurlyNewline = []|[((("always" | "never") | {
|
|
|
11323
11341
|
minProperties?: number
|
|
11324
11342
|
consistent?: boolean
|
|
11325
11343
|
})
|
|
11344
|
+
TSTypeLiteral?: (("always" | "never") | {
|
|
11345
|
+
multiline?: boolean
|
|
11346
|
+
minProperties?: number
|
|
11347
|
+
consistent?: boolean
|
|
11348
|
+
})
|
|
11349
|
+
TSInterfaceBody?: (("always" | "never") | {
|
|
11350
|
+
multiline?: boolean
|
|
11351
|
+
minProperties?: number
|
|
11352
|
+
consistent?: boolean
|
|
11353
|
+
})
|
|
11326
11354
|
})]
|
|
11327
11355
|
// ----- style/object-curly-spacing -----
|
|
11328
11356
|
type StyleObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
@@ -11372,6 +11400,7 @@ type StyleQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent
|
|
|
11372
11400
|
type StyleQuotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "backtick"), ("avoid-escape" | {
|
|
11373
11401
|
avoidEscape?: boolean
|
|
11374
11402
|
allowTemplateLiterals?: boolean
|
|
11403
|
+
ignoreStringLiterals?: boolean
|
|
11375
11404
|
})]
|
|
11376
11405
|
// ----- style/rest-spread-spacing -----
|
|
11377
11406
|
type StyleRestSpreadSpacing = []|[("always" | "never")]
|
|
@@ -12548,6 +12577,12 @@ type TsNoEmptyFunction = []|[{
|
|
|
12548
12577
|
type TsNoEmptyInterface = []|[{
|
|
12549
12578
|
allowSingleExtends?: boolean
|
|
12550
12579
|
}]
|
|
12580
|
+
// ----- ts/no-empty-object-type -----
|
|
12581
|
+
type TsNoEmptyObjectType = []|[{
|
|
12582
|
+
allowInterfaces?: ("always" | "never" | "with-single-extends")
|
|
12583
|
+
allowObjectTypes?: ("always" | "in-type-alias-with-name" | "never")
|
|
12584
|
+
allowWithName?: string
|
|
12585
|
+
}]
|
|
12551
12586
|
// ----- ts/no-explicit-any -----
|
|
12552
12587
|
type TsNoExplicitAny = []|[{
|
|
12553
12588
|
|
|
@@ -13308,6 +13343,7 @@ type VueArrayElementNewline = []|[(_VueArrayElementNewlineBasicConfig | {
|
|
|
13308
13343
|
ArrayPattern?: _VueArrayElementNewlineBasicConfig
|
|
13309
13344
|
})]
|
|
13310
13345
|
type _VueArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
|
|
13346
|
+
consistent?: boolean
|
|
13311
13347
|
multiline?: boolean
|
|
13312
13348
|
minItems?: (number | null)
|
|
13313
13349
|
})
|
|
@@ -14282,6 +14318,16 @@ type VueObjectCurlyNewline = []|[((("always" | "never") | {
|
|
|
14282
14318
|
minProperties?: number
|
|
14283
14319
|
consistent?: boolean
|
|
14284
14320
|
})
|
|
14321
|
+
TSTypeLiteral?: (("always" | "never") | {
|
|
14322
|
+
multiline?: boolean
|
|
14323
|
+
minProperties?: number
|
|
14324
|
+
consistent?: boolean
|
|
14325
|
+
})
|
|
14326
|
+
TSInterfaceBody?: (("always" | "never") | {
|
|
14327
|
+
multiline?: boolean
|
|
14328
|
+
minProperties?: number
|
|
14329
|
+
consistent?: boolean
|
|
14330
|
+
})
|
|
14285
14331
|
})]
|
|
14286
14332
|
// ----- vue/object-curly-spacing -----
|
|
14287
14333
|
type VueObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|