@eslint-react/shared 1.50.0-next.4 → 1.50.0-next.5

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.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ } from '@eslint-react/eff';
2
2
  import { RuleContext } from '@eslint-react/kit';
3
- import * as z from '@zod/mini';
3
+ import * as z from 'zod';
4
4
 
5
5
  /**
6
6
  * The NPM scope for this project.
@@ -715,252 +715,486 @@ type PartialObjectDeep<ObjectType extends object, Options extends Required<Parti
715
715
  [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
716
716
  });
717
717
 
718
- declare const CustomComponentPropSchema: z.ZodMiniObject<{
718
+ declare const CustomComponentPropSchema: z.ZodObject<{
719
719
  /**
720
720
  * The name of the prop in the user-defined component.
721
721
  * @example
722
722
  * "to"
723
723
  */
724
- name: z.ZodMiniString<string>;
724
+ name: z.ZodString;
725
725
  /**
726
726
  * The name of the prop in the host component.
727
727
  * @example
728
728
  * "href"
729
729
  */
730
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
730
+ as: z.ZodOptional<z.ZodString>;
731
731
  /**
732
732
  * Whether the prop is controlled or not in the user-defined component.
733
733
  * @internal
734
734
  * @example
735
735
  * `true`
736
736
  */
737
- controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
737
+ controlled: z.ZodOptional<z.ZodBoolean>;
738
738
  /**
739
739
  * The default value of the prop in the user-defined component.
740
740
  * @example
741
741
  * `"/"`
742
742
  */
743
- defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
744
- }, {}, {}>;
743
+ defaultValue: z.ZodOptional<z.ZodString>;
744
+ }, "strip", z.ZodTypeAny, {
745
+ name: string;
746
+ as?: string | undefined;
747
+ controlled?: boolean | undefined;
748
+ defaultValue?: string | undefined;
749
+ }, {
750
+ name: string;
751
+ as?: string | undefined;
752
+ controlled?: boolean | undefined;
753
+ defaultValue?: string | undefined;
754
+ }>;
745
755
  /**
746
756
  * @description
747
757
  * This will provide some key information to the rule before checking for user-defined components.
748
758
  * For example:
749
759
  * Which prop is used as the `href` prop for the user-defined `Link` component that represents the built-in `a` element.
750
760
  */
751
- declare const CustomComponentSchema: z.ZodMiniObject<{
761
+ declare const CustomComponentSchema: z.ZodObject<{
752
762
  /**
753
763
  * The name of the user-defined component.
754
764
  * @example
755
765
  * "Link"
756
766
  */
757
- name: z.ZodMiniString<string>;
767
+ name: z.ZodString;
758
768
  /**
759
769
  * The name of the host component that the user-defined component represents.
760
770
  * @example
761
771
  * "a"
762
772
  */
763
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
773
+ as: z.ZodOptional<z.ZodString>;
764
774
  /**
765
775
  * Attributes mapping between the user-defined component and the host component.
766
776
  * @example
767
777
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
768
778
  */
769
- attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
779
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
770
780
  /**
771
781
  * The name of the prop in the user-defined component.
772
782
  * @example
773
783
  * "to"
774
784
  */
775
- name: z.ZodMiniString<string>;
785
+ name: z.ZodString;
776
786
  /**
777
787
  * The name of the prop in the host component.
778
788
  * @example
779
789
  * "href"
780
790
  */
781
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
791
+ as: z.ZodOptional<z.ZodString>;
782
792
  /**
783
793
  * Whether the prop is controlled or not in the user-defined component.
784
794
  * @internal
785
795
  * @example
786
796
  * `true`
787
797
  */
788
- controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
798
+ controlled: z.ZodOptional<z.ZodBoolean>;
789
799
  /**
790
800
  * The default value of the prop in the user-defined component.
791
801
  * @example
792
802
  * `"/"`
793
803
  */
794
- defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
795
- }, {}, {}>>>;
804
+ defaultValue: z.ZodOptional<z.ZodString>;
805
+ }, "strip", z.ZodTypeAny, {
806
+ name: string;
807
+ as?: string | undefined;
808
+ controlled?: boolean | undefined;
809
+ defaultValue?: string | undefined;
810
+ }, {
811
+ name: string;
812
+ as?: string | undefined;
813
+ controlled?: boolean | undefined;
814
+ defaultValue?: string | undefined;
815
+ }>, "many">>;
796
816
  /**
797
817
  * The ESQuery selector to select the component precisely.
798
818
  * @internal
799
819
  * @example
800
820
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
801
821
  */
