acaleph-eslint 1.1.7 → 1.1.8

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();
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
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
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();
@@ -1841,7 +1841,7 @@ async function typescript(options = {}) {
1841
1841
  {
1842
1842
  name: "acaleph/typescript/erasable-syntax-only",
1843
1843
  plugins: {
1844
- "erasable-syntax-only": await interopDefault(import("./lib-AZWT6AM4.js"))
1844
+ "erasable-syntax-only": await interopDefault(import("./lib-A3OOGEVQ.js"))
1845
1845
  },
1846
1846
  rules: {
1847
1847
  "erasable-syntax-only/enums": "error",
@@ -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.8",
5
5
  "packageManager": "pnpm@10.5.2",
6
6
  "description": "",
7
7
  "author": "acaleph",
@@ -25,19 +25,19 @@
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
37
  "dependencies": {
38
38
  "@clack/prompts": "^1.1.0",
39
39
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
40
- "@eslint-react/eslint-plugin": "^3",
40
+ "@eslint-react/eslint-plugin": "^3.0.0",
41
41
  "@next/eslint-plugin-next": "^16.1.6",
42
42
  "@stylistic/eslint-plugin": "^5.9.0",
43
43
  "@stylistic/eslint-plugin-plus": "^4.4.1",