Skip to content

Commit 0e535ff

Browse files
authored
refactor: replace valibot with @zod/mini (#1050)
1 parent 00b0c58 commit 0e535ff

13 files changed

+92
-104
lines changed

packages/shared/docs/type-aliases/CustomComponent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Type Alias: CustomComponent
88

9-
> **CustomComponent** = `InferOutput`\<*typeof* [`CustomComponentSchema`](../variables/CustomComponentSchema.md)\>
9+
> **CustomComponent** = `z.infer`\<*typeof* [`CustomComponentSchema`](../variables/CustomComponentSchema.md)\>

packages/shared/docs/type-aliases/CustomComponentProp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Type Alias: CustomComponentProp
88

9-
> **CustomComponentProp** = `InferOutput`\<*typeof* [`CustomComponentPropSchema`](../variables/CustomComponentPropSchema.md)\>
9+
> **CustomComponentProp** = `z.infer`\<*typeof* [`CustomComponentPropSchema`](../variables/CustomComponentPropSchema.md)\>

packages/shared/docs/type-aliases/CustomHooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Type Alias: CustomHooks
88

9-
> **CustomHooks** = `InferOutput`\<*typeof* [`CustomHooksSchema`](../variables/CustomHooksSchema.md)\>
9+
> **CustomHooks** = `z.infer`\<*typeof* [`CustomHooksSchema`](../variables/CustomHooksSchema.md)\>

packages/shared/docs/type-aliases/ESLintReactSettings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Type Alias: ESLintReactSettings
88

9-
> **ESLintReactSettings** = `InferOutput`\<*typeof* `ESLintReactSettingsSchema`\>
9+
> **ESLintReactSettings** = `z.infer`\<*typeof* `ESLintReactSettingsSchema`\>

packages/shared/docs/type-aliases/ESLintSettings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Type Alias: ESLintSettings
88

9-
> **ESLintSettings** = `InferOutput`\<*typeof* `ESLintSettingsSchema`\>
9+
> **ESLintSettings** = `z.infer`\<*typeof* `ESLintSettingsSchema`\>

packages/shared/docs/variables/CustomComponentPropSchema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Variable: CustomComponentPropSchema
88

9-
> `const` **CustomComponentPropSchema**: `ObjectSchema`\<\{ `as`: `OptionalSchema`\<`StringSchema`\<`undefined`\>, `undefined`\>; `defaultValue`: `OptionalSchema`\<`StringSchema`\<`undefined`\>, `undefined`\>; `name`: `StringSchema`\<`undefined`\>; \}, `undefined`\>
9+
> `const` **CustomComponentPropSchema**: `ZodMiniObject`\<\{ `as`: `ZodMiniOptional`\<`ZodMiniString`\<`string`\>\>; `defaultValue`: `ZodMiniOptional`\<`ZodMiniString`\<`string`\>\>; `name`: `ZodMiniString`\<`string`\>; \}, \{ \}\>

packages/shared/docs/variables/CustomComponentSchema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# Variable: CustomComponentSchema
88

9-
> `const` **CustomComponentSchema**: `ObjectSchema`\<\{ `as`: `OptionalSchema`\<`StringSchema`\<`undefined`\>, `undefined`\>; `attributes`: `OptionalSchema`\<`ArraySchema`\<`ObjectSchema`\<\{ `as`: `OptionalSchema`\<`StringSchema`\<`undefined`\>, `undefined`\>; `defaultValue`: `OptionalSchema`\<`StringSchema`\<`undefined`\>, `undefined`\>; `name`: `StringSchema`\<`undefined`\>; \}, `undefined`\>, `undefined`\>, `undefined`\>; `name`: `StringSchema`\<`undefined`\>; \}, `undefined`\>
9+
> `const` **CustomComponentSchema**: `ZodMiniObject`\<\{ `as`: `ZodMiniOptional`\<`ZodMiniString`\<`string`\>\>; `attributes`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniObject`\<\{ `as`: `ZodMiniOptional`\<`ZodMiniString`\<`string`\>\>; `defaultValue`: `ZodMiniOptional`\<`ZodMiniString`\<`string`\>\>; `name`: `ZodMiniString`\<`string`\>; \}, \{ \}\>\>\>; `name`: `ZodMiniString`\<`string`\>; \}, \{ \}\>
1010
1111
## Description
1212

packages/shared/docs/variables/CustomHooksSchema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
# Variable: CustomHooksSchema
88

9-
> `const` **CustomHooksSchema**: `ObjectSchema`\<\{ `use`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useActionState`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useCallback`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useContext`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useDebugValue`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useDeferredValue`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useEffect`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useFormStatus`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useId`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useImperativeHandle`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useInsertionEffect`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useLayoutEffect`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useMemo`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useOptimistic`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useReducer`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useRef`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useState`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useSyncExternalStore`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; `useTransition`: `OptionalSchema`\<`ArraySchema`\<`StringSchema`\<`undefined`\>, `undefined`\>, `undefined`\>; \}, `undefined`\>
9+
> `const` **CustomHooksSchema**: `ZodMiniObject`\<\{ `use`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useActionState`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useCallback`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useContext`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useDebugValue`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useDeferredValue`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useEffect`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useFormStatus`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useId`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useImperativeHandle`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useInsertionEffect`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useLayoutEffect`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useMemo`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useOptimistic`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useReducer`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useRef`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useState`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useSyncExternalStore`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; `useTransition`: `ZodMiniOptional`\<`ZodMiniArray`\<`ZodMiniString`\<`string`\>\>\>; \}, \{ \}\>

packages/shared/docs/variables/DEFAULT_ESLINT_REACT_SETTINGS.md

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,7 @@ The default ESLint settings for "react-x".
1414

1515
### additionalComponents?
1616

17-
> `readonly` `optional` **additionalComponents**: `object`[]
18-
19-
An array of user-defined components
20-
21-
#### Description
22-
23-
This is used to inform the ESLint React plugins how to treat these components during checks.
24-
25-
#### Example
26-
27-
```ts
28-
`[{ name: "Link", as: "a", attributes: [{ name: "to", as: "href" }, { name: "rel", defaultValue: "noopener noreferrer" }] }]`
29-
```
17+
> `optional` **additionalComponents**: `object`[]
3018
3119
### additionalHooks
3220

@@ -44,33 +32,13 @@ This is used to inform the ESLint React plugins how to treat these components du
4432

4533
> `readonly` **importSource**: `"react"` = `"react"`
4634
47-
### ~~jsxPragma?~~
48-
49-
> `readonly` `optional` **jsxPragma**: `string`
50-
51-
The identifier that's used for JSX Element creation.
52-
53-
#### Default
54-
55-
`"createElement"`
35+
### jsxPragma?
5636

57-
#### Deprecated
37+
> `optional` **jsxPragma**: `string`
5838
59-
### ~~jsxPragmaFrag?~~
39+
### jsxPragmaFrag?
6040

61-
> `readonly` `optional` **jsxPragmaFrag**: `string`
62-
63-
The identifier that's used for JSX fragment elements.
64-
65-
#### Description
66-
67-
This should not be a member expression (i.e. use "Fragment" instead of "React.Fragment").
68-
69-
#### Default
70-
71-
`"Fragment"`
72-
73-
#### Deprecated
41+
> `optional` **jsxPragmaFrag**: `string`
7442
7543
### polymorphicPropName
7644

@@ -80,6 +48,10 @@ This should not be a member expression (i.e. use "Fragment" instead of "React.Fr
8048

8149
> `readonly` **skipImportCheck**: `true` = `true`
8250
51+
### strict
52+
53+
> `readonly` **strict**: `false` = `false`
54+
8355
### version
8456

8557
> `readonly` **version**: `"detect"` = `"detect"`

packages/shared/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
"@eslint-react/eff": "workspace:*",
4646
"@eslint-react/kit": "workspace:*",
4747
"@typescript-eslint/utils": "^8.29.1",
48+
"@zod/mini": "^4.0.0-beta.0",
4849
"picomatch": "^4.0.2",
49-
"ts-pattern": "^5.7.0",
50-
"valibot": "^1.0.0"
50+
"ts-pattern": "^5.7.0"
5151
},
5252
"devDependencies": {
5353
"@local/configs": "workspace:*",

0 commit comments

Comments
 (0)