802
- selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
803
- }, {}, {}>;
804
- declare const CustomHooksSchema: z.ZodMiniObject<{
805
- use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
806
- useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
807
- useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
808
- useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
809
- useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
810
- useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
811
- useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
812
- useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
813
- useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
814
- useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
815
- useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
816
- useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
817
- useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
818
- useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
819
- useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
820
- useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
821
- useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
822
- useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
823
- useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
824
- }, {}, {}>;
822
+ selector: z.ZodOptional<z.ZodString>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ name: string;
825
+ as?: string | undefined;
826
+ attributes?: {
827
+ name: string;
828
+ as?: string | undefined;
829
+ controlled?: boolean | undefined;
830
+ defaultValue?: string | undefined;
831
+ }[] | undefined;
832
+ selector?: string | undefined;
833
+ }, {
834
+ name: string;
835
+ as?: string | undefined;
836
+ attributes?: {
837
+ name: string;
838
+ as?: string | undefined;
839
+ controlled?: boolean | undefined;
840
+ defaultValue?: string | undefined;
841
+ }[] | undefined;
842
+ selector?: string | undefined;
843
+ }>;
844
+ declare const CustomHooksSchema: z.ZodObject<{
845
+ use: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
846
+ useActionState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
847
+ useCallback: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
848
+ useContext: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
849
+ useDebugValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
850
+ useDeferredValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
851
+ useEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
852
+ useFormStatus: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
853
+ useId: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
854
+ useImperativeHandle: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
855
+ useInsertionEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
856
+ useLayoutEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
857
+ useMemo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
858
+ useOptimistic: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
859
+ useReducer: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
860
+ useRef: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
861
+ useState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
862
+ useSyncExternalStore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
863
+ useTransition: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ use?: string[] | undefined;
866
+ useActionState?: string[] | undefined;
867
+ useCallback?: string[] | undefined;
868
+ useContext?: string[] | undefined;
869
+ useDebugValue?: string[] | undefined;
870
+ useDeferredValue?: string[] | undefined;
871
+ useEffect?: string[] | undefined;
872
+ useFormStatus?: string[] | undefined;
873
+ useId?: string[] | undefined;
874
+ useImperativeHandle?: string[] | undefined;
875
+ useInsertionEffect?: string[] | undefined;
876
+ useLayoutEffect?: string[] | undefined;
877
+ useMemo?: string[] | undefined;
878
+ useOptimistic?: string[] | undefined;
879
+ useReducer?: string[] | undefined;
880
+ useRef?: string[] | undefined;
881
+ useState?: string[] | undefined;
882
+ useSyncExternalStore?: string[] | undefined;
883
+ useTransition?: string[] | undefined;
884
+ }, {
885
+ use?: string[] | undefined;
886
+ useActionState?: string[] | undefined;
887
+ useCallback?: string[] | undefined;
888
+ useContext?: string[] | undefined;
889
+ useDebugValue?: string[] | undefined;
890
+ useDeferredValue?: string[] | undefined;
891
+ useEffect?: string[] | undefined;
892
+ useFormStatus?: string[] | undefined;
893
+ useId?: string[] | undefined;
894
+ useImperativeHandle?: string[] | undefined;
895
+ useInsertionEffect?: string[] | undefined;
896
+ useLayoutEffect?: string[] | undefined;
897
+ useMemo?: string[] | undefined;
898
+ useOptimistic?: string[] | undefined;
899
+ useReducer?: string[] | undefined;
900
+ useRef?: string[] | undefined;
901
+ useState?: string[] | undefined;
902
+ useSyncExternalStore?: string[] | undefined;
903
+ useTransition?: string[] | undefined;
904
+ }>;
825
905
  /**
826
906
  * @internal
827
907
  */
