acaleph-eslint 1.1.7 → 1.1.9

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.
@@ -33,11 +33,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  mod
34
34
  ));
35
35
 
36
- // node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
36
+ // node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
37
37
  import path from "path";
38
38
  import { fileURLToPath } from "url";
39
39
  var init_esm_shims = __esm({
40
- "node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js"() {
40
+ "node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js"() {
41
41
  "use strict";
42
42
  }
43
43
  });
package/dist/index.cjs CHANGED
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
36
+ // node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js
37
37
  var getImportMetaUrl, importMetaUrl;
38
38
  var init_cjs_shims = __esm({
39
- "node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.8_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js"() {
39
+ "node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.10_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/cjs_shims.js"() {
40
40
  "use strict";
41
41
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
42
42
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -13384,6 +13384,19 @@ async function react(options = {}) {
13384
13384
  name: "acaleph/react/rules",
13385
13385
  rules: {
13386
13386
  ...pluginReact.configs.recommended.rules,
13387
+ // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
13388
+ "react-dom/no-dangerously-set-innerhtml": "warn",
13389
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
13390
+ "react-dom/no-find-dom-node": "error",
13391
+ "react-dom/no-flush-sync": "error",
13392
+ "react-dom/no-hydrate": "error",
13393
+ "react-dom/no-namespace": "error",
13394
+ "react-dom/no-render": "error",
13395
+ "react-dom/no-render-return-value": "error",
13396
+ "react-dom/no-script-url": "warn",
13397
+ "react-dom/no-unsafe-iframe-sandbox": "warn",
13398
+ "react-dom/no-use-form-state": "error",
13399
+ "react-dom/no-void-elements-with-children": "error",
13387
13400
  "react-refresh/only-export-components": [
13388
13401
  "error",
13389
13402
  {
@@ -13425,23 +13438,6 @@ async function react(options = {}) {
13425
13438
  ]
13426
13439
  }
13427
13440
  ],
13428
- // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
13429
- "react-dom/no-dangerously-set-innerhtml": "warn",
13430
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
13431
- "react-dom/no-find-dom-node": "error",
13432
- "react-dom/no-flush-sync": "error",
13433
- "react-dom/no-hydrate": "error",
13434
- "react-dom/no-namespace": "error",
13435
- "react-dom/no-render": "error",
13436
- "react-dom/no-render-return-value": "error",
13437
- "react-dom/no-script-url": "warn",
13438
- "react-dom/no-unsafe-iframe-sandbox": "warn",
13439
- "react-dom/no-use-form-state": "error",
13440
- "react-dom/no-void-elements-with-children": "error",
13441
- // recommended rules from eslint-plugin-react-naming-convention https://eslint-react.xyz/docs/rules/overview#naming-convention-rules
13442
- "react-naming-convention/context-name": "warn",
13443
- "react-naming-convention/ref-name": "warn",
13444
- "react-naming-convention/use-state": "warn",
13445
13441
  // recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
13446
13442
  "react/jsx-key-before-spread": "warn",
13447
13443
  "react/jsx-no-comment-textnodes": "warn",
@@ -13461,27 +13457,22 @@ async function react(options = {}) {
13461
13457
  "react/no-component-will-update": "error",
13462
13458
  "react/no-context-provider": "warn",
13463
13459
  "react/no-create-ref": "error",
13464
- "react/no-default-props": "error",
13465
13460
  "react/no-direct-mutation-state": "error",
13466
13461
  "react/no-forward-ref": "warn",
13467
13462
  "react/no-missing-key": "error",
13468
13463
  "react/no-nested-component-definitions": "error",
13469
13464
  "react/no-nested-lazy-component-declarations": "error",
13470
- "react/no-prop-types": "error",
13471
13465
  "react/no-redundant-should-component-update": "error",
13472
13466
  "react/no-set-state-in-component-did-mount": "warn",
13473
13467
  "react/no-set-state-in-component-did-update": "warn",
13474
13468
  "react/no-set-state-in-component-will-update": "warn",
13475
- "react/no-string-refs": "error",
13476
13469
  "react/no-unnecessary-use-prefix": "warn",
13477
13470
  "react/no-unsafe-component-will-mount": "warn",
13478
13471
  "react/no-unsafe-component-will-receive-props": "warn",
13479
13472
  "react/no-unsafe-component-will-update": "warn",
13480
13473
  "react/no-unused-class-component-members": "warn",
13481
13474
  "react/no-use-context": "warn",
13482
- "react/no-useless-forward-ref": "warn",
13483
13475
  "react/prefer-namespace-import": "error",
13484
- "react/prefer-use-state-lazy-initialization": "warn",
13485
13476
  ...overrides
13486
13477
  }
13487
13478
  },
@@ -14472,8 +14463,9 @@ var flatConfigProps = [
14472
14463
  var defaultPluginRenaming = {
14473
14464
  "@eslint-react": "react",
14474
14465
  "@eslint-react/dom": "react-dom",
14475
- "@eslint-react/hooks-extra": "react-hooks-extra",
14476
14466
  "@eslint-react/naming-convention": "react-naming-convention",
14467
+ "@eslint-react/rsc": "react-rsc",
14468
+ "@eslint-react/web-api": "react-web-api",
14477
14469
  "@next/next": "next",
14478
14470
  "@stylistic": "style",
14479
14471
  "@typescript-eslint": "ts",
package/dist/index.d.cts CHANGED
@@ -530,26 +530,11 @@ interface RuleOptions {
530
530
  * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
531
531
  */
532
532
  'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>
533
- /**
534
- * Enforces naming conventions for components.
535
- * @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
536
- */
537
- 'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
538
533
  /**
539
534
  * Enforces the context name to be a valid component name with the suffix 'Context'.
540
535
  * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
541
536
  */
542
537
  'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
543
- /**
544
- * Enforces consistent file-naming conventions.
545
- * @see https://eslint-react.xyz/docs/rules/naming-convention-filename
546
- */
547
- 'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
548
- /**
549
- * Enforces consistent use of the JSX file extension.
550
- * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
551
- */
552
- 'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
553
538
  /**
554
539
  * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
555
540
  * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
@@ -560,14 +545,9 @@ interface RuleOptions {
560
545
  * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
561
546
  */
562
547
  'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>
563
- /**
564
- * Enforces destructuring and symmetric naming of the 'useState' hook value and setter.
565
- * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
566
- */
567
- 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>
568
548
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
569
549
  /**
570
- * Validate and transform React Client/Server Function definitions.
550
+ * Validates and transforms React Client/Server Function definitions.
571
551
  * @see https://eslint-react.xyz/docs/rules/function-definition
572
552
  */
573
553
  'react-rsc/function-definition'?: Linter.RuleEntry<[]>
@@ -591,6 +571,26 @@ interface RuleOptions {
591
571
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
592
572
  */
593
573
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
574
+ /**
575
+ * Disallows higher order functions that define components or hooks inside them.
576
+ * @see https://eslint-react.xyz/docs/rules/component-hook-factories
577
+ */
578
+ 'react/component-hook-factories'?: Linter.RuleEntry<[]>
579
+ /**
580
+ * Validates usage of Error Boundaries instead of try/catch for errors in child components.
581
+ * @see https://eslint-react.xyz/docs/rules/error-boundaries
582
+ */
583
+ 'react/error-boundaries'?: Linter.RuleEntry<[]>
584
+ /**
585
+ * Verifies the list of dependencies for Hooks like 'useEffect' and similar.
586
+ * @see https://github.com/facebook/react/issues/14920
587
+ */
588
+ 'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>
589
+ /**
590
+ * Validates against mutating props, state, and other values that are immutable.
591
+ * @see https://eslint-react.xyz/docs/rules/immutability
592
+ */
593
+ 'react/immutability'?: Linter.RuleEntry<[]>
594
594
  /**
595
595
  * Prevents unintentional '$' sign before expression.
596
596
  * @see https://eslint-react.xyz/docs/rules/jsx-dollar
@@ -602,25 +602,10 @@ interface RuleOptions {
602
602
  */
603
603
  'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>
604
604
  /**
605
- * Prevents comment strings (e.g., beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
605
+ * Prevents comment strings (ex: beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
606
606
  * @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
607
607
  */
608
608
  'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>
609
- /**
610
- * Disallows duplicate props in JSX elements.
611
- * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
612
- */
613
- 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>
614
- /**
615
- * Disallows immediately-invoked function expressions in JSX.
616
- * @see https://eslint-react.xyz/docs/rules/jsx-no-iife
617
- */
618
- 'react/jsx-no-iife'?: Linter.RuleEntry<[]>
619
- /**
620
- * Prevents using variables in JSX that are not defined in the scope.
621
- * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
622
- */
623
- 'react/jsx-no-undef'?: Linter.RuleEntry<[]>
624
609
  /**
625
610
  * Enforces shorthand syntax for boolean props.
626
611
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
@@ -631,16 +616,6 @@ interface RuleOptions {
631
616
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
632
617
  */
633
618
  'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>
634
- /**
635
- * Marks React variables as used when JSX is present.
636
- * @see https://eslint-react.xyz/docs/rules/jsx-uses-react
637
- */
638
- 'react/jsx-uses-react'?: Linter.RuleEntry<[]>
639
- /**
640
- * Marks JSX element variables as used.
641
- * @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
642
- */
643
- 'react/jsx-uses-vars'?: Linter.RuleEntry<[]>
644
619
  /**
645
620
  * Disallows accessing 'this.state' inside 'setState' calls.
646
621
  * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
@@ -716,11 +691,6 @@ interface RuleOptions {
716
691
  * @see https://eslint-react.xyz/docs/rules/no-create-ref
717
692
  */
718
693
  'react/no-create-ref'?: Linter.RuleEntry<[]>
719
- /**
720
- * Disallows the 'defaultProps' property in favor of ES6 default parameters.
721
- * @see https://eslint-react.xyz/docs/rules/no-default-props
722
- */
723
- 'react/no-default-props'?: Linter.RuleEntry<[]>
724
694
  /**
725
695
  * Disallows direct mutation of 'this.state'.
726
696
  * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
@@ -731,22 +701,26 @@ interface RuleOptions {
731
701
  * @see https://eslint-react.xyz/docs/rules/no-duplicate-key
732
702
  */
733
703
  'react/no-duplicate-key'?: Linter.RuleEntry<[]>
734
- /**
735
- * Disallows certain props on components.
736
- * @see https://eslint-react.xyz/docs/rules/no-forbidden-props
737
- * @deprecated
738
- */
739
- 'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>
740
704
  /**
741
705
  * Replaces usage of 'forwardRef' with passing 'ref' as a prop.
742
706
  * @see https://eslint-react.xyz/docs/rules/no-forward-ref
743
707
  */
744
708
  'react/no-forward-ref'?: Linter.RuleEntry<[]>
709
+ /**
710
+ * Prevents implicitly passing the 'children' prop to components.
711
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-children
712
+ */
713
+ 'react/no-implicit-children'?: Linter.RuleEntry<[]>
745
714
  /**
746
715
  * Prevents implicitly passing the 'key' prop to components.
747
716
  * @see https://eslint-react.xyz/docs/rules/no-implicit-key
748
717
  */
749
718
  'react/no-implicit-key'?: Linter.RuleEntry<[]>
719
+ /**
720
+ * Prevents implicitly passing the 'ref' prop to components.
721
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-ref
722
+ */
723
+ 'react/no-implicit-ref'?: Linter.RuleEntry<[]>
750
724
  /**
751
725
  * Prevents problematic leaked values from being rendered.
752
726
  * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
@@ -782,11 +756,6 @@ interface RuleOptions {
782
756
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
783
757
  */
784
758
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>
785
- /**
786
- * Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
787
- * @see https://eslint-react.xyz/docs/rules/no-prop-types
788
- */
789
- 'react/no-prop-types'?: Linter.RuleEntry<[]>
790
759
  /**
791
760
  * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
792
761
  * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
@@ -807,16 +776,6 @@ interface RuleOptions {
807
776
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
808
777
  */
809
778
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
810
- /**
811
- * Replaces string refs with callback refs.
812
- * @see https://eslint-react.xyz/docs/rules/no-string-refs
813
- */
814
- 'react/no-string-refs'?: Linter.RuleEntry<[]>
815
- /**
816
- * Disallows unnecessary 'key' props on nested child elements when rendering lists.
817
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
818
- */
819
- 'react/no-unnecessary-key'?: Linter.RuleEntry<[]>
820
779
  /**
821
780
  * Disallows unnecessary usage of 'useCallback'.
822
781
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
@@ -832,11 +791,6 @@ interface RuleOptions {
832
791
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
833
792
  */
834
793
  'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
835
- /**
836
- * Disallows unnecessary usage of 'useRef'.
837
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref
838
- */
839
- 'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]>
840
794
  /**
841
795
  * Warns about the use of 'UNSAFE_componentWillMount' in class components.
842
796
  * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
@@ -882,11 +836,6 @@ interface RuleOptions {
882
836
  * @see https://eslint-react.xyz/docs/rules/no-use-context
883
837
  */
884
838
  'react/no-use-context'?: Linter.RuleEntry<[]>
885
- /**
886
- * Disallows useless 'forwardRef' calls on components that don't use 'ref's.
887
- * @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
888
- */
889
- 'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>
890
839
  /**
891
840
  * Disallows useless fragment elements.
892
841
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
@@ -903,15 +852,55 @@ interface RuleOptions {
903
852
  */
904
853
  'react/prefer-namespace-import'?: Linter.RuleEntry<[]>
905
854
  /**
906
- * Enforces read-only props in components.
907
- * @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
855
+ * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
856
+ * @see https://eslint-react.xyz/docs/rules/purity
857
+ */
858
+ 'react/purity'?: Linter.RuleEntry<[]>
859
+ /**
860
+ * Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
861
+ * @see https://eslint-react.xyz/docs/rules/refs
862
+ */
863
+ 'react/refs'?: Linter.RuleEntry<[]>
864
+ /**
865
+ * Enforces the Rules of Hooks.
866
+ * @see https://react.dev/reference/rules/rules-of-hooks
867
+ */
868
+ 'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>
869
+ /**
870
+ * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
871
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-effect
872
+ */
873
+ 'react/set-state-in-effect'?: Linter.RuleEntry<[]>
874
+ /**
875
+ * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
876
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-render
877
+ */
878
+ 'react/set-state-in-render'?: Linter.RuleEntry<[]>
879
+ /**
880
+ * Enforces the Rules of Props.
881
+ * @see https://eslint-react.xyz/docs/rules/unstable-rules-of-props
882
+ */
883
+ 'react/unstable-rules-of-props'?: Linter.RuleEntry<[]>
884
+ /**
885
+ * Enforces the Rules of State.
886
+ * @see https://eslint-react.xyz/docs/rules/unstable-rules-of-state
887
+ */
888
+ 'react/unstable-rules-of-state'?: Linter.RuleEntry<[]>
889
+ /**
890
+ * Validates against syntax that React Compiler does not support.
891
+ * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
908
892
  */
909
- 'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
893
+ 'react/unsupported-syntax'?: Linter.RuleEntry<[]>
910
894
  /**
911
- * Enforces wrapping function calls made inside 'useState' in an 'initializer function'.
912
- * @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
895
+ * Validates that 'useMemo' is called with a callback that returns a value.
896
+ * @see https://eslint-react.xyz/docs/rules/use-memo
913
897
  */
914
- 'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
898
+ 'react/use-memo'?: Linter.RuleEntry<[]>
899
+ /**
900
+ * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
901
+ * @see https://eslint-react.xyz/docs/rules/use-state
902
+ */
903
+ 'react/use-state'?: Linter.RuleEntry<ReactUseState>
915
904
  /**
916
905
  * Enforce linebreaks after opening and before closing array brackets
917
906
  * @see https://eslint.style/rules/array-bracket-newline
@@ -7662,29 +7651,6 @@ type ReactDomNoUnknownProperty = []|[{
7662
7651
  ignore?: string[]
7663
7652
  requireDataLowercase?: boolean
7664
7653
  }]
7665
- // ----- react-naming-convention/component-name -----
7666
- type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | {
7667
- allowAllCaps?: boolean
7668
- excepts?: string[]
7669
- rule?: ("PascalCase" | "CONSTANT_CASE")
7670
- })]
7671
- // ----- react-naming-convention/filename -----
7672
- type ReactNamingConventionFilename = []|[(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
7673
- excepts?: string[]
7674
- extensions?: string[]
7675
- rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case")
7676
- })]
7677
- // ----- react-naming-convention/filename-extension -----
7678
- type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
7679
- allow?: ("always" | "as-needed")
7680
- extensions?: string[]
7681
- ignoreFilesWithoutCode?: boolean
7682
- })]
7683
- // ----- react-naming-convention/use-state -----
7684
- type ReactNamingConventionUseState = []|[{
7685
- enforceAssignment?: boolean
7686
- enforceSetterName?: boolean
7687
- }]
7688
7654
  // ----- react-refresh/only-export-components -----
7689
7655
  type ReactRefreshOnlyExportComponents = []|[{
7690
7656
  extraHOCs?: string[]
@@ -7692,20 +7658,17 @@ type ReactRefreshOnlyExportComponents = []|[{
7692
7658
  allowConstantExport?: boolean
7693
7659
  checkJS?: boolean
7694
7660
  }]
7661
+ // ----- react/exhaustive-deps -----
7662
+ type ReactExhaustiveDeps = []|[{
7663
+ additionalHooks?: string
7664
+ enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean
7665
+ experimental_autoDependenciesHooks?: string[]
7666
+ requireExplicitEffectDeps?: boolean
7667
+ }]
7695
7668
  // ----- react/jsx-shorthand-boolean -----
7696
7669
  type ReactJsxShorthandBoolean = []|[(-1 | 1)]
7697
7670
  // ----- react/jsx-shorthand-fragment -----
7698
7671
  type ReactJsxShorthandFragment = []|[(-1 | 1)]
7699
- // ----- react/no-forbidden-props -----
7700
- type ReactNoForbiddenProps = []|[{
7701
- forbid?: (string | {
7702
- excludedNodes?: string[]
7703
- prop: string
7704
- } | {
7705
- includedNodes?: string[]
7706
- prop: string
7707
- })[]
7708
- }]
7709
7672
  // ----- react/no-unstable-default-props -----
7710
7673
  type ReactNoUnstableDefaultProps = []|[{
7711
7674
  safeDefaultProps?: string[]
@@ -7717,6 +7680,16 @@ type ReactNoUselessFragment = []|[{
7717
7680
 
7718
7681
  allowExpressions?: boolean
7719
7682
  }]
7683
+ // ----- react/rules-of-hooks -----
7684
+ type ReactRulesOfHooks = []|[{
7685
+ additionalHooks?: string
7686
+ }]
7687
+ // ----- react/use-state -----
7688
+ type ReactUseState = []|[{
7689
+ enforceAssignment?: boolean
7690
+ enforceLazyInitialization?: boolean
7691
+ enforceSetterName?: boolean
7692
+ }]
7720
7693
  // ----- style/array-bracket-newline -----
7721
7694
  type StyleArrayBracketNewline = []|[(("always" | "never" | "consistent") | {
7722
7695
  multiline?: boolean
@@ -12074,8 +12047,9 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
12074
12047
  declare const defaultPluginRenaming: {
12075
12048
  '@eslint-react': string;
12076
12049
  '@eslint-react/dom': string;
12077
- '@eslint-react/hooks-extra': string;
12078
12050
  '@eslint-react/naming-convention': string;
12051
+ '@eslint-react/rsc': string;
12052
+ '@eslint-react/web-api': string;
12079
12053
  '@next/next': string;
12080
12054
  '@stylistic': string;
12081
12055
  '@typescript-eslint': string;
package/dist/index.d.ts CHANGED
@@ -530,26 +530,11 @@ interface RuleOptions {
530
530
  * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
531
531
  */
532
532
  'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>
533
- /**
534
- * Enforces naming conventions for components.
535
- * @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
536
- */
537
- 'react-naming-convention/component-name'?: Linter.RuleEntry<ReactNamingConventionComponentName>
538
533
  /**
539
534
  * Enforces the context name to be a valid component name with the suffix 'Context'.
540
535
  * @see https://eslint-react.xyz/docs/rules/naming-convention-context-name
541
536
  */
542
537
  'react-naming-convention/context-name'?: Linter.RuleEntry<[]>
543
- /**
544
- * Enforces consistent file-naming conventions.
545
- * @see https://eslint-react.xyz/docs/rules/naming-convention-filename
546
- */
547
- 'react-naming-convention/filename'?: Linter.RuleEntry<ReactNamingConventionFilename>
548
- /**
549
- * Enforces consistent use of the JSX file extension.
550
- * @see https://eslint-react.xyz/docs/rules/naming-convention-filename-extension
551
- */
552
- 'react-naming-convention/filename-extension'?: Linter.RuleEntry<ReactNamingConventionFilenameExtension>
553
538
  /**
554
539
  * Enforces identifier names assigned from 'useId' calls to be either 'id' or end with 'Id'.
555
540
  * @see https://eslint-react.xyz/docs/rules/naming-convention-id-name
@@ -560,14 +545,9 @@ interface RuleOptions {
560
545
  * @see https://eslint-react.xyz/docs/rules/naming-convention-ref-name
561
546
  */
562
547
  'react-naming-convention/ref-name'?: Linter.RuleEntry<[]>
563
- /**
564
- * Enforces destructuring and symmetric naming of the 'useState' hook value and setter.
565
- * @see https://eslint-react.xyz/docs/rules/naming-convention-use-state
566
- */
567
- 'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>
568
548
  'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
569
549
  /**
570
- * Validate and transform React Client/Server Function definitions.
550
+ * Validates and transforms React Client/Server Function definitions.
571
551
  * @see https://eslint-react.xyz/docs/rules/function-definition
572
552
  */
573
553
  'react-rsc/function-definition'?: Linter.RuleEntry<[]>
@@ -591,6 +571,26 @@ interface RuleOptions {
591
571
  * @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
592
572
  */
593
573
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
574
+ /**
575
+ * Disallows higher order functions that define components or hooks inside them.
576
+ * @see https://eslint-react.xyz/docs/rules/component-hook-factories
577
+ */
578
+ 'react/component-hook-factories'?: Linter.RuleEntry<[]>
579
+ /**
580
+ * Validates usage of Error Boundaries instead of try/catch for errors in child components.
581
+ * @see https://eslint-react.xyz/docs/rules/error-boundaries
582
+ */
583
+ 'react/error-boundaries'?: Linter.RuleEntry<[]>
584
+ /**
585
+ * Verifies the list of dependencies for Hooks like 'useEffect' and similar.
586
+ * @see https://github.com/facebook/react/issues/14920
587
+ */
588
+ 'react/exhaustive-deps'?: Linter.RuleEntry<ReactExhaustiveDeps>
589
+ /**
590
+ * Validates against mutating props, state, and other values that are immutable.
591
+ * @see https://eslint-react.xyz/docs/rules/immutability
592
+ */
593
+ 'react/immutability'?: Linter.RuleEntry<[]>
594
594
  /**
595
595
  * Prevents unintentional '$' sign before expression.
596
596
  * @see https://eslint-react.xyz/docs/rules/jsx-dollar
@@ -602,25 +602,10 @@ interface RuleOptions {
602
602
  */
603
603
  'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>
604
604
  /**
605
- * Prevents comment strings (e.g., beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
605
+ * Prevents comment strings (ex: beginning with '//' or '/*') from being accidentally inserted into a JSX element's text nodes.
606
606
  * @see https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
607
607
  */
608
608
  'react/jsx-no-comment-textnodes'?: Linter.RuleEntry<[]>
609
- /**
610
- * Disallows duplicate props in JSX elements.
611
- * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
612
- */
613
- 'react/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>
614
- /**
615
- * Disallows immediately-invoked function expressions in JSX.
616
- * @see https://eslint-react.xyz/docs/rules/jsx-no-iife
617
- */
618
- 'react/jsx-no-iife'?: Linter.RuleEntry<[]>
619
- /**
620
- * Prevents using variables in JSX that are not defined in the scope.
621
- * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
622
- */
623
- 'react/jsx-no-undef'?: Linter.RuleEntry<[]>
624
609
  /**
625
610
  * Enforces shorthand syntax for boolean props.
626
611
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
@@ -631,16 +616,6 @@ interface RuleOptions {
631
616
  * @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
632
617
  */
633
618
  'react/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactJsxShorthandFragment>
634
- /**
635
- * Marks React variables as used when JSX is present.
636
- * @see https://eslint-react.xyz/docs/rules/jsx-uses-react
637
- */
638
- 'react/jsx-uses-react'?: Linter.RuleEntry<[]>
639
- /**
640
- * Marks JSX element variables as used.
641
- * @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
642
- */
643
- 'react/jsx-uses-vars'?: Linter.RuleEntry<[]>
644
619
  /**
645
620
  * Disallows accessing 'this.state' inside 'setState' calls.
646
621
  * @see https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
@@ -716,11 +691,6 @@ interface RuleOptions {
716
691
  * @see https://eslint-react.xyz/docs/rules/no-create-ref
717
692
  */
718
693
  'react/no-create-ref'?: Linter.RuleEntry<[]>
719
- /**
720
- * Disallows the 'defaultProps' property in favor of ES6 default parameters.
721
- * @see https://eslint-react.xyz/docs/rules/no-default-props
722
- */
723
- 'react/no-default-props'?: Linter.RuleEntry<[]>
724
694
  /**
725
695
  * Disallows direct mutation of 'this.state'.
726
696
  * @see https://eslint-react.xyz/docs/rules/no-direct-mutation-state
@@ -731,22 +701,26 @@ interface RuleOptions {
731
701
  * @see https://eslint-react.xyz/docs/rules/no-duplicate-key
732
702
  */
733
703
  'react/no-duplicate-key'?: Linter.RuleEntry<[]>
734
- /**
735
- * Disallows certain props on components.
736
- * @see https://eslint-react.xyz/docs/rules/no-forbidden-props
737
- * @deprecated
738
- */
739
- 'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>
740
704
  /**
741
705
  * Replaces usage of 'forwardRef' with passing 'ref' as a prop.
742
706
  * @see https://eslint-react.xyz/docs/rules/no-forward-ref
743
707
  */
744
708
  'react/no-forward-ref'?: Linter.RuleEntry<[]>
709
+ /**
710
+ * Prevents implicitly passing the 'children' prop to components.
711
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-children
712
+ */
713
+ 'react/no-implicit-children'?: Linter.RuleEntry<[]>
745
714
  /**
746
715
  * Prevents implicitly passing the 'key' prop to components.
747
716
  * @see https://eslint-react.xyz/docs/rules/no-implicit-key
748
717
  */
749
718
  'react/no-implicit-key'?: Linter.RuleEntry<[]>
719
+ /**
720
+ * Prevents implicitly passing the 'ref' prop to components.
721
+ * @see https://eslint-react.xyz/docs/rules/no-implicit-ref
722
+ */
723
+ 'react/no-implicit-ref'?: Linter.RuleEntry<[]>
750
724
  /**
751
725
  * Prevents problematic leaked values from being rendered.
752
726
  * @see https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
@@ -782,11 +756,6 @@ interface RuleOptions {
782
756
  * @see https://eslint-react.xyz/docs/rules/no-nested-lazy-component-declarations
783
757
  */
784
758
  'react/no-nested-lazy-component-declarations'?: Linter.RuleEntry<[]>
785
- /**
786
- * Disallows 'propTypes' in favor of TypeScript or another type-checking solution.
787
- * @see https://eslint-react.xyz/docs/rules/no-prop-types
788
- */
789
- 'react/no-prop-types'?: Linter.RuleEntry<[]>
790
759
  /**
791
760
  * Disallows 'shouldComponentUpdate' when extending 'React.PureComponent'.
792
761
  * @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
@@ -807,16 +776,6 @@ interface RuleOptions {
807
776
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
808
777
  */
809
778
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
810
- /**
811
- * Replaces string refs with callback refs.
812
- * @see https://eslint-react.xyz/docs/rules/no-string-refs
813
- */
814
- 'react/no-string-refs'?: Linter.RuleEntry<[]>
815
- /**
816
- * Disallows unnecessary 'key' props on nested child elements when rendering lists.
817
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
818
- */
819
- 'react/no-unnecessary-key'?: Linter.RuleEntry<[]>
820
779
  /**
821
780
  * Disallows unnecessary usage of 'useCallback'.
822
781
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
@@ -832,11 +791,6 @@ interface RuleOptions {
832
791
  * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-prefix
833
792
  */
834
793
  'react/no-unnecessary-use-prefix'?: Linter.RuleEntry<[]>
835
- /**
836
- * Disallows unnecessary usage of 'useRef'.
837
- * @see https://eslint-react.xyz/docs/rules/no-unnecessary-use-ref
838
- */
839
- 'react/no-unnecessary-use-ref'?: Linter.RuleEntry<[]>
840
794
  /**
841
795
  * Warns about the use of 'UNSAFE_componentWillMount' in class components.
842
796
  * @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
@@ -882,11 +836,6 @@ interface RuleOptions {
882
836
  * @see https://eslint-react.xyz/docs/rules/no-use-context
883
837
  */
884
838
  'react/no-use-context'?: Linter.RuleEntry<[]>
885
- /**
886
- * Disallows useless 'forwardRef' calls on components that don't use 'ref's.
887
- * @see https://eslint-react.xyz/docs/rules/no-useless-forward-ref
888
- */
889
- 'react/no-useless-forward-ref'?: Linter.RuleEntry<[]>
890
839
  /**
891
840
  * Disallows useless fragment elements.
892
841
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
@@ -903,15 +852,55 @@ interface RuleOptions {
903
852
  */
904
853
  'react/prefer-namespace-import'?: Linter.RuleEntry<[]>
905
854
  /**
906
- * Enforces read-only props in components.
907
- * @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
855
+ * Validates that components and hooks are pure by checking that they do not call known-impure functions during render.
856
+ * @see https://eslint-react.xyz/docs/rules/purity
857
+ */
858
+ 'react/purity'?: Linter.RuleEntry<[]>
859
+ /**
860
+ * Validates correct usage of refs by checking that 'ref.current' is not read or written during render.
861
+ * @see https://eslint-react.xyz/docs/rules/refs
862
+ */
863
+ 'react/refs'?: Linter.RuleEntry<[]>
864
+ /**
865
+ * Enforces the Rules of Hooks.
866
+ * @see https://react.dev/reference/rules/rules-of-hooks
867
+ */
868
+ 'react/rules-of-hooks'?: Linter.RuleEntry<ReactRulesOfHooks>
869
+ /**
870
+ * Validates against setting state synchronously in an effect, which can lead to re-renders that degrade performance.
871
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-effect
872
+ */
873
+ 'react/set-state-in-effect'?: Linter.RuleEntry<[]>
874
+ /**
875
+ * Validates against unconditionally setting state during render, which can trigger additional renders and potential infinite render loops.
876
+ * @see https://eslint-react.xyz/docs/rules/set-state-in-render
877
+ */
878
+ 'react/set-state-in-render'?: Linter.RuleEntry<[]>
879
+ /**
880
+ * Enforces the Rules of Props.
881
+ * @see https://eslint-react.xyz/docs/rules/unstable-rules-of-props
882
+ */
883
+ 'react/unstable-rules-of-props'?: Linter.RuleEntry<[]>
884
+ /**
885
+ * Enforces the Rules of State.
886
+ * @see https://eslint-react.xyz/docs/rules/unstable-rules-of-state
887
+ */
888
+ 'react/unstable-rules-of-state'?: Linter.RuleEntry<[]>
889
+ /**
890
+ * Validates against syntax that React Compiler does not support.
891
+ * @see https://eslint-react.xyz/docs/rules/unsupported-syntax
908
892
  */
909
- 'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
893
+ 'react/unsupported-syntax'?: Linter.RuleEntry<[]>
910
894
  /**
911
- * Enforces wrapping function calls made inside 'useState' in an 'initializer function'.
912
- * @see https://eslint-react.xyz/docs/rules/prefer-use-state-lazy-initialization
895
+ * Validates that 'useMemo' is called with a callback that returns a value.
896
+ * @see https://eslint-react.xyz/docs/rules/use-memo
913
897
  */
914
- 'react/prefer-use-state-lazy-initialization'?: Linter.RuleEntry<[]>
898
+ 'react/use-memo'?: Linter.RuleEntry<[]>
899
+ /**
900
+ * Enforces correct usage of 'useState', including destructuring, symmetric naming of the value and setter, and wrapping expensive initializers in a lazy initializer function.
901
+ * @see https://eslint-react.xyz/docs/rules/use-state
902
+ */
903
+ 'react/use-state'?: Linter.RuleEntry<ReactUseState>
915
904
  /**
916
905
  * Enforce linebreaks after opening and before closing array brackets
917
906
  * @see https://eslint.style/rules/array-bracket-newline
@@ -7662,29 +7651,6 @@ type ReactDomNoUnknownProperty = []|[{
7662
7651
  ignore?: string[]
7663
7652
  requireDataLowercase?: boolean
7664
7653
  }]
7665
- // ----- react-naming-convention/component-name -----
7666
- type ReactNamingConventionComponentName = []|[(("PascalCase" | "CONSTANT_CASE") | {
7667
- allowAllCaps?: boolean
7668
- excepts?: string[]
7669
- rule?: ("PascalCase" | "CONSTANT_CASE")
7670
- })]
7671
- // ----- react-naming-convention/filename -----
7672
- type ReactNamingConventionFilename = []|[(("PascalCase" | "camelCase" | "kebab-case" | "snake_case") | {
7673
- excepts?: string[]
7674
- extensions?: string[]
7675
- rule?: ("PascalCase" | "camelCase" | "kebab-case" | "snake_case")
7676
- })]
7677
- // ----- react-naming-convention/filename-extension -----
7678
- type ReactNamingConventionFilenameExtension = []|[(("always" | "as-needed") | {
7679
- allow?: ("always" | "as-needed")
7680
- extensions?: string[]
7681
- ignoreFilesWithoutCode?: boolean
7682
- })]
7683
- // ----- react-naming-convention/use-state -----
7684
- type ReactNamingConventionUseState = []|[{
7685
- enforceAssignment?: boolean
7686
- enforceSetterName?: boolean
7687
- }]
7688
7654
  // ----- react-refresh/only-export-components -----
7689
7655
  type ReactRefreshOnlyExportComponents = []|[{
7690
7656
  extraHOCs?: string[]
@@ -7692,20 +7658,17 @@ type ReactRefreshOnlyExportComponents = []|[{
7692
7658
  allowConstantExport?: boolean
7693
7659
  checkJS?: boolean
7694
7660
  }]
7661
+ // ----- react/exhaustive-deps -----
7662
+ type ReactExhaustiveDeps = []|[{
7663
+ additionalHooks?: string
7664
+ enableDangerousAutofixThisMayCauseInfiniteLoops?: boolean
7665
+ experimental_autoDependenciesHooks?: string[]
7666
+ requireExplicitEffectDeps?: boolean
7667
+ }]
7695
7668
  // ----- react/jsx-shorthand-boolean -----
7696
7669
  type ReactJsxShorthandBoolean = []|[(-1 | 1)]
7697
7670
  // ----- react/jsx-shorthand-fragment -----
7698
7671
  type ReactJsxShorthandFragment = []|[(-1 | 1)]
7699
- // ----- react/no-forbidden-props -----
7700
- type ReactNoForbiddenProps = []|[{
7701
- forbid?: (string | {
7702
- excludedNodes?: string[]
7703
- prop: string
7704
- } | {
7705
- includedNodes?: string[]
7706
- prop: string
7707
- })[]
7708
- }]
7709
7672
  // ----- react/no-unstable-default-props -----
7710
7673
  type ReactNoUnstableDefaultProps = []|[{
7711
7674
  safeDefaultProps?: string[]
@@ -7717,6 +7680,16 @@ type ReactNoUselessFragment = []|[{
7717
7680
 
7718
7681
  allowExpressions?: boolean
7719
7682
  }]
7683
+ // ----- react/rules-of-hooks -----
7684
+ type ReactRulesOfHooks = []|[{
7685
+ additionalHooks?: string
7686
+ }]
7687
+ // ----- react/use-state -----
7688
+ type ReactUseState = []|[{
7689
+ enforceAssignment?: boolean
7690
+ enforceLazyInitialization?: boolean
7691
+ enforceSetterName?: boolean
7692
+ }]
7720
7693
  // ----- style/array-bracket-newline -----
7721
7694
  type StyleArrayBracketNewline = []|[(("always" | "never" | "consistent") | {
7722
7695
  multiline?: boolean
@@ -12074,8 +12047,9 @@ interface OptionsConfig extends OptionsComponentExts, OptionsProjectType {
12074
12047
  declare const defaultPluginRenaming: {
12075
12048
  '@eslint-react': string;
12076
12049
  '@eslint-react/dom': string;
12077
- '@eslint-react/hooks-extra': string;
12078
12050
  '@eslint-react/naming-convention': string;
12051
+ '@eslint-react/rsc': string;
12052
+ '@eslint-react/web-api': string;
12079
12053
  '@next/next': string;
12080
12054
  '@stylistic': string;
12081
12055
  '@typescript-eslint': string;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-6SL3XWIH.js";
3
+ } from "./chunk-YG2INGC2.js";
4
4
 
5
5
  // src/index.ts
6
6
  init_esm_shims();
@@ -1103,6 +1103,19 @@ async function react(options = {}) {
1103
1103
  name: "acaleph/react/rules",
1104
1104
  rules: {
1105
1105
  ...pluginReact.configs.recommended.rules,
1106
+ // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
1107
+ "react-dom/no-dangerously-set-innerhtml": "warn",
1108
+ "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1109
+ "react-dom/no-find-dom-node": "error",
1110
+ "react-dom/no-flush-sync": "error",
1111
+ "react-dom/no-hydrate": "error",
1112
+ "react-dom/no-namespace": "error",
1113
+ "react-dom/no-render": "error",
1114
+ "react-dom/no-render-return-value": "error",
1115
+ "react-dom/no-script-url": "warn",
1116
+ "react-dom/no-unsafe-iframe-sandbox": "warn",
1117
+ "react-dom/no-use-form-state": "error",
1118
+ "react-dom/no-void-elements-with-children": "error",
1106
1119
  "react-refresh/only-export-components": [
1107
1120
  "error",
1108
1121
  {
@@ -1144,23 +1157,6 @@ async function react(options = {}) {
1144
1157
  ]
1145
1158
  }
1146
1159
  ],
1147
- // recommended rules from eslint-plugin-react-dom https://eslint-react.xyz/docs/rules/overview#dom-rules
1148
- "react-dom/no-dangerously-set-innerhtml": "warn",
1149
- "react-dom/no-dangerously-set-innerhtml-with-children": "error",
1150
- "react-dom/no-find-dom-node": "error",
1151
- "react-dom/no-flush-sync": "error",
1152
- "react-dom/no-hydrate": "error",
1153
- "react-dom/no-namespace": "error",
1154
- "react-dom/no-render": "error",
1155
- "react-dom/no-render-return-value": "error",
1156
- "react-dom/no-script-url": "warn",
1157
- "react-dom/no-unsafe-iframe-sandbox": "warn",
1158
- "react-dom/no-use-form-state": "error",
1159
- "react-dom/no-void-elements-with-children": "error",
1160
- // recommended rules from eslint-plugin-react-naming-convention https://eslint-react.xyz/docs/rules/overview#naming-convention-rules
1161
- "react-naming-convention/context-name": "warn",
1162
- "react-naming-convention/ref-name": "warn",
1163
- "react-naming-convention/use-state": "warn",
1164
1160
  // recommended rules from eslint-plugin-react-x https://eslint-react.xyz/docs/rules/overview#core-rules
1165
1161
  "react/jsx-key-before-spread": "warn",
1166
1162
  "react/jsx-no-comment-textnodes": "warn",
@@ -1180,27 +1176,22 @@ async function react(options = {}) {
1180
1176
  "react/no-component-will-update": "error",
1181
1177
  "react/no-context-provider": "warn",
1182
1178
  "react/no-create-ref": "error",
1183
- "react/no-default-props": "error",
1184
1179
  "react/no-direct-mutation-state": "error",
1185
1180
  "react/no-forward-ref": "warn",
1186
1181
  "react/no-missing-key": "error",
1187
1182
  "react/no-nested-component-definitions": "error",
1188
1183
  "react/no-nested-lazy-component-declarations": "error",
1189
- "react/no-prop-types": "error",
1190
1184
  "react/no-redundant-should-component-update": "error",
1191
1185
  "react/no-set-state-in-component-did-mount": "warn",
1192
1186
  "react/no-set-state-in-component-did-update": "warn",
1193
1187
  "react/no-set-state-in-component-will-update": "warn",
1194
- "react/no-string-refs": "error",
1195
1188
  "react/no-unnecessary-use-prefix": "warn",
1196
1189
  "react/no-unsafe-component-will-mount": "warn",
1197
1190
  "react/no-unsafe-component-will-receive-props": "warn",
1198
1191
  "react/no-unsafe-component-will-update": "warn",
1199
1192
  "react/no-unused-class-component-members": "warn",
1200
1193
  "react/no-use-context": "warn",
1201
- "react/no-useless-forward-ref": "warn",
1202
1194
  "react/prefer-namespace-import": "error",
1203
- "react/prefer-use-state-lazy-initialization": "warn",
1204
1195
  ...overrides
1205
1196
  }
1206
1197
  },
@@ -1841,7 +1832,7 @@ async function typescript(options = {}) {
1841
1832
  {
1842
1833
  name: "acaleph/typescript/erasable-syntax-only",
1843
1834
  plugins: {
1844
- "erasable-syntax-only": await interopDefault(import("./lib-AZWT6AM4.js"))
1835
+ "erasable-syntax-only": await interopDefault(import("./lib-A3OOGEVQ.js"))
1845
1836
  },
1846
1837
  rules: {
1847
1838
  "erasable-syntax-only/enums": "error",
@@ -2191,8 +2182,9 @@ var flatConfigProps = [
2191
2182
  var defaultPluginRenaming = {
2192
2183
  "@eslint-react": "react",
2193
2184
  "@eslint-react/dom": "react-dom",
2194
- "@eslint-react/hooks-extra": "react-hooks-extra",
2195
2185
  "@eslint-react/naming-convention": "react-naming-convention",
2186
+ "@eslint-react/rsc": "react-rsc",
2187
+ "@eslint-react/web-api": "react-web-api",
2196
2188
  "@next/next": "next",
2197
2189
  "@stylistic": "style",
2198
2190
  "@typescript-eslint": "ts",
@@ -3,7 +3,7 @@ import {
3
3
  __require,
4
4
  __toESM,
5
5
  init_esm_shims
6
- } from "./chunk-6SL3XWIH.js";
6
+ } from "./chunk-YG2INGC2.js";
7
7
 
8
8
  // node_modules/.pnpm/eslint-visitor-keys@3.4.3/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs
9
9
  var require_eslint_visitor_keys = __commonJS({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "acaleph-eslint",
3
3
  "type": "module",
4
- "version": "1.1.7",
4
+ "version": "1.1.9",
5
5
  "packageManager": "pnpm@10.5.2",
6
6
  "description": "",
7
7
  "author": "acaleph",
@@ -25,19 +25,23 @@
25
25
  "build": "pnpm typegen && tsup --format esm,cjs --clean --dts"
26
26
  },
27
27
  "peerDependencies": {
28
+ "@eslint-react/eslint-plugin": "^3.0.0",
28
29
  "@next/eslint-plugin-next": ">=15.0.0",
29
30
  "@unocss/eslint-plugin": ">=0.50.0",
30
31
  "eslint": "^9.10.0 || ^10.0.0",
31
32
  "eslint-plugin-format": ">=0.1.0",
32
33
  "eslint-plugin-jsx-a11y": ">=6.10.2",
33
- "@eslint-react/eslint-plugin": "^3.0.0",
34
34
  "eslint-plugin-react-refresh": "^0.5.0",
35
35
  "eslint-plugin-vuejs-accessibility": "^2.4.1"
36
36
  },
37
+ "peerDependenciesMeta": {
38
+ "@eslint-react/eslint-plugin": {
39
+ "optional": true
40
+ }
41
+ },
37
42
  "dependencies": {
38
43
  "@clack/prompts": "^1.1.0",
39
44
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
40
- "@eslint-react/eslint-plugin": "^3",
41
45
  "@next/eslint-plugin-next": "^16.1.6",
42
46
  "@stylistic/eslint-plugin": "^5.9.0",
43
47
  "@stylistic/eslint-plugin-plus": "^4.4.1",
@@ -47,7 +51,7 @@
47
51
  "@vitest/eslint-plugin": "^1.6.9",
48
52
  "acaleph-install-pkg": "^1.0.3",
49
53
  "eslint-config-flat-gitignore": "^2.2.1",
50
- "eslint-flat-config-utils": "^3.0.1",
54
+ "eslint-flat-config-utils": "^3.1.0",
51
55
  "eslint-merge-processors": "^2.0.0",
52
56
  "eslint-plugin-acaleph": "^1.0.1",
53
57
  "eslint-plugin-command": "^3.5.2",
@@ -75,6 +79,7 @@
75
79
  "yaml-eslint-parser": "^2.0.0"
76
80
  },
77
81
  "devDependencies": {
82
+ "@eslint-react/eslint-plugin": "^3.0.0",
78
83
  "@stylistic/eslint-plugin-migrate": "^2.13.0",
79
84
  "@types/eslint-plugin-jsx-a11y": "^6.10.1",
80
85
  "@types/node": "^22.10.3",