@lincy/eslint-config 5.5.0 → 5.5.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/dist/index.cjs +62 -23
- package/dist/index.d.cts +183 -141
- package/dist/index.d.ts +183 -141
- package/dist/index.js +62 -23
- package/package.json +65 -81
package/dist/index.d.cts
CHANGED
|
@@ -387,233 +387,233 @@ interface RuleOptions {
|
|
|
387
387
|
'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
|
|
388
388
|
/**
|
|
389
389
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
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.9.1/docs/rules/consistent-type-specifier-style.md
|
|
391
391
|
*/
|
|
392
392
|
'import/consistent-type-specifier-style'?: Linter.RuleEntry<ImportConsistentTypeSpecifierStyle>
|
|
393
393
|
/**
|
|
394
394
|
* Ensure a default export is present, given a default import.
|
|
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.9.1/docs/rules/default.md
|
|
396
396
|
*/
|
|
397
397
|
'import/default'?: Linter.RuleEntry<[]>
|
|
398
398
|
/**
|
|
399
399
|
* Enforce a leading comment with the webpackChunkName for dynamic imports.
|
|
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.9.1/docs/rules/dynamic-import-chunkname.md
|
|
401
401
|
*/
|
|
402
402
|
'import/dynamic-import-chunkname'?: Linter.RuleEntry<ImportDynamicImportChunkname>
|
|
403
403
|
/**
|
|
404
404
|
* Forbid any invalid exports, i.e. re-export of the same name.
|
|
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.9.1/docs/rules/export.md
|
|
406
406
|
*/
|
|
407
407
|
'import/export'?: Linter.RuleEntry<[]>
|
|
408
408
|
/**
|
|
409
409
|
* Ensure all exports appear after other statements.
|
|
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.9.1/docs/rules/exports-last.md
|
|
411
411
|
*/
|
|
412
412
|
'import/exports-last'?: Linter.RuleEntry<[]>
|
|
413
413
|
/**
|
|
414
414
|
* Ensure consistent use of file extension within the import path.
|
|
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.9.1/docs/rules/extensions.md
|
|
416
416
|
*/
|
|
417
417
|
'import/extensions'?: Linter.RuleEntry<ImportExtensions>
|
|
418
418
|
/**
|
|
419
419
|
* Ensure all imports appear before other statements.
|
|
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.9.1/docs/rules/first.md
|
|
421
421
|
*/
|
|
422
422
|
'import/first'?: Linter.RuleEntry<ImportFirst>
|
|
423
423
|
/**
|
|
424
424
|
* Prefer named exports to be grouped together in a single export declaration.
|
|
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.9.1/docs/rules/group-exports.md
|
|
426
426
|
*/
|
|
427
427
|
'import/group-exports'?: Linter.RuleEntry<[]>
|
|
428
428
|
/**
|
|
429
429
|
* Replaced by `import-x/first`.
|
|
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.9.1/docs/rules/imports-first.md
|
|
431
431
|
* @deprecated
|
|
432
432
|
*/
|
|
433
433
|
'import/imports-first'?: Linter.RuleEntry<ImportImportsFirst>
|
|
434
434
|
/**
|
|
435
435
|
* Enforce the maximum number of dependencies a module can have.
|
|
436
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
436
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/max-dependencies.md
|
|
437
437
|
*/
|
|
438
438
|
'import/max-dependencies'?: Linter.RuleEntry<ImportMaxDependencies>
|
|
439
439
|
/**
|
|
440
440
|
* Ensure named imports correspond to a named export in the remote file.
|
|
441
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
441
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/named.md
|
|
442
442
|
*/
|
|
443
443
|
'import/named'?: Linter.RuleEntry<ImportNamed>
|
|
444
444
|
/**
|
|
445
445
|
* Ensure imported namespaces contain dereferenced properties as they are dereferenced.
|
|
446
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
446
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/namespace.md
|
|
447
447
|
*/
|
|
448
448
|
'import/namespace'?: Linter.RuleEntry<ImportNamespace>
|
|
449
449
|
/**
|
|
450
450
|
* Enforce a newline after import statements.
|
|
451
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
451
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/newline-after-import.md
|
|
452
452
|
*/
|
|
453
453
|
'import/newline-after-import'?: Linter.RuleEntry<ImportNewlineAfterImport>
|
|
454
454
|
/**
|
|
455
455
|
* Forbid import of modules using absolute paths.
|
|
456
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
456
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-absolute-path.md
|
|
457
457
|
*/
|
|
458
458
|
'import/no-absolute-path'?: Linter.RuleEntry<ImportNoAbsolutePath>
|
|
459
459
|
/**
|
|
460
460
|
* Forbid AMD `require` and `define` calls.
|
|
461
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
461
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-amd.md
|
|
462
462
|
*/
|
|
463
463
|
'import/no-amd'?: Linter.RuleEntry<[]>
|
|
464
464
|
/**
|
|
465
465
|
* Forbid anonymous values as default exports.
|
|
466
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
466
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-anonymous-default-export.md
|
|
467
467
|
*/
|
|
468
468
|
'import/no-anonymous-default-export'?: Linter.RuleEntry<ImportNoAnonymousDefaultExport>
|
|
469
469
|
/**
|
|
470
470
|
* Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
|
|
471
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
471
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-commonjs.md
|
|
472
472
|
*/
|
|
473
473
|
'import/no-commonjs'?: Linter.RuleEntry<ImportNoCommonjs>
|
|
474
474
|
/**
|
|
475
475
|
* Forbid a module from importing a module with a dependency path back to itself.
|
|
476
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
476
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-cycle.md
|
|
477
477
|
*/
|
|
478
478
|
'import/no-cycle'?: Linter.RuleEntry<ImportNoCycle>
|
|
479
479
|
/**
|
|
480
480
|
* Forbid default exports.
|
|
481
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
481
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-default-export.md
|
|
482
482
|
*/
|
|
483
483
|
'import/no-default-export'?: Linter.RuleEntry<[]>
|
|
484
484
|
/**
|
|
485
485
|
* Forbid imported names marked with `@deprecated` documentation tag.
|
|
486
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
486
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-deprecated.md
|
|
487
487
|
*/
|
|
488
488
|
'import/no-deprecated'?: Linter.RuleEntry<[]>
|
|
489
489
|
/**
|
|
490
490
|
* Forbid repeated import of the same module in multiple places.
|
|
491
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
491
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-duplicates.md
|
|
492
492
|
*/
|
|
493
493
|
'import/no-duplicates'?: Linter.RuleEntry<ImportNoDuplicates>
|
|
494
494
|
/**
|
|
495
495
|
* Forbid `require()` calls with expressions.
|
|
496
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
496
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-dynamic-require.md
|
|
497
497
|
*/
|
|
498
498
|
'import/no-dynamic-require'?: Linter.RuleEntry<ImportNoDynamicRequire>
|
|
499
499
|
/**
|
|
500
500
|
* Forbid empty named import blocks.
|
|
501
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
501
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-empty-named-blocks.md
|
|
502
502
|
*/
|
|
503
503
|
'import/no-empty-named-blocks'?: Linter.RuleEntry<[]>
|
|
504
504
|
/**
|
|
505
505
|
* Forbid the use of extraneous packages.
|
|
506
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
506
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-extraneous-dependencies.md
|
|
507
507
|
*/
|
|
508
508
|
'import/no-extraneous-dependencies'?: Linter.RuleEntry<ImportNoExtraneousDependencies>
|
|
509
509
|
/**
|
|
510
510
|
* Forbid import statements with CommonJS module.exports.
|
|
511
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
511
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-import-module-exports.md
|
|
512
512
|
*/
|
|
513
513
|
'import/no-import-module-exports'?: Linter.RuleEntry<ImportNoImportModuleExports>
|
|
514
514
|
/**
|
|
515
515
|
* Forbid importing the submodules of other modules.
|
|
516
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
516
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-internal-modules.md
|
|
517
517
|
*/
|
|
518
518
|
'import/no-internal-modules'?: Linter.RuleEntry<ImportNoInternalModules>
|
|
519
519
|
/**
|
|
520
520
|
* Forbid the use of mutable exports with `var` or `let`.
|
|
521
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
521
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-mutable-exports.md
|
|
522
522
|
*/
|
|
523
523
|
'import/no-mutable-exports'?: Linter.RuleEntry<[]>
|
|
524
524
|
/**
|
|
525
525
|
* Forbid use of exported name as identifier of default export.
|
|
526
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
526
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-as-default.md
|
|
527
527
|
*/
|
|
528
528
|
'import/no-named-as-default'?: Linter.RuleEntry<[]>
|
|
529
529
|
/**
|
|
530
530
|
* Forbid use of exported name as property of default export.
|
|
531
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
531
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-as-default-member.md
|
|
532
532
|
*/
|
|
533
533
|
'import/no-named-as-default-member'?: Linter.RuleEntry<[]>
|
|
534
534
|
/**
|
|
535
535
|
* Forbid named default exports.
|
|
536
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
536
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-default.md
|
|
537
537
|
*/
|
|
538
538
|
'import/no-named-default'?: Linter.RuleEntry<[]>
|
|
539
539
|
/**
|
|
540
540
|
* Forbid named exports.
|
|
541
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
541
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-named-export.md
|
|
542
542
|
*/
|
|
543
543
|
'import/no-named-export'?: Linter.RuleEntry<[]>
|
|
544
544
|
/**
|
|
545
545
|
* Forbid namespace (a.k.a. "wildcard" `*`) imports.
|
|
546
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
546
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-namespace.md
|
|
547
547
|
*/
|
|
548
548
|
'import/no-namespace'?: Linter.RuleEntry<ImportNoNamespace>
|
|
549
549
|
/**
|
|
550
550
|
* Forbid Node.js builtin modules.
|
|
551
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
551
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-nodejs-modules.md
|
|
552
552
|
*/
|
|
553
553
|
'import/no-nodejs-modules'?: Linter.RuleEntry<ImportNoNodejsModules>
|
|
554
554
|
/**
|
|
555
555
|
* Forbid importing packages through relative paths.
|
|
556
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
556
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-relative-packages.md
|
|
557
557
|
*/
|
|
558
558
|
'import/no-relative-packages'?: Linter.RuleEntry<ImportNoRelativePackages>
|
|
559
559
|
/**
|
|
560
560
|
* Forbid importing modules from parent directories.
|
|
561
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
561
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-relative-parent-imports.md
|
|
562
562
|
*/
|
|
563
563
|
'import/no-relative-parent-imports'?: Linter.RuleEntry<ImportNoRelativeParentImports>
|
|
564
564
|
/**
|
|
565
565
|
* Forbid importing a default export by a different name.
|
|
566
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
566
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-rename-default.md
|
|
567
567
|
*/
|
|
568
568
|
'import/no-rename-default'?: Linter.RuleEntry<ImportNoRenameDefault>
|
|
569
569
|
/**
|
|
570
570
|
* Enforce which files can be imported in a given folder.
|
|
571
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
571
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-restricted-paths.md
|
|
572
572
|
*/
|
|
573
573
|
'import/no-restricted-paths'?: Linter.RuleEntry<ImportNoRestrictedPaths>
|
|
574
574
|
/**
|
|
575
575
|
* Forbid a module from importing itself.
|
|
576
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
576
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-self-import.md
|
|
577
577
|
*/
|
|
578
578
|
'import/no-self-import'?: Linter.RuleEntry<[]>
|
|
579
579
|
/**
|
|
580
580
|
* Forbid unassigned imports.
|
|
581
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
581
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-unassigned-import.md
|
|
582
582
|
*/
|
|
583
583
|
'import/no-unassigned-import'?: Linter.RuleEntry<ImportNoUnassignedImport>
|
|
584
584
|
/**
|
|
585
585
|
* Ensure imports point to a file/module that can be resolved.
|
|
586
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
586
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-unresolved.md
|
|
587
587
|
*/
|
|
588
588
|
'import/no-unresolved'?: Linter.RuleEntry<ImportNoUnresolved>
|
|
589
589
|
/**
|
|
590
590
|
* Forbid modules without exports, or exports without matching import in another module.
|
|
591
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
591
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-unused-modules.md
|
|
592
592
|
*/
|
|
593
593
|
'import/no-unused-modules'?: Linter.RuleEntry<ImportNoUnusedModules>
|
|
594
594
|
/**
|
|
595
595
|
* Forbid unnecessary path segments in import and require statements.
|
|
596
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
596
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-useless-path-segments.md
|
|
597
597
|
*/
|
|
598
598
|
'import/no-useless-path-segments'?: Linter.RuleEntry<ImportNoUselessPathSegments>
|
|
599
599
|
/**
|
|
600
600
|
* Forbid webpack loader syntax in imports.
|
|
601
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
601
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/no-webpack-loader-syntax.md
|
|
602
602
|
*/
|
|
603
603
|
'import/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
|
|
604
604
|
/**
|
|
605
605
|
* Enforce a convention in module import order.
|
|
606
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
606
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/order.md
|
|
607
607
|
*/
|
|
608
608
|
'import/order'?: Linter.RuleEntry<ImportOrder>
|
|
609
609
|
/**
|
|
610
610
|
* Prefer a default export if module exports a single name or multiple names.
|
|
611
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
611
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/prefer-default-export.md
|
|
612
612
|
*/
|
|
613
613
|
'import/prefer-default-export'?: Linter.RuleEntry<ImportPreferDefaultExport>
|
|
614
614
|
/**
|
|
615
615
|
* Forbid potentially ambiguous parse goal (`script` vs. `module`).
|
|
616
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.
|
|
616
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.9.1/docs/rules/unambiguous.md
|
|
617
617
|
*/
|
|
618
618
|
'import/unambiguous'?: Linter.RuleEntry<[]>
|
|
619
619
|
/**
|
|
@@ -2562,122 +2562,142 @@ interface RuleOptions {
|
|
|
2562
2562
|
*/
|
|
2563
2563
|
'radix'?: Linter.RuleEntry<Radix>
|
|
2564
2564
|
/**
|
|
2565
|
-
*
|
|
2565
|
+
* Disallow `children` in void DOM elements.
|
|
2566
2566
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2567
2567
|
*/
|
|
2568
2568
|
'react-dom/no-children-in-void-dom-elements'?: Linter.RuleEntry<[]>
|
|
2569
2569
|
/**
|
|
2570
|
-
*
|
|
2570
|
+
* Disallow `dangerouslySetInnerHTML`.
|
|
2571
2571
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
2572
2572
|
*/
|
|
2573
2573
|
'react-dom/no-dangerously-set-innerhtml'?: Linter.RuleEntry<[]>
|
|
2574
2574
|
/**
|
|
2575
|
-
*
|
|
2575
|
+
* Disallow `dangerouslySetInnerHTML` and `children` at the same time.
|
|
2576
2576
|
* @see https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
2577
2577
|
*/
|
|
2578
2578
|
'react-dom/no-dangerously-set-innerhtml-with-children'?: Linter.RuleEntry<[]>
|
|
2579
2579
|
/**
|
|
2580
|
-
*
|
|
2580
|
+
* Disallow `findDOMNode`.
|
|
2581
2581
|
* @see https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
2582
2582
|
*/
|
|
2583
2583
|
'react-dom/no-find-dom-node'?: Linter.RuleEntry<[]>
|
|
2584
2584
|
/**
|
|
2585
|
-
*
|
|
2585
|
+
* Disallow `flushSync`.
|
|
2586
2586
|
* @see https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
2587
2587
|
*/
|
|
2588
2588
|
'react-dom/no-flush-sync'?: Linter.RuleEntry<[]>
|
|
2589
2589
|
/**
|
|
2590
|
-
*
|
|
2590
|
+
* Replaces usages of `ReactDom.hydrate()` with `hydrateRoot()`.
|
|
2591
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-hydrate
|
|
2592
|
+
*/
|
|
2593
|
+
'react-dom/no-hydrate'?: Linter.RuleEntry<[]>
|
|
2594
|
+
/**
|
|
2595
|
+
* Enforces explicit `type` attribute for `button` elements.
|
|
2591
2596
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
2592
2597
|
*/
|
|
2593
2598
|
'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
|
|
2594
2599
|
/**
|
|
2595
|
-
*
|
|
2600
|
+
* Enforces explicit `sandbox` attribute for `iframe` elements.
|
|
2596
2601
|
* @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
2597
2602
|
*/
|
|
2598
2603
|
'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2599
2604
|
/**
|
|
2600
|
-
*
|
|
2605
|
+
* Enforces the absence of a `namespace` in React elements.
|
|
2601
2606
|
* @see https://eslint-react.xyz/docs/rules/dom-no-namespace
|
|
2602
2607
|
*/
|
|
2603
2608
|
'react-dom/no-namespace'?: Linter.RuleEntry<[]>
|
|
2604
2609
|
/**
|
|
2605
|
-
*
|
|
2610
|
+
* Replaces usages of `ReactDom.render()` with `createRoot(node).render()`.
|
|
2611
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-render
|
|
2612
|
+
*/
|
|
2613
|
+
'react-dom/no-render'?: Linter.RuleEntry<[]>
|
|
2614
|
+
/**
|
|
2615
|
+
* Disallow the return value of `ReactDOM.render`.
|
|
2606
2616
|
* @see https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
2607
2617
|
*/
|
|
2608
2618
|
'react-dom/no-render-return-value'?: Linter.RuleEntry<[]>
|
|
2609
2619
|
/**
|
|
2610
|
-
*
|
|
2620
|
+
* Disallow `javascript:` URLs as attribute values.
|
|
2611
2621
|
* @see https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
2612
2622
|
*/
|
|
2613
2623
|
'react-dom/no-script-url'?: Linter.RuleEntry<[]>
|
|
2614
2624
|
/**
|
|
2615
|
-
*
|
|
2625
|
+
* Disallow unknown `DOM` property.
|
|
2616
2626
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
2617
2627
|
*/
|
|
2618
2628
|
'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>
|
|
2619
2629
|
/**
|
|
2620
|
-
*
|
|
2630
|
+
* Enforces `sandbox` attribute for `iframe` elements is not set to unsafe combinations.
|
|
2621
2631
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
2622
2632
|
*/
|
|
2623
2633
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2624
2634
|
/**
|
|
2625
|
-
*
|
|
2635
|
+
* Disallow `target="_blank"` without `rel="noreferrer noopener"`.
|
|
2626
2636
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2627
2637
|
*/
|
|
2628
2638
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
2629
2639
|
/**
|
|
2630
|
-
*
|
|
2640
|
+
* Replaces usages of `useFormState` with `useActionState`.
|
|
2641
|
+
* @see https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
2642
|
+
*/
|
|
2643
|
+
'react-dom/no-use-form-state'?: Linter.RuleEntry<[]>
|
|
2644
|
+
/**
|
|
2645
|
+
* Disallow `children` in void DOM elements.
|
|
2631
2646
|
* @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
2632
2647
|
*/
|
|
2633
2648
|
'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
|
|
2634
2649
|
/**
|
|
2635
|
-
*
|
|
2636
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
2650
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
2651
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2637
2652
|
*/
|
|
2638
2653
|
'react-hooks-extra/ensure-custom-hooks-using-other-hooks'?: Linter.RuleEntry<[]>
|
|
2639
2654
|
/**
|
|
2640
|
-
*
|
|
2655
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
2641
2656
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
2642
2657
|
*/
|
|
2643
2658
|
'react-hooks-extra/ensure-use-callback-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
2644
2659
|
/**
|
|
2645
|
-
*
|
|
2660
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
2646
2661
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
2647
2662
|
*/
|
|
2648
2663
|
'react-hooks-extra/ensure-use-memo-has-non-empty-deps'?: Linter.RuleEntry<[]>
|
|
2649
2664
|
/**
|
|
2650
|
-
*
|
|
2665
|
+
* Disallow direct calls to the `set` function of `useState` in `useEffect`.
|
|
2651
2666
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
|
|
2652
2667
|
*/
|
|
2653
2668
|
'react-hooks-extra/no-direct-set-state-in-use-effect'?: Linter.RuleEntry<[]>
|
|
2654
2669
|
/**
|
|
2655
|
-
*
|
|
2670
|
+
* Disallow direct calls to the `set` function of `useState` in `useLayoutEffect`.
|
|
2656
2671
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect
|
|
2657
2672
|
*/
|
|
2658
2673
|
'react-hooks-extra/no-direct-set-state-in-use-layout-effect'?: Linter.RuleEntry<[]>
|
|
2659
2674
|
/**
|
|
2660
|
-
*
|
|
2661
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
2675
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
2676
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2662
2677
|
*/
|
|
2663
2678
|
'react-hooks-extra/no-redundant-custom-hook'?: Linter.RuleEntry<[]>
|
|
2664
2679
|
/**
|
|
2665
|
-
*
|
|
2680
|
+
* Disallow unnecessary usage of `useCallback`.
|
|
2666
2681
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-callback
|
|
2667
2682
|
*/
|
|
2668
2683
|
'react-hooks-extra/no-unnecessary-use-callback'?: Linter.RuleEntry<[]>
|
|
2669
2684
|
/**
|
|
2670
|
-
*
|
|
2685
|
+
* Disallow unnecessary usage of `useMemo`.
|
|
2671
2686
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-memo
|
|
2672
2687
|
*/
|
|
2673
2688
|
'react-hooks-extra/no-unnecessary-use-memo'?: Linter.RuleEntry<[]>
|
|
2674
2689
|
/**
|
|
2675
|
-
*
|
|
2676
|
-
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-
|
|
2690
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
2691
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2692
|
+
*/
|
|
2693
|
+
'react-hooks-extra/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
|
|
2694
|
+
/**
|
|
2695
|
+
* Enforces that a function with the `use` prefix should use at least one Hook inside of it.
|
|
2696
|
+
* @see https://eslint-react.xyz/docs/rules/hooks-extra-no-unnecessary-use-prefix
|
|
2677
2697
|
*/
|
|
2678
2698
|
'react-hooks-extra/no-useless-custom-hooks'?: Linter.RuleEntry<[]>
|
|
2679
2699
|
/**
|
|
2680
|
-
*
|
|
2700
|
+
* Enforces function calls made inside `useState` to be wrapped in an `initializer function`.
|
|
2681
2701
|
* @see https://eslint-react.xyz/docs/rules/hooks-extra-prefer-use-state-lazy-initialization
|
|
2682
2702
|
*/
|
|
2683
2703
|
'react-hooks-extra/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
|
|
@@ -2692,323 +2712,333 @@ interface RuleOptions {
|
|
|
2692
2712
|
*/
|
|
2693
2713
|
'react-hooks/rules-of-hooks'?: Linter.RuleEntry<[]>
|
|
2694
2714
|
/**
|
|
2695
|
-
*
|
|
2715
|
+
* Enforces naming conventions for components.
|
|
2696
2716
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
|
|
2697
2717
|
*/
|
|
2698
2718
|
'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
|
|
2699
2719
|
/**
|
|
2700
|
-
*
|
|
2720
|
+
* Enforces context name to be a valid component name with the suffix `Context`.
|
|
2701
2721
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
|
|
2702
2722
|
*/
|
|
2703
2723
|
'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
|
|
2704
2724
|
/**
|
|
2705
|
-
*
|
|
2725
|
+
* Enforces consistent file naming conventions.
|
|
2706
2726
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename
|
|
2707
2727
|
*/
|
|
2708
2728
|
'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
|
|
2709
2729
|
/**
|
|
2710
|
-
*
|
|
2730
|
+
* Enforces consistent file naming conventions.
|
|
2711
2731
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
|
|
2712
2732
|
*/
|
|
2713
2733
|
'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
|
|
2714
2734
|
/**
|
|
2715
|
-
*
|
|
2735
|
+
* Enforces destructuring and symmetric naming of `useState` hook value and setter.
|
|
2716
2736
|
* @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
|
|
2717
2737
|
*/
|
|
2718
2738
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
2719
2739
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
2720
2740
|
/**
|
|
2721
|
-
*
|
|
2741
|
+
* Prevents leaked `addEventListener` in a component or custom Hook.
|
|
2722
2742
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
2723
2743
|
*/
|
|
2724
2744
|
'react-web-api/no-leaked-event-listener'?: Linter.RuleEntry<[]>
|
|
2725
2745
|
/**
|
|
2726
|
-
*
|
|
2746
|
+
* Prevents leaked `setInterval` in a component or custom Hook.
|
|
2727
2747
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-interval
|
|
2728
2748
|
*/
|
|
2729
2749
|
'react-web-api/no-leaked-interval'?: Linter.RuleEntry<[]>
|
|
2730
2750
|
/**
|
|
2731
|
-
*
|
|
2751
|
+
* Prevents leaked `ResizeObserver` in a component or custom Hook.
|
|
2732
2752
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-resize-observer
|
|
2733
2753
|
*/
|
|
2734
2754
|
'react-web-api/no-leaked-resize-observer'?: Linter.RuleEntry<[]>
|
|
2735
2755
|
/**
|
|
2736
|
-
*
|
|
2756
|
+
* Prevents leaked `setTimeout` in a component or custom Hook.
|
|
2737
2757
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
2738
2758
|
*/
|
|
2739
2759
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
|
|
2740
2760
|
/**
|
|
2741
|
-
*
|
|
2761
|
+
* Enforces explicit boolean values for boolean attributes.
|
|
2742
2762
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
2743
2763
|
*/
|
|
2744
2764
|
'react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2745
2765
|
/**
|
|
2746
|
-
*
|
|
2766
|
+
* Enforces explicit `<Fragment>` components instead of the shorthand `<>` or `</>` syntax.
|
|
2747
2767
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
2748
2768
|
*/
|
|
2749
2769
|
'react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
2750
2770
|
/**
|
|
2751
|
-
*
|
|
2752
|
-
* @see https://eslint-react.xyz/docs/rules/
|
|
2771
|
+
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
2772
|
+
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
2753
2773
|
*/
|
|
2754
2774
|
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
2755
2775
|
/**
|
|
2756
|
-
*
|
|
2776
|
+
* Disallow duplicate props in JSX elements.
|
|
2757
2777
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-jsx-props
|
|
2758
2778
|
*/
|
|
2759
2779
|
'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>
|
|
2760
2780
|
/**
|
|
2761
|
-
*
|
|
2781
|
+
* Marks variables used in JSX as used.
|
|
2762
2782
|
* @see https://eslint-react.xyz/docs/rules/use-jsx-vars
|
|
2763
2783
|
*/
|
|
2764
2784
|
'react/jsx-uses-vars'?: Linter.RuleEntry<[]>
|
|
2765
2785
|
/**
|
|
2766
|
-
*
|
|
2786
|
+
* Disallow accessing `this.state` inside `setState` calls.
|
|
2767
2787
|
* @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
2768
2788
|
*/
|
|
2769
2789
|
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
|
|
2770
2790
|
/**
|
|
2771
|
-
*
|
|
2791
|
+
* Disallow an item's index in the array as its key.
|
|
2772
2792
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
2773
2793
|
*/
|
|
2774
2794
|
'react/no-array-index-key'?: Linter.RuleEntry<[]>
|
|
2775
2795
|
/**
|
|
2776
|
-
*
|
|
2796
|
+
* Disallow `Children.count`.
|
|
2777
2797
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
2778
2798
|
*/
|
|
2779
2799
|
'react/no-children-count'?: Linter.RuleEntry<[]>
|
|
2780
2800
|
/**
|
|
2781
|
-
*
|
|
2801
|
+
* Disallow 'Children.forEach'.
|
|
2782
2802
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
2783
2803
|
*/
|
|
2784
2804
|
'react/no-children-for-each'?: Linter.RuleEntry<[]>
|
|
2785
2805
|
/**
|
|
2786
|
-
*
|
|
2806
|
+
* Disallow `Children.map`.
|
|
2787
2807
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
2788
2808
|
*/
|
|
2789
2809
|
'react/no-children-map'?: Linter.RuleEntry<[]>
|
|
2790
2810
|
/**
|
|
2791
|
-
*
|
|
2811
|
+
* Disallow `Children.only`.
|
|
2792
2812
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
2793
2813
|
*/
|
|
2794
2814
|
'react/no-children-only'?: Linter.RuleEntry<[]>
|
|
2795
2815
|
/**
|
|
2796
|
-
*
|
|
2816
|
+
* Disallow passing `children` as a prop.
|
|
2797
2817
|
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
2798
2818
|
*/
|
|
2799
2819
|
'react/no-children-prop'?: Linter.RuleEntry<[]>
|
|
2800
2820
|
/**
|
|
2801
|
-
*
|
|
2821
|
+
* Disallow `Children.toArray`.
|
|
2802
2822
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
2803
2823
|
*/
|
|
2804
2824
|
'react/no-children-to-array'?: Linter.RuleEntry<[]>
|
|
2805
2825
|
/**
|
|
2806
|
-
*
|
|
2826
|
+
* Disallow class components.
|
|
2807
2827
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
2808
2828
|
*/
|
|
2809
2829
|
'react/no-class-component'?: Linter.RuleEntry<[]>
|
|
2810
2830
|
/**
|
|
2811
|
-
*
|
|
2831
|
+
* Disallow `cloneElement`.
|
|
2812
2832
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2813
2833
|
*/
|
|
2814
2834
|
'react/no-clone-element'?: Linter.RuleEntry<[]>
|
|
2815
2835
|
/**
|
|
2816
|
-
*
|
|
2836
|
+
* Prevents comments from being inserted as text nodes.
|
|
2817
2837
|
* @see https://eslint-react.xyz/docs/rules/no-comment-textnodes
|
|
2818
2838
|
*/
|
|
2819
2839
|
'react/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
2820
2840
|
/**
|
|
2821
|
-
*
|
|
2841
|
+
* Disallow complex conditional rendering in JSX expressions.
|
|
2822
2842
|
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2823
2843
|
*/
|
|
2824
2844
|
'react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2825
2845
|
/**
|
|
2826
|
-
*
|
|
2846
|
+
* Disallow complex conditional rendering in JSX expressions.
|
|
2827
2847
|
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2828
2848
|
*/
|
|
2829
2849
|
'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2830
2850
|
/**
|
|
2831
|
-
*
|
|
2851
|
+
* Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.
|
|
2832
2852
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
2833
2853
|
*/
|
|
2834
2854
|
'react/no-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2835
2855
|
/**
|
|
2836
|
-
*
|
|
2856
|
+
* Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.
|
|
2837
2857
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
2838
2858
|
*/
|
|
2839
2859
|
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2840
2860
|
/**
|
|
2841
|
-
*
|
|
2861
|
+
* Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.
|
|
2842
2862
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
2843
2863
|
*/
|
|
2844
2864
|
'react/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
2845
2865
|
/**
|
|
2846
|
-
*
|
|
2866
|
+
* Replace usages of `<Context.Provider>` with `<Context>`.
|
|
2847
2867
|
* @see https://eslint-react.xyz/docs/rules/no-context-provider
|
|
2848
2868
|
*/
|
|
2849
2869
|
'react/no-context-provider'?: Linter.RuleEntry<[]>
|
|
2850
2870
|
/**
|
|
2851
|
-
*
|
|
2871
|
+
* Disallow `createRef` in function components.
|
|
2852
2872
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
2853
2873
|
*/
|
|
2854
2874
|
'react/no-create-ref'?: Linter.RuleEntry<[]>
|
|
2855
2875
|
/**
|
|
2856
|
-
*
|
|
2876
|
+
* Disallow `defaultProps` property in favor of ES6 default parameters.
|
|
2857
2877
|
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
2858
2878
|
*/
|
|
2859
2879
|
'react/no-default-props'?: Linter.RuleEntry<[]>
|
|
2860
2880
|
/**
|
|
2861
|
-
*
|
|
2881
|
+
* Disallow direct mutation of `this.state`.
|
|
2862
2882
|
* @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
2863
2883
|
*/
|
|
2864
2884
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
2865
2885
|
/**
|
|
2866
|
-
*
|
|
2886
|
+
* Disallow duplicate props in JSX elements.
|
|
2867
2887
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-jsx-props
|
|
2868
2888
|
*/
|
|
2869
2889
|
'react/no-duplicate-jsx-props'?: Linter.RuleEntry<[]>
|
|
2870
2890
|
/**
|
|
2871
|
-
*
|
|
2891
|
+
* Disallow duplicate `key` on elements in the same array or a list of `children`.
|
|
2872
2892
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2873
2893
|
*/
|
|
2874
2894
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
2875
2895
|
/**
|
|
2876
|
-
*
|
|
2896
|
+
* Replaces usages of `forwardRef` with passing `ref` as a prop.
|
|
2877
2897
|
* @see https://eslint-react.xyz/docs/rules/no-forward-ref
|
|
2878
2898
|
*/
|
|
2879
2899
|
'react/no-forward-ref'?: Linter.RuleEntry<[]>
|
|
2880
2900
|
/**
|
|
2881
|
-
*
|
|
2901
|
+
* Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).
|
|
2882
2902
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
2883
2903
|
*/
|
|
2884
2904
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>
|
|
2885
2905
|
/**
|
|
2886
|
-
*
|
|
2906
|
+
* Prevents problematic leaked values from being rendered.
|
|
2887
2907
|
* @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
2888
2908
|
*/
|
|
2889
2909
|
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2890
2910
|
/**
|
|
2891
|
-
*
|
|
2911
|
+
* Enforces that all components have a `displayName` which can be used in devtools.
|
|
2892
2912
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
2893
2913
|
*/
|
|
2894
2914
|
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>
|
|
2895
2915
|
/**
|
|
2896
|
-
*
|
|
2916
|
+
* Enforces that all contexts have a `displayName` which can be used in devtools.
|
|
2897
2917
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
2898
2918
|
*/
|
|
2899
2919
|
'react/no-missing-context-display-name'?: Linter.RuleEntry<[]>
|
|
2900
2920
|
/**
|
|
2901
|
-
*
|
|
2921
|
+
* Disallow missing `key` on items in list rendering.
|
|
2902
2922
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
2903
2923
|
*/
|
|
2904
2924
|
'react/no-missing-key'?: Linter.RuleEntry<[]>
|
|
2905
2925
|
/**
|
|
2906
|
-
*
|
|
2907
|
-
* @see https://eslint-react.xyz/docs/rules/no-nested-
|
|
2926
|
+
* Disallow nesting component definitions inside other components.
|
|
2927
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2928
|
+
*/
|
|
2929
|
+
'react/no-nested-component-definitions'?: Linter.RuleEntry<[]>
|
|
2930
|
+
/**
|
|
2931
|
+
* Disallow nesting component definitions inside other components.
|
|
2932
|
+
* @see https://eslint-react.xyz/docs/rules/no-nested-component-definitions
|
|
2908
2933
|
*/
|
|
2909
2934
|
'react/no-nested-components'?: Linter.RuleEntry<[]>
|
|
2910
2935
|
/**
|
|
2911
|
-
*
|
|
2936
|
+
* Disallow `propTypes` in favor of TypeScript or another type-checking solution.
|
|
2912
2937
|
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
2913
2938
|
*/
|
|
2914
2939
|
'react/no-prop-types'?: Linter.RuleEntry<[]>
|
|
2915
2940
|
/**
|
|
2916
|
-
*
|
|
2941
|
+
* Disallow `shouldComponentUpdate` when extending `React.PureComponent`.
|
|
2917
2942
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
2918
2943
|
*/
|
|
2919
2944
|
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
|
|
2920
2945
|
/**
|
|
2921
|
-
*
|
|
2946
|
+
* Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.
|
|
2922
2947
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
2923
2948
|
*/
|
|
2924
2949
|
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
|
|
2925
2950
|
/**
|
|
2926
|
-
*
|
|
2951
|
+
* Disallows calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.
|
|
2927
2952
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
2928
2953
|
*/
|
|
2929
2954
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
|
|
2930
2955
|
/**
|
|
2931
|
-
*
|
|
2956
|
+
* Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
|
|
2932
2957
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
2933
2958
|
*/
|
|
2934
2959
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
|
|
2935
2960
|
/**
|
|
2936
|
-
*
|
|
2961
|
+
* Disallow deprecated string `refs`.
|
|
2937
2962
|
* @see https://eslint-react.xyz/docs/rules/no-string-refs
|
|
2938
2963
|
*/
|
|
2939
2964
|
'react/no-string-refs'?: Linter.RuleEntry<[]>
|
|
2940
2965
|
/**
|
|
2941
|
-
*
|
|
2966
|
+
* Warns the usage of `UNSAFE_componentWillMount` in class components.
|
|
2942
2967
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
2943
2968
|
*/
|
|
2944
2969
|
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2945
2970
|
/**
|
|
2946
|
-
*
|
|
2971
|
+
* Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.
|
|
2947
2972
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
2948
2973
|
*/
|
|
2949
2974
|
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2950
2975
|
/**
|
|
2951
|
-
*
|
|
2976
|
+
* Warns the usage of `UNSAFE_componentWillUpdate` in class components.
|
|
2952
2977
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
2953
2978
|
*/
|
|
2954
2979
|
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
|
|
2955
2980
|
/**
|
|
2956
|
-
*
|
|
2981
|
+
* Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.
|
|
2957
2982
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
2958
2983
|
*/
|
|
2959
2984
|
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>
|
|
2960
2985
|
/**
|
|
2961
|
-
*
|
|
2986
|
+
* Prevents using referential-type values as default props in object destructuring.
|
|
2962
2987
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
2963
2988
|
*/
|
|
2964
2989
|
'react/no-unstable-default-props'?: Linter.RuleEntry<[]>
|
|
2965
2990
|
/**
|
|
2966
|
-
*
|
|
2991
|
+
* Warns unused class component methods and properties.
|
|
2967
2992
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
2968
2993
|
*/
|
|
2969
2994
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
2970
2995
|
/**
|
|
2971
|
-
*
|
|
2996
|
+
* Warns unused class component state.
|
|
2972
2997
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
2973
2998
|
*/
|
|
2974
2999
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
2975
3000
|
/**
|
|
2976
|
-
*
|
|
3001
|
+
* Replaces usages of `useContext` with `use`.
|
|
2977
3002
|
* @see https://eslint-react.xyz/docs/rules/no-use-context
|
|
2978
3003
|
*/
|
|
2979
3004
|
'react/no-use-context'?: Linter.RuleEntry<[]>
|
|
2980
3005
|
/**
|
|
2981
|
-
*
|
|
3006
|
+
* Disallow useless `forwardRef` calls on components that don't use `ref`s.
|
|
3007
|
+
* @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
|
|
3008
|
+
*/
|
|
3009
|
+
'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>
|
|
3010
|
+
/**
|
|
3011
|
+
* Disallow useless fragment elements.
|
|
2982
3012
|
* @see https://eslint-react.xyz/docs/rules/no-useless-fragment
|
|
2983
3013
|
*/
|
|
2984
3014
|
'react/no-useless-fragment'?: Linter.RuleEntry<ReactNoUselessFragment>
|
|
2985
3015
|
/**
|
|
2986
|
-
*
|
|
3016
|
+
* Enforces destructuring assignment for component props and context.
|
|
2987
3017
|
* @see https://eslint-react.xyz/docs/rules/prefer-destructuring-assignment
|
|
2988
3018
|
*/
|
|
2989
3019
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
2990
3020
|
/**
|
|
2991
|
-
*
|
|
3021
|
+
* Enforces React is imported via a namespace import.
|
|
2992
3022
|
* @see https://eslint-react.xyz/docs/rules/prefer-react-namespace-import
|
|
2993
3023
|
*/
|
|
2994
3024
|
'react/prefer-react-namespace-import'?: Linter.RuleEntry<[]>
|
|
2995
3025
|
/**
|
|
2996
|
-
*
|
|
3026
|
+
* Enforces read-only props in components.
|
|
2997
3027
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
2998
3028
|
*/
|
|
2999
3029
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
3000
3030
|
/**
|
|
3001
|
-
*
|
|
3031
|
+
* Enforces shorthand syntax for boolean attributes.
|
|
3002
3032
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
3003
3033
|
*/
|
|
3004
3034
|
'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
3005
3035
|
/**
|
|
3006
|
-
*
|
|
3036
|
+
* Enforces shorthand syntax for fragments.
|
|
3007
3037
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
3008
3038
|
*/
|
|
3009
3039
|
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
3010
3040
|
/**
|
|
3011
|
-
*
|
|
3041
|
+
* Marks variables used in JSX as used.
|
|
3012
3042
|
* @see https://eslint-react.xyz/docs/rules/use-jsx-vars
|
|
3013
3043
|
*/
|
|
3014
3044
|
'react/use-jsx-vars'?: Linter.RuleEntry<[]>
|
|
@@ -7536,7 +7566,7 @@ type IdMatch = []|[string]|[string, {
|
|
|
7536
7566
|
// ----- implicit-arrow-linebreak -----
|
|
7537
7567
|
type ImplicitArrowLinebreak = []|[("beside" | "below")]
|
|
7538
7568
|
// ----- import/consistent-type-specifier-style -----
|
|
7539
|
-
type ImportConsistentTypeSpecifierStyle = []|[("prefer-
|
|
7569
|
+
type ImportConsistentTypeSpecifierStyle = []|[("prefer-top-level" | "prefer-inline")]
|
|
7540
7570
|
// ----- import/dynamic-import-chunkname -----
|
|
7541
7571
|
type ImportDynamicImportChunkname = []|[{
|
|
7542
7572
|
importFunctions?: string[]
|
|
@@ -7756,6 +7786,17 @@ type ImportOrder = []|[{
|
|
|
7756
7786
|
position?: ("after" | "before")
|
|
7757
7787
|
}[]
|
|
7758
7788
|
"newlines-between"?: ("ignore" | "always" | "always-and-inside-groups" | "never")
|
|
7789
|
+
"newlines-between-types"?: ("ignore" | "always" | "always-and-inside-groups" | "never")
|
|
7790
|
+
consolidateIslands?: ("inside-groups" | "never")
|
|
7791
|
+
sortTypesGroup?: boolean
|
|
7792
|
+
named?: (boolean | {
|
|
7793
|
+
enabled?: boolean
|
|
7794
|
+
import?: boolean
|
|
7795
|
+
export?: boolean
|
|
7796
|
+
require?: boolean
|
|
7797
|
+
cjsExports?: boolean
|
|
7798
|
+
types?: ("mixed" | "types-first" | "types-last")
|
|
7799
|
+
})
|
|
7759
7800
|
alphabetize?: {
|
|
7760
7801
|
caseInsensitive?: boolean
|
|
7761
7802
|
order?: ("ignore" | "asc" | "desc")
|
|
@@ -16333,7 +16374,8 @@ interface VendoredPrettierOptionsRequired {
|
|
|
16333
16374
|
}
|
|
16334
16375
|
|
|
16335
16376
|
type Awaitable<T> = T | Promise<T>;
|
|
16336
|
-
|
|
16377
|
+
interface Rules extends RuleOptions {
|
|
16378
|
+
}
|
|
16337
16379
|
|
|
16338
16380
|
type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins'> & {
|
|
16339
16381
|
/**
|