828
- declare const ESLintReactSettingsSchema: z.ZodMiniObject<{
908
+ declare const ESLintReactSettingsSchema: z.ZodObject<{
829
909
  /**
830
910
  * The source where React is imported from.
831
911
  * @description This allows to specify a custom import location for React when not using the official distribution.
832
912
  * @default `"react"`
833
913
  * @example `"@pika/react"`
834
914
  */
835
- importSource: z.ZodMiniOptional<z.ZodMiniString<string>>;
915
+ importSource: z.ZodOptional<z.ZodString>;
836
916
  /**
837
917
  * The identifier that's used for JSX Element creation.
838
918
  * @default `"createElement"`
839
919
  * @deprecated
840
920
  */
841
- jsxPragma: z.ZodMiniOptional<z.ZodMiniString<string>>;
921
+ jsxPragma: z.ZodOptional<z.ZodString>;
842
922
  /**
843
923
  * The identifier that's used for JSX fragment elements.
844
924
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
845
925
  * @default `"Fragment"`
846
926
  * @deprecated
847
927
  */
848
- jsxPragmaFrag: z.ZodMiniOptional<z.ZodMiniString<string>>;
928
+ jsxPragmaFrag: z.ZodOptional<z.ZodString>;
849
929
  /**
850
930
  * The name of the prop that is used for polymorphic components.
851
931
  * @description This is used to determine the type of the component.
852
932
  * @example `"as"`
853
933
  */
854
- polymorphicPropName: z.ZodMiniOptional<z.ZodMiniString<string>>;
934
+ polymorphicPropName: z.ZodOptional<z.ZodString>;
855
935
  /**
856
936
  * @default `true`
857
937
  * @internal
858
938
  */
859
- strict: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
939
+ strict: z.ZodOptional<z.ZodBoolean>;
860
940
  /**
861
941
  * Check both the shape and the import to determine if an API is from React.
862
942
  * @default `true`
863
943
  * @internal
864
944
  */
865
- skipImportCheck: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
945
+ skipImportCheck: z.ZodOptional<z.ZodBoolean>;
866
946
  /**
867
947
  * React version to use, "detect" means auto detect React version from the project's dependencies.
868
948
  * If `importSource` is specified, an equivalent version of React should be provided here.
869
949
  * @example `"18.3.1"`
870
950
  * @default `"detect"`
871
951
  */
872
- version: z.ZodMiniOptional<z.ZodMiniString<string>>;
952
+ version: z.ZodOptional<z.ZodString>;
873
953
  /**
874
954
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
875
955
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
876
956
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
877
957
  */
878
- additionalHooks: z.ZodMiniOptional<z.ZodMiniObject<{
879
- use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
880
- useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
881
- useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
882
- useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
883
- useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
884
- useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
885
- useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
886
- useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
887
- useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
888
- useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
889
- useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
890
- useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
891
- useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
892
- useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
893
- useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
894
- useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
895
- useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
896
- useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
897
- useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
898
- }, {}, {}>>;
958
+ additionalHooks: z.ZodOptional<z.ZodObject<{
959
+ use: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
960
+ useActionState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
961
+ useCallback: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
962
+ useContext: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
963
+ useDebugValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
964
+ useDeferredValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
965
+ useEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
966
+ useFormStatus: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
967
+ useId: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
968
+ useImperativeHandle: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
969
+ useInsertionEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
970
+ useLayoutEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
971
+ useMemo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
972
+ useOptimistic: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
973
+ useReducer: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
974
+ useRef: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
975
+ useState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
976
+ useSyncExternalStore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
977
+ useTransition: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
978
+ }, "strip", z.ZodTypeAny, {
979
+ use?: string[] | undefined;
980
+ useActionState?: string[] | undefined;
981
+ useCallback?: string[] | undefined;
982
+ useContext?: string[] | undefined;
983
+ useDebugValue?: string[] | undefined;
984
+ useDeferredValue?: string[] | undefined;
985
+ useEffect?: string[] | undefined;
986
+ useFormStatus?: string[] | undefined;
987
+ useId?: string[] | undefined;
988
+ useImperativeHandle?: string[] | undefined;
989
+ useInsertionEffect?: string[] | undefined;
990
+ useLayoutEffect?: string[] | undefined;
991
+ useMemo?: string[] | undefined;
992
+ useOptimistic?: string[] | undefined;
993
+ useReducer?: string[] | undefined;
994
+ useRef?: string[] | undefined;
995
+ useState?: string[] | undefined;
996
+ useSyncExternalStore?: string[] | undefined;
997
+ useTransition?: string[] | undefined;
998
+ }, {
999
+ use?: string[] | undefined;
1000
+ useActionState?: string[] | undefined;
1001
+ useCallback?: string[] | undefined;
1002
+ useContext?: string[] | undefined;
1003
+ useDebugValue?: string[] | undefined;
1004
+ useDeferredValue?: string[] | undefined;
1005
+ useEffect?: string[] | undefined;
1006
+ useFormStatus?: string[] | undefined;
1007
+ useId?: string[] | undefined;
1008
+ useImperativeHandle?: string[] | undefined;
1009
+ useInsertionEffect?: string[] | undefined;
1010
+ useLayoutEffect?: string[] | undefined;
1011
+ useMemo?: string[] | undefined;
1012
+ useOptimistic?: string[] | undefined;
1013
+ useReducer?: string[] | undefined;
1014
+ useRef?: string[] | undefined;
1015
+ useState?: string[] | undefined;
1016
+ useSyncExternalStore?: string[] | undefined;
1017
+ useTransition?: string[] | undefined;
1018
+ }>>;
899
1019
  /**
900
1020
  * An array of user-defined components
901
1021
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
902
1022
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
903
1023
  */
904
- additionalComponents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
1024
+ additionalComponents: z.ZodOptional<z.ZodArray<z.ZodObject<{
905
1025
  /**
906
1026
  * The name of the user-defined component.
907
1027
  * @example
908
1028
  * "Link"
909
1029
  */
910
- name: z.ZodMiniString<string>;
1030
+ name: z.ZodString;
911
1031
  /**
912
1032
  * The name of the host component that the user-defined component represents.
913
1033
  * @example
914
1034
  * "a"
915
1035
  */
916
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
1036
+ as: z.ZodOptional<z.ZodString>;
917
1037
  /**
918
1038
  * Attributes mapping between the user-defined component and the host component.
919
1039
  * @example
920
1040
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
921
1041
  */
922
- attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
1042
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
923
1043
  /**
924
1044
  * The name of the prop in the user-defined component.
925
1045
  * @example
926
1046
  * "to"
927
1047
  */
928
- name: z.ZodMiniString<string>;
1048
+ name: z.ZodString;
929
1049
  /**
930
1050
  * The name of the prop in the host component.
931
1051
  * @example
932
1052
  * "href"
933
1053
  */
934
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
1054
+ as: z.ZodOptional<z.ZodString>;
935
1055
  /**
936
1056
  * Whether the prop is controlled or not in the user-defined component.
937
1057
  * @internal
938
1058
  * @example
939
1059
  * `true`
940
1060
  */
941
- controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1061
+ controlled: z.ZodOptional<z.ZodBoolean>;
942
1062
  /**
943
1063
  * The default value of the prop in the user-defined component.
944
1064
  * @example
945
1065
  * `"/"`
946
1066
  */
947
- defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
948
- }, {}, {}>>>;
1067
+ defaultValue: z.ZodOptional<z.ZodString>;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ name: string;
1070
+ as?: string | undefined;
1071
+ controlled?: boolean | undefined;
1072
+ defaultValue?: string | undefined;
1073
+ }, {
1074
+ name: string;
1075
+ as?: string | undefined;
1076
+ controlled?: boolean | undefined;
1077
+ defaultValue?: string | undefined;
1078
+ }>, "many">>;
949
1079
  /**
950
1080
  * The ESQuery selector to select the component precisely.
951
1081
  * @internal
952
1082
  * @example
953
1083
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
954
1084
  */
955
- selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
956
- }, {}, {}>>>;
957
- }, {}, {}>;
1085
+ selector: z.ZodOptional<z.ZodString>;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ name: string;
1088
+ as?: string | undefined;
1089
+ attributes?: {
1090
+ name: string;
1091
+ as?: string | undefined;
1092
+ controlled?: boolean | undefined;
1093
+ defaultValue?: string | undefined;
1094
+ }[] | undefined;
1095
+ selector?: string | undefined;
1096
+ }, {
1097
+ name: string;
1098
+ as?: string | undefined;
1099
+ attributes?: {
1100
+ name: string;
1101
+ as?: string | undefined;
1102
+ controlled?: boolean | undefined;
1103
+ defaultValue?: string | undefined;
1104
+ }[] | undefined;
1105
+ selector?: string | undefined;
1106
+ }>, "many">>;
1107
+ }, "strip", z.ZodTypeAny, {
1108
+ version?: string | undefined;
1109
+ importSource?: string | undefined;
1110
+ jsxPragma?: string | undefined;
1111
+ jsxPragmaFrag?: string | undefined;
1112
+ polymorphicPropName?: string | undefined;
1113
+ strict?: boolean | undefined;
1114
+ skipImportCheck?: boolean | undefined;
1115
+ additionalHooks?: {
1116
+ use?: string[] | undefined;
1117
+ useActionState?: string[] | undefined;
1118
+ useCallback?: string[] | undefined;
1119
+ useContext?: string[] | undefined;
1120
+ useDebugValue?: string[] | undefined;
1121
+ useDeferredValue?: string[] | undefined;
1122
+ useEffect?: string[] | undefined;
1123
+ useFormStatus?: string[] | undefined;
1124
+ useId?: string[] | undefined;
1125
+ useImperativeHandle?: string[] | undefined;
1126
+ useInsertionEffect?: string[] | undefined;
1127
+ useLayoutEffect?: string[] | undefined;
1128
+ useMemo?: string[] | undefined;
1129
+ useOptimistic?: string[] | undefined;
1130
+ useReducer?: string[] | undefined;
1131
+ useRef?: string[] | undefined;
1132
+ useState?: string[] | undefined;
1133
+ useSyncExternalStore?: string[] | undefined;
1134
+ useTransition?: string[] | undefined;
1135
+ } | undefined;
1136
+ additionalComponents?: {
1137
+ name: string;
1138
+ as?: string | undefined;
1139
+ attributes?: {
1140
+ name: string;
1141
+ as?: string | undefined;
1142
+ controlled?: boolean | undefined;
1143
+ defaultValue?: string | undefined;
1144
+ }[] | undefined;
1145
+ selector?: string | undefined;
1146
+ }[] | undefined;
1147
+ }, {
1148
+ version?: string | undefined;
1149
+ importSource?: string | undefined;
1150
+ jsxPragma?: string | undefined;
1151
+ jsxPragmaFrag?: string | undefined;
1152
+ polymorphicPropName?: string | undefined;
1153
+ strict?: boolean | undefined;
1154
+ skipImportCheck?: boolean | undefined;
1155
+ additionalHooks?: {
1156
+ use?: string[] | undefined;
1157
+ useActionState?: string[] | undefined;
1158
+ useCallback?: string[] | undefined;
1159
+ useContext?: string[] | undefined;
1160
+ useDebugValue?: string[] | undefined;
1161
+ useDeferredValue?: string[] | undefined;
1162
+ useEffect?: string[] | undefined;
1163
+ useFormStatus?: string[] | undefined;
1164
+ useId?: string[] | undefined;
1165
+ useImperativeHandle?: string[] | undefined;
1166
+ useInsertionEffect?: string[] | undefined;
1167
+ useLayoutEffect?: string[] | undefined;
1168
+ useMemo?: string[] | undefined;
1169
+ useOptimistic?: string[] | undefined;
1170
+ useReducer?: string[] | undefined;
1171
+ useRef?: string[] | undefined;
1172
+ useState?: string[] | undefined;
1173
+ useSyncExternalStore?: string[] | undefined;
1174
+ useTransition?: string[] | undefined;
1175
+ } | undefined;
1176
+ additionalComponents?: {
1177
+ name: string;
1178
+ as?: string | undefined;
1179
+ attributes?: {
1180
+ name: string;
1181
+ as?: string | undefined;
1182
+ controlled?: boolean | undefined;
1183
+ defaultValue?: string | undefined;
1184
+ }[] | undefined;
1185
+ selector?: string | undefined;
1186
+ }[] | undefined;
1187
+ }>;
958
1188
  /**
959
1189
  * @internal
960
1190
  */
