@eslint-react/shared 1.43.1-next.0 → 1.43.2-beta.0

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,5 +1,4 @@
1
- import * as valibot from 'valibot';
2
- import { InferOutput } from 'valibot';
1
+ import * as z from '@zod/mini';
3
2
  import { _ } from '@eslint-react/eff';
4
3
 
5
4
  /**
@@ -27,539 +26,539 @@ declare const getId: () => string;
27
26
 
28
27
  declare function getReactVersion(fallback?: string): string;
29
28
 
30
- declare const CustomComponentPropSchema: valibot.ObjectSchema<{
29
+ declare const CustomComponentPropSchema: z.ZodMiniObject<{
31
30
  /**
32
31
  * The name of the prop in the user-defined component.
33
32
  * @example
34
33
  * "to"
35
34
  */
36
- readonly name: valibot.StringSchema<undefined>;
35
+ name: z.ZodMiniString<string>;
37
36
  /**
38
37
  * The name of the prop in the host component.
39
38
  * @example
40
39
  * "href"
41
40
  */
42
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
41
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
43
42
  /**
44
43
  * Whether the prop is controlled or not in the user-defined component.
45
44
  * @internal
46
45
  * @example
47
46
  * `true`
48
47
  */
49
- readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
48
+ controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
50
49
  /**
51
50
  * The default value of the prop in the user-defined component.
52
51
  * @example
53
52
  * `"/"`
54
53
  */
55
- readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
56
- }, undefined>;
54
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
55
+ }, {}>;
57
56
  /**
58
57
  * @description
59
58
  * This will provide some key information to the rule before checking for user-defined components.
60
59
  * For example:
61
60
  * Which prop is used as the `href` prop for the user-defined `Link` component that represents the built-in `a` element.
62
61
  */
63
- declare const CustomComponentSchema: valibot.ObjectSchema<{
62
+ declare const CustomComponentSchema: z.ZodMiniObject<{
64
63
  /**
65
64
  * The name of the user-defined component.
66
65
  * @example
67
66
  * "Link"
68
67
  */
69
- readonly name: valibot.StringSchema<undefined>;
68
+ name: z.ZodMiniString<string>;
70
69
  /**
71
70
  * The name of the host component that the user-defined component represents.
72
71
  * @example
73
72
  * "a"
74
73
  */
75
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
74
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
76
75
  /**
77
76
  * Attributes mapping between the user-defined component and the host component.
78
77
  * @example
79
78
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
80
79
  */
81
- readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
80
+ attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
82
81
  /**
83
82
  * The name of the prop in the user-defined component.
84
83
  * @example
85
84
  * "to"
86
85
  */
87
- readonly name: valibot.StringSchema<undefined>;
86
+ name: z.ZodMiniString<string>;
88
87
  /**
89
88
  * The name of the prop in the host component.
90
89
  * @example
91
90
  * "href"
92
91
  */
93
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
92
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
94
93
  /**
95
94
  * Whether the prop is controlled or not in the user-defined component.
96
95
  * @internal
97
96
  * @example
98
97
  * `true`
99
98
  */
100
- readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
99
+ controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
101
100
  /**
102
101
  * The default value of the prop in the user-defined component.
103
102
  * @example
104
103
  * `"/"`
105
104
  */
106
- readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
107
- }, undefined>, undefined>, undefined>;
105
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
106
+ }, {}>>>;
108
107
  /**
109
108
  * The ESQuery selector to select the component precisely.
110
109
  * @internal
111
110
  * @example
112
111
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
113
112
  */
