Skip to content

Commit 3e5ed8e

Browse files
committed
Fix formatting checks on main.
1 parent 64dab42 commit 3e5ed8e

3 files changed

Lines changed: 21 additions & 20 deletions

File tree

‎docs/guide/pages-routing/actions-and-forms.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,20 @@ The types are inferred from your action's `withValidator()` schema in the compan
147147

148148
`useForm` returns a reactive object with:
149149

150-
| Property / Method | Purpose |
151-
| -------------------------------- | ---------------------------------------------------------------------------------- |
152-
| `data` / `setData` | Current form values, typed to match the action's body schema. |
153-
| `errors` | Field-level validation errors, keys typed to body field names. |
154-
| `error` | Action error, or `null`. |
155-
| `post`, `put`, `patch`, `delete` | Submit the form with that method. In React these are native form action callbacks. |
156-
| `pending` | `true` while the submission is in flight. |
157-
| `hasChanges` | `true` if form data differs from the current defaults. After a successful submit, defaults update to the submitted values so `hasChanges` becomes `false`. |
158-
| `wasSuccessful` | `true` after a successful submission. Stays `true` until the next submission. |
159-
| `recentlySuccessful` | `true` for 2 seconds after a successful submission. Useful for flash messages. |
150+
| Property / Method | Purpose |
151+
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
152+
| `data` / `setData` | Current form values, typed to match the action's body schema. |
153+
| `errors` | Field-level validation errors, keys typed to body field names. |
154+
| `error` | Action error, or `null`. |
155+
| `post`, `put`, `patch`, `delete` | Submit the form with that method. In React these are native form action callbacks. |
156+
| `pending` | `true` while the submission is in flight. |
157+
| `hasChanges` | `true` if form data differs from the current defaults. After a successful submit, defaults update to the submitted values so `hasChanges` becomes `false`. |
158+
| `wasSuccessful` | `true` after a successful submission. Stays `true` until the next submission. |
159+
| `recentlySuccessful` | `true` for 2 seconds after a successful submission. Useful for flash messages. |
160160
| `reset(...fields)` | Reset form data to the current defaults (last submitted values after success). Field names autocomplete. Pass `{ initial: true }` first to reset to the values passed to `useForm`. |
161-
| `resetOnSuccess` (option) | When `true`, a successful submit resets both form data and defaults to the mount-time values. Useful for create forms that should clear after save. |
162-
| `clearErrors(...fields)` | Clear validation errors. Field names autocomplete. |
163-
| `clearError()` | Clear `error`. |
161+
| `resetOnSuccess` (option) | When `true`, a successful submit resets both form data and defaults to the mount-time values. Useful for create forms that should clear after save. |
162+
| `clearErrors(...fields)` | Clear validation errors. Field names autocomplete. |
163+
| `clearError()` | Clear `error`. |
164164

165165
For a native React form, use `form.post`, `form.put`, `form.patch`, or `form.delete` as a native form action. For an awaitable mutation, use `action()`. In Vue, Svelte, and Solid, form submissions return `Promise<void>`; catch thrown errors or use your framework's error handling.
166166

‎docs/guide/type-safety.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ The `action()` helper gets the same type checking. See [Actions & Forms](./pages
104104

105105
## What Gets Checked
106106

107-
| Layer | What's type-checked |
108-
| ------------ | -------------------------------------------------------------------- |
109-
| Database | Table columns, value types, insert/update shapes from Drizzle schema |
110-
| Handlers | `c.env` bindings, validator input, return type |
111-
| Fetch client | Route paths, HTTP methods, `body`/`query`/`params`, response type |
107+
| Layer | What's type-checked |
108+
| ------------ | --------------------------------------------------------------------------------------------------------------------- |
109+
| Database | Table columns, value types, insert/update shapes from Drizzle schema |
110+
| Handlers | `c.env` bindings, validator input, return type |
111+
| Fetch client | Route paths, HTTP methods, `body`/`query`/`params`, response type |
112112
| `useForm` | Action URLs, `data` fields, `errors` keys, `reset()` args (including `{ initial: true }`), `params`, `resetOnSuccess` |
113-
| `action()` | Action URLs, `data` payload, `params` |
113+
| `action()` | Action URLs, `data` payload, `params` |
114114

115115
## Serialization
116116

‎packages/void/src/cli/package.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,8 @@ export function readWranglerHtmlHandling(
656656
return undefined;
657657
}
658658
const value = (assets as Record<string, unknown>).html_handling;
659-
return typeof value === 'string' && WRANGLER_HTML_HANDLING.has(value as AssetConfig['html_handling'])
659+
return typeof value === 'string' &&
660+
WRANGLER_HTML_HANDLING.has(value as AssetConfig['html_handling'])
660661
? (value as AssetConfig['html_handling'])
661662
: undefined;
662663
}

0 commit comments

Comments
 (0)