961
- declare const ESLintSettingsSchema: z.ZodMiniOptional<z.ZodMiniObject<{
962
- "react-x": z.ZodMiniOptional<z.ZodMiniUnknown>;
963
- }, {}, {}>>;
1191
+ declare const ESLintSettingsSchema: z.ZodOptional<z.ZodObject<{
1192
+ "react-x": z.ZodOptional<z.ZodUnknown>;
1193
+ }, "strip", z.ZodTypeAny, {
1194
+ "react-x"?: unknown;
1195
+ }, {
1196
+ "react-x"?: unknown;
1197
+ }>>;
964
1198
  type CustomComponent = z.infer<typeof CustomComponentSchema>;
965
1199
  type CustomComponentProp = z.infer<typeof CustomComponentPropSchema>;
966
1200
  type CustomHooks = z.infer<typeof CustomHooksSchema>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ } from '@eslint-react/eff';
2
2
  import { RuleContext } from '@eslint-react/kit';
3
- import * as z from '@zod/mini';
3
+ import * as z from 'zod';
4
4
 
5
5
  /**
6
6
  * The NPM scope for this project.
@@ -715,252 +715,486 @@ type PartialObjectDeep<ObjectType extends object, Options extends Required<Parti
715
715
  [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options>
716
716
  });
717
717
 
718
- declare const CustomComponentPropSchema: z.ZodMiniObject<{
718
+ declare const CustomComponentPropSchema: z.ZodObject<{
719
719
  /**
720
720
  * The name of the prop in the user-defined component.
721
721
  * @example
722
722
  * "to"
723
723
  */