114
- readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
115
- }, undefined>;
116
- declare const CustomHooksSchema: valibot.ObjectSchema<{
117
- readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
118
- readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
119
- readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
120
- readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
121
- readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
122
- readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
123
- readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
124
- readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
125
- readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
126
- readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
127
- readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
128
- readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
129
- readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
130
- readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
131
- readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
132
- readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
133
- readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
134
- readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
135
- readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
136
- }, undefined>;
113
+ selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
114
+ }, {}>;
115
+ declare const CustomHooksSchema: z.ZodMiniObject<{
116
+ use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
117
+ useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
118
+ useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
119
+ useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
120
+ useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
121
+ useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
122
+ useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
123
+ useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
124
+ useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
125
+ useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
126
+ useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
127
+ useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
128
+ useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
129
+ useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
130
+ useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
131
+ useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
132
+ useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
133
+ useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
134
+ useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
135
+ }, {}>;
137
136
  /**
138
137
  * @internal
139
138
  */
140
- declare const ESLintReactSettingsSchema: valibot.ObjectSchema<{
139
+ declare const ESLintReactSettingsSchema: z.ZodMiniObject<{
141
140
  /**
142
141
  * The source where React is imported from.
143
142
  * @description This allows to specify a custom import location for React when not using the official distribution.
144
143
  * @default `"react"`
145
144
  * @example `"@pika/react"`
146
145
  */
147
- readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
146
+ importSource: z.ZodMiniOptional<z.ZodMiniString<string>>;
148
147
  /**
149
148
  * The identifier that's used for JSX Element creation.
150
149
  * @default `"createElement"`
151
150
  * @deprecated
152
151
  */
153
- readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
152
+ jsxPragma: z.ZodMiniOptional<z.ZodMiniString<string>>;
154
153
  /**
155
154
  * The identifier that's used for JSX fragment elements.
156
155
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
157
156
  * @default `"Fragment"`
158
157
  * @deprecated
159
158
  */
160
- readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
159
+ jsxPragmaFrag: z.ZodMiniOptional<z.ZodMiniString<string>>;
161
160
  /**
162
161
  * The name of the prop that is used for polymorphic components.
163
162
  * @description This is used to determine the type of the component.
164
163
  * @example `"as"`
165
164
  */
166
- readonly polymorphicPropName: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
165
+ polymorphicPropName: z.ZodMiniOptional<z.ZodMiniString<string>>;
167
166
  /**
168
167
  * @internal
169
168
  */
170
- readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, false>;
169
+ strict: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
171
170
  /**
172
171
  * Check both the shape and the import to determine if an API is from React.
173
172
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
174
173
  * @default `true`
175
174
  */
176
- readonly skipImportCheck: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, true>;
175
+ skipImportCheck: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
177
176
  /**
178
177
  * React version to use, "detect" means auto detect React version from the project's dependencies.
179
178
  * If `importSource` is specified, an equivalent version of React should be provided here.
180
179
  * @example `"18.3.1"`
181
180
  * @default `"detect"`
182
181
  */
183
- readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
182
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
184
183
  /**
185
184
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
186
185
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
187
186
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
188
187
  */
189
- readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
190
- readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
191
- readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
192
- readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
193
- readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
194
- readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
195
- readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
196
- readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
197
- readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
198
- readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
199
- readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
200
- readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
201
- readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
202
- readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
203
- readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
204
- readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
205
- readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
206
- readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
207
- readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
208
- readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
209
- }, undefined>, undefined>;
188
+ additionalHooks: z.ZodMiniOptional<z.ZodMiniObject<{
189
+ use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
190
+ useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
191
+ useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
192
+ useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
193
+ useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
194
+ useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
195
+ useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
196
+ useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
197
+ useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
198
+ useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
199
+ useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
200
+ useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
201
+ useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
202
+ useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
203
+ useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
204
+ useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
205
+ useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
206
+ useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
207
+ useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
208
+ }, {}>>;
210
209
  /**
211
210
  * An array of user-defined components
212
211
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
213
212
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
214
213
  */
215
- readonly additionalComponents: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
214
+ additionalComponents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
216
215
  /**
217
216
  * The name of the user-defined component.
218
217
  * @example
219
218
  * "Link"
220
219
  */
221
- readonly name: valibot.StringSchema<undefined>;
220
+ name: z.ZodMiniString<string>;
222
221
  /**
223
222
  * The name of the host component that the user-defined component represents.
224
223
  * @example
225
224
  * "a"
226
225
  */
227
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
226
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
228
227
  /**
229
228
  * Attributes mapping between the user-defined component and the host component.
230
229
  * @example
231
230
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
232
231
  */
233
- readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
232
+ attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
234
233
  /**
235
234
  * The name of the prop in the user-defined component.
236
235
  * @example
237
236
  * "to"
238
237
  */
239
- readonly name: valibot.StringSchema<undefined>;
238
+ name: z.ZodMiniString<string>;
240
239
  /**
241
240
  * The name of the prop in the host component.
242
241
  * @example
243
242
  * "href"
244
243
  */
245
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
244
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
246
245
  /**
247
246
  * Whether the prop is controlled or not in the user-defined component.
248
247
  * @internal
249
248
  * @example
250
249
  * `true`
251
250
  */
252
- readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
251
+ controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
253
252
  /**
254
253
  * The default value of the prop in the user-defined component.
255
254
  * @example
256
255
  * `"/"`
257
256
  */
258
- readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
259
- }, undefined>, undefined>, undefined>;
257
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
258
+ }, {}>>>;
260
259
  /**
261
260
  * The ESQuery selector to select the component precisely.
262
261
  * @internal
263
262
  * @example
264
263
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
265
264
  */