724
- name: z.ZodMiniString<string>;
724
+ name: z.ZodString;
725
725
  /**
726
726
  * The name of the prop in the host component.
727
727
  * @example
728
728
  * "href"
729
729
  */
730
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
730
+ as: z.ZodOptional<z.ZodString>;
731
731
  /**
732
732
  * Whether the prop is controlled or not in the user-defined component.
733
733
  * @internal
734
734
  * @example
735
735
  * `true`
736
736
  */
737
- controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
737
+ controlled: z.ZodOptional<z.ZodBoolean>;
738
738
  /**
739
739
  * The default value of the prop in the user-defined component.
740
740
  * @example
741
741
  * `"/"`
742
742
  */
743
- defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
744
- }, {}, {}>;
743
+ defaultValue: z.ZodOptional<z.ZodString>;
744
+ }, "strip", z.ZodTypeAny, {
745
+ name: string;
746
+ as?: string | undefined;
747
+ controlled?: boolean | undefined;
748
+ defaultValue?: string | undefined;
749
+ }, {
750
+ name: string;
751
+ as?: string | undefined;
752
+ controlled?: boolean | undefined;
753
+ defaultValue?: string | undefined;
754
+ }>;
745
755
  /**
746
756
  * @description
747
757
  * This will provide some key information to the rule before checking for user-defined components.
748
758
  * For example:
749
759
  * Which prop is used as the `href` prop for the user-defined `Link` component that represents the built-in `a` element.
750
760
  */
751
- declare const CustomComponentSchema: z.ZodMiniObject<{
761
+ declare const CustomComponentSchema: z.ZodObject<{
752
762
  /**
753
763
  * The name of the user-defined component.
754
764
  * @example
755
765
  * "Link"
756
766
  */
757
- name: z.ZodMiniString<string>;
767
+ name: z.ZodString;
758
768
  /**
759
769
  * The name of the host component that the user-defined component represents.
760
770
  * @example
761
771
  * "a"
762
772
  */
763
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
773
+ as: z.ZodOptional<z.ZodString>;
764
774
  /**
765
775
  * Attributes mapping between the user-defined component and the host component.
766
776
  * @example
767
777
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
768
778
  */
769
- attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
779
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
770
780
  /**
771
781
  * The name of the prop in the user-defined component.
772
782
  * @example
773
783
  * "to"
774
784
  */
775
- name: z.ZodMiniString<string>;
785
+ name: z.ZodString;
776
786
  /**
777
787
  * The name of the prop in the host component.
778
788
  * @example
779
789
  * "href"
780
790
  */
781
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
791
+ as: z.ZodOptional<z.ZodString>;
782
792
  /**
783
793
  * Whether the prop is controlled or not in the user-defined component.
784
794
  * @internal
785
795
  * @example
786
796
  * `true`
787
797
  */
788
- controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
798
+ controlled: z.ZodOptional<z.ZodBoolean>;
789
799
  /**
790
800
  * The default value of the prop in the user-defined component.
791
801
  * @example
792
802
  * `"/"`
793
803
  */
794
- defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
795
- }, {}, {}>>>;
804
+ defaultValue: z.ZodOptional<z.ZodString>;
805
+ }, "strip", z.ZodTypeAny, {
806
+ name: string;
807
+ as?: string | undefined;
808
+ controlled?: boolean | undefined;
809
+ defaultValue?: string | undefined;
810
+ }, {
811
+ name: string;
812
+ as?: string | undefined;
813
+ controlled?: boolean | undefined;
814
+ defaultValue?: string | undefined;
815
+ }>, "many">>;
796
816
  /**
797
817
  * The ESQuery selector to select the component precisely.
798
818
  * @internal
799
819
  * @example
800
820
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
801
821
  */
802
- selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
803
- }, {}, {}>;
804
- declare const CustomHooksSchema: z.ZodMiniObject<{
805
- use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
806
- useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
807
- useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
808
- useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
809
- useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
810
- useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
811
- useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
812
- useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
813
- useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
814
- useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
815
- useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
816
- useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
817
- useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
818
- useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
819
- useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
820
- useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
821
- useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
822
- useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
823
- useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
824
- }, {}, {}>;
822
+ selector: z.ZodOptional<z.ZodString>;
823
+ }, "strip", z.ZodTypeAny, {
824
+ name: string;
825
+ as?: string | undefined;
826
+ attributes?: {
827
+ name: string;
828
+ as?: string | undefined;
829
+ controlled?: boolean | undefined;
830
+ defaultValue?: string | undefined;
831
+ }[] | undefined;
832
+ selector?: string | undefined;
833
+ }, {
834
+ name: string;
835
+ as?: string | undefined;
836
+ attributes?: {
837
+ name: string;
838
+ as?: string | undefined;
839
+ controlled?: boolean | undefined;
840
+ defaultValue?: string | undefined;
841
+ }[] | undefined;
842
+ selector?: string | undefined;
843
+ }>;
844
+ declare const CustomHooksSchema: z.ZodObject<{
845
+ use: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
846
+ useActionState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
847
+ useCallback: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
848
+ useContext: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
849
+ useDebugValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
850
+ useDeferredValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
851
+ useEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
852
+ useFormStatus: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
853
+ useId: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
854
+ useImperativeHandle: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
855
+ useInsertionEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
856
+ useLayoutEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
857
+ useMemo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
858
+ useOptimistic: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
859
+ useReducer: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
860
+ useRef: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
861
+ useState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
862
+ useSyncExternalStore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
863
+ useTransition: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
864
+ }, "strip", z.ZodTypeAny, {
865
+ use?: string[] | undefined;
866
+ useActionState?: string[] | undefined;
867
+ useCallback?: string[] | undefined;
868
+ useContext?: string[] | undefined;
869
+ useDebugValue?: string[] | undefined;
870
+ useDeferredValue?: string[] | undefined;
871
+ useEffect?: string[] | undefined;
872
+ useFormStatus?: string[] | undefined;
873
+ useId?: string[] | undefined;
874
+ useImperativeHandle?: string[] | undefined;
875
+ useInsertionEffect?: string[] | undefined;
876
+ useLayoutEffect?: string[] | undefined;
877
+ useMemo?: string[] | undefined;
878
+ useOptimistic?: string[] | undefined;
879
+ useReducer?: string[] | undefined;
880
+ useRef?: string[] | undefined;
881
+ useState?: string[] | undefined;
882
+ useSyncExternalStore?: string[] | undefined;
883
+ useTransition?: string[] | undefined;
884
+ }, {
885
+ use?: string[] | undefined;
886
+ useActionState?: string[] | undefined;
887
+ useCallback?: string[] | undefined;
888
+ useContext?: string[] | undefined;
889
+ useDebugValue?: string[] | undefined;
890
+ useDeferredValue?: string[] | undefined;
891
+ useEffect?: string[] | undefined;
892
+ useFormStatus?: string[] | undefined;
893
+ useId?: string[] | undefined;
894
+ useImperativeHandle?: string[] | undefined;
895
+ useInsertionEffect?: string[] | undefined;
896
+ useLayoutEffect?: string[] | undefined;
897
+ useMemo?: string[] | undefined;
898
+ useOptimistic?: string[] | undefined;
899
+ useReducer?: string[] | undefined;
900
+ useRef?: string[] | undefined;
901
+ useState?: string[] | undefined;
902
+ useSyncExternalStore?: string[] | undefined;
903
+ useTransition?: string[] | undefined;
904
+ }>;
825
905
  /**
826
906
  * @internal
827
907
  */