266
- readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
267
- }, undefined>, undefined>, undefined>;
268
- }, undefined>;
265
+ selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
266
+ }, {}>>>;
267
+ }, {}>;
269
268
  /**
270
269
  * @internal
271
270
  */
272
- declare const ESLintSettingsSchema: valibot.OptionalSchema<valibot.ObjectSchema<{
273
- readonly "react-x": valibot.OptionalSchema<valibot.ObjectSchema<{
271
+ declare const ESLintSettingsSchema: z.ZodMiniOptional<z.ZodMiniObject<{
272
+ "react-x": z.ZodMiniOptional<z.ZodMiniObject<{
274
273
  /**
275
274
  * The source where React is imported from.
276
275
  * @description This allows to specify a custom import location for React when not using the official distribution.
277
276
  * @default `"react"`
278
277
  * @example `"@pika/react"`
279
278
  */
280
- readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
279
+ importSource: z.ZodMiniOptional<z.ZodMiniString<string>>;
281
280
  /**
282
281
  * The identifier that's used for JSX Element creation.
283
282
  * @default `"createElement"`
284
283
  * @deprecated
285
284
  */
286
- readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
285
+ jsxPragma: z.ZodMiniOptional<z.ZodMiniString<string>>;
287
286
  /**
288
287
  * The identifier that's used for JSX fragment elements.
289
288
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
290
289
  * @default `"Fragment"`
291
290
  * @deprecated
292
291
  */
293
- readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
292
+ jsxPragmaFrag: z.ZodMiniOptional<z.ZodMiniString<string>>;
294
293
  /**
295
294
  * The name of the prop that is used for polymorphic components.
296
295
  * @description This is used to determine the type of the component.
297
296
  * @example `"as"`
298
297
  */
299
- readonly polymorphicPropName: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
298
+ polymorphicPropName: z.ZodMiniOptional<z.ZodMiniString<string>>;
300
299
  /**
301
300
  * @internal
302
301
  */
303
- readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, false>;
302
+ strict: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
304
303
  /**
305
304
  * Check both the shape and the import to determine if an API is from React.
306
305
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
307
306
  * @default `true`
308
307
  */
309
- readonly skipImportCheck: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, true>;
308
+ skipImportCheck: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
310
309
  /**
311
310
  * React version to use, "detect" means auto detect React version from the project's dependencies.
312
311
  * If `importSource` is specified, an equivalent version of React should be provided here.
313
312
  * @example `"18.3.1"`
314
313
  * @default `"detect"`
315
314
  */
316
- readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
315
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
317
316
  /**
318
317
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
319
318
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
320
319
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
321
320
  */
322
- readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
323
- readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
324
- readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
325
- readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
326
- readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
327
- readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
328
- readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
329
- readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
330
- readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
331
- readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
332
- readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
333
- readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
334
- readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
335
- readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
336
- readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
337
- readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
338
- readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
339
- readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
340
- readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
341
- readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
342
- }, undefined>, undefined>;
321
+ additionalHooks: z.ZodMiniOptional<z.ZodMiniObject<{
322
+ use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
323
+ useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
324
+ useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
325
+ useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
326
+ useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
327
+ useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
328
+ useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
329
+ useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
330
+ useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
331
+ useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
332
+ useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
333
+ useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
334
+ useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
335
+ useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
336
+ useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
337
+ useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
338
+ useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
339
+ useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
340
+ useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
341
+ }, {}>>;
343
342
  /**
344
343
  * An array of user-defined components
345
344
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
346
345
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
347
346
  */
348
- readonly additionalComponents: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
347
+ additionalComponents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
349
348
  /**
350
349
  * The name of the user-defined component.
351
350
  * @example
352
351
  * "Link"
353
352
  */
354
- readonly name: valibot.StringSchema<undefined>;
353
+ name: z.ZodMiniString<string>;
355
354
  /**
356
355
  * The name of the host component that the user-defined component represents.
357
356
  * @example
358
357
  * "a"
359
358
  */
360
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
359
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
361
360
  /**
362
361
  * Attributes mapping between the user-defined component and the host component.
363
362
  * @example
364
363
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
365
364
  */
366
- readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
365
+ attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
367
366
  /**
368
367
  * The name of the prop in the user-defined component.
369
368
  * @example
370
369
  * "to"
371
370
  */
372
- readonly name: valibot.StringSchema<undefined>;
371
+ name: z.ZodMiniString<string>;
373
372
  /**
374
373
  * The name of the prop in the host component.
375
374
  * @example
376
375
  * "href"
377
376
  */
378
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
377
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
379
378
  /**
380
379
  * Whether the prop is controlled or not in the user-defined component.
381
380
  * @internal
382
381
  * @example
383
382
  * `true`
384
383
  */
385
- readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
384
+ controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
386
385
  /**
387
386
  * The default value of the prop in the user-defined component.
388
387
  * @example
389
388
  * `"/"`
390
389
  */
391
- readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
392
- }, undefined>, undefined>, undefined>;
390
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
391
+ }, {}>>>;
393
392
  /**
394
393
  * The ESQuery selector to select the component precisely.
395
394
  * @internal
396
395
  * @example
397
396
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
398
397
  */
399
- readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
400
- }, undefined>, undefined>, undefined>;
401
- }, undefined>, undefined>;
398
+ selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
399
+ }, {}>>>;
400
+ }, {}>>;
402
401
  /** @deprecated Use `react-x` instead */