828
- declare const ESLintReactSettingsSchema: z.ZodMiniObject<{
908
+ declare const ESLintReactSettingsSchema: z.ZodObject<{
829
909
  /**
830
910
  * The source where React is imported from.
831
911
  * @description This allows to specify a custom import location for React when not using the official distribution.
832
912
  * @default `"react"`
833
913
  * @example `"@pika/react"`
834
914
  */
835
- importSource: z.ZodMiniOptional<z.ZodMiniString<string>>;
915
+ importSource: z.ZodOptional<z.ZodString>;
836
916
  /**
837
917
  * The identifier that's used for JSX Element creation.
838
918
  * @default `"createElement"`
839
919
  * @deprecated
840
920
  */
841
- jsxPragma: z.ZodMiniOptional<z.ZodMiniString<string>>;
921
+ jsxPragma: z.ZodOptional<z.ZodString>;
842
922
  /**
843
923
  * The identifier that's used for JSX fragment elements.
844
924
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
845
925
  * @default `"Fragment"`
846
926
  * @deprecated
847
927
  */
848
- jsxPragmaFrag: z.ZodMiniOptional<z.ZodMiniString<string>>;
928
+ jsxPragmaFrag: z.ZodOptional<z.ZodString>;
849
929
  /**
850
930
  * The name of the prop that is used for polymorphic components.
851
931
  * @description This is used to determine the type of the component.
852
932
  * @example `"as"`
853
933
  */
854
- polymorphicPropName: z.ZodMiniOptional<z.ZodMiniString<string>>;
934
+ polymorphicPropName: z.ZodOptional<z.ZodString>;
855
935
  /**
856
936
  * @default `true`
857
937
  * @internal
858
938
  */
859
- strict: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
939
+ strict: z.ZodOptional<z.ZodBoolean>;
860
940
  /**
861
941
  * Check both the shape and the import to determine if an API is from React.
862
942
  * @default `true`
863
943
  * @internal
864
944
  */
865
- skipImportCheck: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
945
+ skipImportCheck: z.ZodOptional<z.ZodBoolean>;
866
946
  /**
867
947
  * React version to use, "detect" means auto detect React version from the project's dependencies.
868
948
  * If `importSource` is specified, an equivalent version of React should be provided here.
869
949
  * @example `"18.3.1"`
870
950
  * @default `"detect"`
871
951
  */
872
- version: z.ZodMiniOptional<z.ZodMiniString<string>>;
952
+ version: z.ZodOptional<z.ZodString>;
873
953
  /**
874
954
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
875
955
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
876
956
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
877
957
  */
878
- additionalHooks: z.ZodMiniOptional<z.ZodMiniObject<{
879
- use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
880
- useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
881
- useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
882
- useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
883
- useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
884
- useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
885
- useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
886
- useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
887
- useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
888
- useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
889
- useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
890
- useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
891
- useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
892
- useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
893
- useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
894
- useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
895
- useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
896
- useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
897
- useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
898
- }, {}, {}>>;
958
+ additionalHooks: z.ZodOptional<z.ZodObject<{
959
+ use: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
960
+ useActionState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
961
+ useCallback: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
962
+ useContext: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
963
+ useDebugValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
964
+ useDeferredValue: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
965
+ useEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
966
+ useFormStatus: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
967
+ useId: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
968
+ useImperativeHandle: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
969
+ useInsertionEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
970
+ useLayoutEffect: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
971
+ useMemo: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
972
+ useOptimistic: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
973
+ useReducer: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
974
+ useRef: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
975
+ useState: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
976
+ useSyncExternalStore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
977
+ useTransition: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
978
+ }, "strip", z.ZodTypeAny, {
979
+ use?: string[] | undefined;
980
+ useActionState?: string[] | undefined;
981
+ useCallback?: string[] | undefined;
982
+ useContext?: string[] | undefined;
983
+ useDebugValue?: string[] | undefined;
984
+ useDeferredValue?: string[] | undefined;
985
+ useEffect?: string[] | undefined;
986
+ useFormStatus?: string[] | undefined;
987
+ useId?: string[] | undefined;
988
+ useImperativeHandle?: string[] | undefined;
989
+ useInsertionEffect?: string[] | undefined;
990
+ useLayoutEffect?: string[] | undefined;
991
+ useMemo?: string[] | undefined;
992
+ useOptimistic?: string[] | undefined;
993
+ useReducer?: string[] | undefined;
994
+ useRef?: string[] | undefined;
995
+ useState?: string[] | undefined;
996
+ useSyncExternalStore?: string[] | undefined;
997
+ useTransition?: string[] | undefined;
998
+ }, {
999
+ use?: string[] | undefined;
1000
+ useActionState?: string[] | undefined;
1001
+ useCallback?: string[] | undefined;
1002
+ useContext?: string[] | undefined;
1003
+ useDebugValue?: string[] | undefined;
1004
+ useDeferredValue?: string[] | undefined;
1005
+ useEffect?: string[] | undefined;
1006
+ useFormStatus?: string[] | undefined;
1007
+ useId?: string[] | undefined;
1008
+ useImperativeHandle?: string[] | undefined;
1009
+ useInsertionEffect?: string[] | undefined;
1010
+ useLayoutEffect?: string[] | undefined;
1011
+ useMemo?: string[] | undefined;
1012
+ useOptimistic?: string[] | undefined;
1013
+ useReducer?: string[] | undefined;
1014
+ useRef?: string[] | undefined;
1015
+ useState?: string[] | undefined;
1016
+ useSyncExternalStore?: string[] | undefined;
1017
+ useTransition?: string[] | undefined;
1018
+ }>>;
899
1019
  /**
900
1020
  * An array of user-defined components
901
1021
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
902
1022
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
903
1023
  */
904
- additionalComponents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
1024
+ additionalComponents: z.ZodOptional<z.ZodArray<z.ZodObject<{
905
1025
  /**
906
1026
  * The name of the user-defined component.
907
1027
  * @example
908
1028
  * "Link"
909
1029
  */
910
- name: z.ZodMiniString<string>;
1030
+ name: z.ZodString;
911
1031
  /**
912
1032
  * The name of the host component that the user-defined component represents.
913
1033
  * @example
914
1034
  * "a"
915
1035
  */
916
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
1036
+ as: z.ZodOptional<z.ZodString>;
917
1037
  /**
918
1038
  * Attributes mapping between the user-defined component and the host component.
919
1039
  * @example
920
1040
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
921
1041
  */
922
- attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
1042
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
923
1043
  /**
924
1044
  * The name of the prop in the user-defined component.
925
1045
  * @example
926
1046
  * "to"
927
1047
  */
928
- name: z.ZodMiniString<string>;
1048
+ name: z.ZodString;
929
1049
  /**
930
1050
  * The name of the prop in the host component.
931
1051
  * @example
932
1052
  * "href"
933
1053
  */
934
- as: z.ZodMiniOptional<z.ZodMiniString<string>>;
1054
+ as: z.ZodOptional<z.ZodString>;
935
1055
  /**
936
1056
  * Whether the prop is controlled or not in the user-defined component.
937
1057
  * @internal
938
1058
  * @example
939
1059
  * `true`
940
1060
  */
941
- controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
1061
+ controlled: z.ZodOptional<z.ZodBoolean>;
942
1062
  /**
943
1063
  * The default value of the prop in the user-defined component.
944
1064
  * @example
945
1065
  * `"/"`
946
1066
  */
947
- defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
948
- }, {}, {}>>>;
1067
+ defaultValue: z.ZodOptional<z.ZodString>;
1068
+ }, "strip", z.ZodTypeAny, {
1069
+ name: string;
1070
+ as?: string | undefined;
1071
+ controlled?: boolean | undefined;
1072
+ defaultValue?: string | undefined;
1073
+ }, {
1074
+ name: string;
1075
+ as?: string | undefined;
1076
+ controlled?: boolean | undefined;
1077
+ defaultValue?: string | undefined;
1078
+ }>, "many">>;
949
1079
  /**
950
1080
  * The ESQuery selector to select the component precisely.
951
1081
  * @internal
952
1082
  * @example
953
1083
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
954
1084
  */
955
- selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
956
- }, {}, {}>>>;
957
- }, {}, {}>;
1085
+ selector: z.ZodOptional<z.ZodString>;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ name: string;
1088
+ as?: string | undefined;
1089
+ attributes?: {
1090
+ name: string;
1091
+ as?: string | undefined;
1092
+ controlled?: boolean | undefined;
1093
+ defaultValue?: string | undefined;
1094
+ }[] | undefined;
1095
+ selector?: string | undefined;
1096
+ }, {
1097
+ name: string;
1098
+ as?: string | undefined;
1099
+ attributes?: {
1100
+ name: string;
1101
+ as?: string | undefined;
1102
+ controlled?: boolean | undefined;
1103
+ defaultValue?: string | undefined;
1104
+ }[] | undefined;
1105
+ selector?: string | undefined;
1106
+ }>, "many">>;
1107
+ }, "strip", z.ZodTypeAny, {
1108
+ version?: string | undefined;
1109
+ importSource?: string | undefined;
1110
+ jsxPragma?: string | undefined;
1111
+ jsxPragmaFrag?: string | undefined;
1112
+ polymorphicPropName?: string | undefined;
1113
+ strict?: boolean | undefined;
1114
+ skipImportCheck?: boolean | undefined;
1115
+ additionalHooks?: {
1116
+ use?: string[] | undefined;
1117
+ useActionState?: string[] | undefined;
1118
+ useCallback?: string[] | undefined;
1119
+ useContext?: string[] | undefined;
1120
+ useDebugValue?: string[] | undefined;
1121
+ useDeferredValue?: string[] | undefined;
1122
+ useEffect?: string[] | undefined;
1123
+ useFormStatus?: string[] | undefined;
1124
+ useId?: string[] | undefined;
1125
+ useImperativeHandle?: string[] | undefined;
1126
+ useInsertionEffect?: string[] | undefined;
1127
+ useLayoutEffect?: string[] | undefined;
1128
+ useMemo?: string[] | undefined;
1129
+ useOptimistic?: string[] | undefined;
1130
+ useReducer?: string[] | undefined;
1131
+ useRef?: string[] | undefined;
1132
+ useState?: string[] | undefined;
1133
+ useSyncExternalStore?: string[] | undefined;
1134
+ useTransition?: string[] | undefined;
1135
+ } | undefined;
1136
+ additionalComponents?: {
1137
+ name: string;
1138
+ as?: string | undefined;
1139
+ attributes?: {
1140
+ name: string;
1141
+ as?: string | undefined;
1142
+ controlled?: boolean | undefined;
1143
+ defaultValue?: string | undefined;
1144
+ }[] | undefined;
1145
+ selector?: string | undefined;
1146
+ }[] | undefined;
1147
+ }, {
1148
+ version?: string | undefined;
1149
+ importSource?: string | undefined;
1150
+ jsxPragma?: string | undefined;
1151
+ jsxPragmaFrag?: string | undefined;
1152
+ polymorphicPropName?: string | undefined;
1153
+ strict?: boolean | undefined;
1154
+ skipImportCheck?: boolean | undefined;
1155
+ additionalHooks?: {
1156
+ use?: string[] | undefined;
1157
+ useActionState?: string[] | undefined;
1158
+ useCallback?: string[] | undefined;
1159
+ useContext?: string[] | undefined;
1160
+ useDebugValue?: string[] | undefined;
1161
+ useDeferredValue?: string[] | undefined;
1162
+ useEffect?: string[] | undefined;
1163
+ useFormStatus?: string[] | undefined;
1164
+ useId?: string[] | undefined;
1165
+ useImperativeHandle?: string[] | undefined;
1166
+ useInsertionEffect?: string[] | undefined;
1167
+ useLayoutEffect?: string[] | undefined;
1168
+ useMemo?: string[] | undefined;
1169
+ useOptimistic?: string[] | undefined;
1170
+ useReducer?: string[] | undefined;
1171
+ useRef?: string[] | undefined;
1172
+ useState?: string[] | undefined;
1173
+ useSyncExternalStore?: string[] | undefined;
1174
+ useTransition?: string[] | undefined;
1175
+ } | undefined;
1176
+ additionalComponents?: {
1177
+ name: string;
1178
+ as?: string | undefined;
1179
+ attributes?: {
1180
+ name: string;
1181
+ as?: string | undefined;
1182
+ controlled?: boolean | undefined;
1183
+ defaultValue?: string | undefined;
1184
+ }[] | undefined;
1185
+ selector?: string | undefined;
1186
+ }[] | undefined;
1187
+ }>;
958
1188
  /**
959
1189
  * @internal
960
1190
  */
961
- declare const ESLintSettingsSchema: z.ZodMiniOptional<z.ZodMiniObject<{
962
- "react-x": z.ZodMiniOptional<z.ZodMiniUnknown>;
963
- }, {}, {}>>;
1191
+ declare const ESLintSettingsSchema: z.ZodOptional<z.ZodObject<{
1192
+ "react-x": z.ZodOptional<z.ZodUnknown>;
1193
+ }, "strip", z.ZodTypeAny, {
1194
+ "react-x"?: unknown;
1195
+ }, {
1196
+ "react-x"?: unknown;
1197
+ }>>;
964
1198
  type CustomComponent = z.infer<typeof CustomComponentSchema>;
965
1199
  type CustomComponentProp = z.infer<typeof CustomComponentPropSchema>;
966
1200
  type CustomHooks = z.infer<typeof CustomHooksSchema>;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var module$1 = require('module');
4
4
  var eff = require('@eslint-react/eff');
5
5
  var tsPattern = require('ts-pattern');
6
6
  var kit = require('@eslint-react/kit');
7
- var z = require('@zod/mini');
7
+ var z = require('zod');
8
8
 
9
9
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
10
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import module from 'module';
2
2
  import { identity, getOrElseUpdate } from '@eslint-react/eff';
3
3
  import { match, P } from 'ts-pattern';
4
4
  import { RegExp } from '@eslint-react/kit';
5
- import * as z from '@zod/mini';
5
+ import * as z from 'zod';
6
6
 
7
7
  // src/constants.ts
8
8
  var NPM_SCOPE = "@eslint-react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.50.0-next.4",
3
+ "version": "1.50.0-next.5",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/Rel1cx/eslint-react",
6
6
  "bugs": {
@@ -36,10 +36,10 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@typescript-eslint/utils": "^8.32.1",
39
- "@zod/mini": "^4.0.0-beta.20250505T195954",
40
39
  "ts-pattern": "^5.7.1",
41
- "@eslint-react/eff": "1.50.0-next.4",
42
- "@eslint-react/kit": "1.50.0-next.4"
40
+ "zod": "^3.25.28",
41
+ "@eslint-react/eff": "1.50.0-next.5",
42
+ "@eslint-react/kit": "1.50.0-next.5"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@tsconfig/node22": "^22.0.2",