403
- readonly reactOptions: valibot.OptionalSchema<valibot.ObjectSchema<{
402
+ reactOptions: z.ZodMiniOptional<z.ZodMiniObject<{
404
403
  /**
405
404
  * The source where React is imported from.
406
405
  * @description This allows to specify a custom import location for React when not using the official distribution.
407
406
  * @default `"react"`
408
407
  * @example `"@pika/react"`
409
408
  */
410
- readonly importSource: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
409
+ importSource: z.ZodMiniOptional<z.ZodMiniString<string>>;
411
410
  /**
412
411
  * The identifier that's used for JSX Element creation.
413
412
  * @default `"createElement"`
414
413
  * @deprecated
415
414
  */
416
- readonly jsxPragma: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
415
+ jsxPragma: z.ZodMiniOptional<z.ZodMiniString<string>>;
417
416
  /**
418
417
  * The identifier that's used for JSX fragment elements.
419
418
  * @description This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
420
419
  * @default `"Fragment"`
421
420
  * @deprecated
422
421
  */
423
- readonly jsxPragmaFrag: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
422
+ jsxPragmaFrag: z.ZodMiniOptional<z.ZodMiniString<string>>;
424
423
  /**
425
424
  * The name of the prop that is used for polymorphic components.
426
425
  * @description This is used to determine the type of the component.
427
426
  * @example `"as"`
428
427
  */
429
- readonly polymorphicPropName: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
428
+ polymorphicPropName: z.ZodMiniOptional<z.ZodMiniString<string>>;
430
429
  /**
431
430
  * @internal
432
431
  */
433
- readonly strict: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, false>;
432
+ strict: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
434
433
  /**
435
434
  * Check both the shape and the import to determine if an API is from React.
436
435
  * @description This can prevent false positives when using a irrelevant third-party library that has similar APIs to React.
437
436
  * @default `true`
438
437
  */
439
- readonly skipImportCheck: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, true>;
438
+ skipImportCheck: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
440
439
  /**
441
440
  * React version to use, "detect" means auto detect React version from the project's dependencies.
442
441
  * If `importSource` is specified, an equivalent version of React should be provided here.
443
442
  * @example `"18.3.1"`
444
443
  * @default `"detect"`
445
444
  */
446
- readonly version: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
445
+ version: z.ZodMiniOptional<z.ZodMiniString<string>>;
447
446
  /**
448
447
  * A object to define additional hooks that are equivalent to the built-in React Hooks.
449
448
  * @description ESLint React will recognize these aliases as equivalent to the built-in hooks in all its rules.
450
449
  * @example `{ useEffect: ["useIsomorphicLayoutEffect"] }`
451
450
  */
452
- readonly additionalHooks: valibot.OptionalSchema<valibot.ObjectSchema<{
453
- readonly use: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
454
- readonly useActionState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
455
- readonly useCallback: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
456
- readonly useContext: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
457
- readonly useDebugValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
458
- readonly useDeferredValue: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
459
- readonly useEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
460
- readonly useFormStatus: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
461
- readonly useId: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
462
- readonly useImperativeHandle: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
463
- readonly useInsertionEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
464
- readonly useLayoutEffect: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
465
- readonly useMemo: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
466
- readonly useOptimistic: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
467
- readonly useReducer: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
468
- readonly useRef: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
469
- readonly useState: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
470
- readonly useSyncExternalStore: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
471
- readonly useTransition: valibot.OptionalSchema<valibot.ArraySchema<valibot.StringSchema<undefined>, undefined>, undefined>;
472
- }, undefined>, undefined>;
451
+ additionalHooks: z.ZodMiniOptional<z.ZodMiniObject<{
452
+ use: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
453
+ useActionState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
454
+ useCallback: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
455
+ useContext: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
456
+ useDebugValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
457
+ useDeferredValue: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
458
+ useEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
459
+ useFormStatus: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
460
+ useId: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
461
+ useImperativeHandle: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
462
+ useInsertionEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
463
+ useLayoutEffect: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
464
+ useMemo: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
465
+ useOptimistic: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
466
+ useReducer: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
467
+ useRef: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
468
+ useState: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
469
+ useSyncExternalStore: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
470
+ useTransition: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
471
+ }, {}>>;
473
472
  /**
474
473
  * An array of user-defined components
475
474
  * @description This is used to inform the ESLint React plugins how to treat these components during checks.
476
475
  * @example `[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
477
476
  */
478
- readonly additionalComponents: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
477
+ additionalComponents: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
479
478
  /**
480
479
  * The name of the user-defined component.
481
480
  * @example
482
481
  * "Link"
483
482
  */
484
- readonly name: valibot.StringSchema<undefined>;
483
+ name: z.ZodMiniString<string>;
485
484
  /**
486
485
  * The name of the host component that the user-defined component represents.
487
486
  * @example
488
487
  * "a"
489
488
  */
490
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
489
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
491
490
  /**
492
491
  * Attributes mapping between the user-defined component and the host component.
493
492
  * @example
494
493
  * `Link` component has a `to` attribute that represents the `href` attribute in the built-in `a` element with a default value of `"/"`.
495
494
  */
496
- readonly attributes: valibot.OptionalSchema<valibot.ArraySchema<valibot.ObjectSchema<{
495
+ attributes: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
497
496
  /**
498
497
  * The name of the prop in the user-defined component.
499
498
  * @example
500
499
  * "to"
501
500
  */
502
- readonly name: valibot.StringSchema<undefined>;
501
+ name: z.ZodMiniString<string>;
503
502
  /**
504
503
  * The name of the prop in the host component.
505
504
  * @example
506
505
  * "href"
507
506
  */
508
- readonly as: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
507
+ as: z.ZodMiniOptional<z.ZodMiniString<string>>;
509
508
  /**
510
509
  * Whether the prop is controlled or not in the user-defined component.
511
510
  * @internal
512
511
  * @example
513
512
  * `true`
514
513
  */
515
- readonly controlled: valibot.OptionalSchema<valibot.BooleanSchema<undefined>, undefined>;
514
+ controlled: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
516
515
  /**
517
516
  * The default value of the prop in the user-defined component.
518
517
  * @example
519
518
  * `"/"`
520
519
  */
521
- readonly defaultValue: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
522
- }, undefined>, undefined>, undefined>;
520
+ defaultValue: z.ZodMiniOptional<z.ZodMiniString<string>>;
521
+ }, {}>>>;
523
522
  /**
524
523
  * The ESQuery selector to select the component precisely.
525
524
  * @internal
526
525
  * @example
527
526
  * `JSXElement:has(JSXAttribute[name.name='component'][value.value='a'])`
528
527
  */
529
- readonly selector: valibot.OptionalSchema<valibot.StringSchema<undefined>, undefined>;
530
- }, undefined>, undefined>, undefined>;
531
- }, undefined>, undefined>;
532
- }, undefined>, {}>;
533
- type CustomComponent = InferOutput<typeof CustomComponentSchema>;
534
- type CustomComponentProp = InferOutput<typeof CustomComponentPropSchema>;
535
- type CustomHooks = InferOutput<typeof CustomHooksSchema>;
536
- type ESLintReactSettings = InferOutput<typeof ESLintReactSettingsSchema>;
537
- type ESLintSettings = InferOutput<typeof ESLintSettingsSchema>;
528
+ selector: z.ZodMiniOptional<z.ZodMiniString<string>>;
529
+ }, {}>>>;
530
+ }, {}>>;
531
+ }, {}>>;
532
+ type CustomComponent = z.infer<typeof CustomComponentSchema>;
533
+ type CustomComponentProp = z.infer<typeof CustomComponentPropSchema>;
534
+ type CustomHooks = z.infer<typeof CustomHooksSchema>;
535
+ type ESLintReactSettings = z.infer<typeof ESLintReactSettingsSchema>;
536
+ type ESLintSettings = z.infer<typeof ESLintSettingsSchema>;
538
537
  /**
539
538
  * The default ESLint settings for "react-x".
540
539
  */
541
540
  declare const DEFAULT_ESLINT_REACT_SETTINGS: {
541
+ readonly version: "detect";
542
542
  readonly importSource: "react";
543
- readonly polymorphicPropName: "as";
543
+ readonly strict: false;
544
544
  readonly skipImportCheck: true;
545
- readonly version: "detect";
545
+ readonly polymorphicPropName: "as";
546
546
  readonly additionalHooks: {
547
547
  readonly useEffect: ["useIsomorphicLayoutEffect"];
548
548
  readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
549
549
  };
550
550
  readonly jsxPragma?: string | undefined;
551
551
  readonly jsxPragmaFrag?: string | undefined;
552
- readonly strict: boolean;
553
552
  readonly additionalComponents?: {
554
- name: string;
555
553
  as?: string | undefined;
556
554
  attributes?: {
557
- name: string;
558
555
  as?: string | undefined;
559
556
  controlled?: boolean | undefined;
560
557
  defaultValue?: string | undefined;
558
+ name: string;
561
559
  }[] | undefined;
562
560
  selector?: string | undefined;
561
+ name: string;
563
562
  }[] | undefined;
564
563
  };
565
564