Skip to content

Commit c0a905a

Browse files
committed
Linter
1 parent c8cec22 commit c0a905a

File tree

4 files changed

+35
-36
lines changed

4 files changed

+35
-36
lines changed

src/lib/client/form.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function Form<T extends Record<string, unknown>, M>(
124124
afterNavigate(() => {
125125
ErrorTextEvents_removeErrorTextListeners();
126126
completed({ cancelled: false });
127-
})
127+
});
128128

129129
return {
130130
submitting() {

src/routes/(v2)/v2/issue-622/bad-with-workaround/+page.server.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@ import { superValidate } from '$lib/index.js';
33
import { redirect } from '@sveltejs/kit';
44
import { z } from 'zod/v4';
55

6+
const delay = (ms: number) => new Promise((r) => setTimeout(r, ms));
67

7-
const delay = (ms: number) => new Promise(r => setTimeout(r, ms))
8+
const formId = 'test-bad-with-workaround';
89

9-
const formId = "test-bad-with-workaround"
10-
11-
const ZodSchema = z.object({ hello: z.string() })
12-
const FormSchema = zod4(ZodSchema)
10+
const ZodSchema = z.object({ hello: z.string() });
11+
const FormSchema = zod4(ZodSchema);
1312

1413
export async function load() {
15-
const form = await superValidate(FormSchema, { id: formId })
16-
return { form }
14+
const form = await superValidate(FormSchema, { id: formId });
15+
return { form };
1716
}
1817

1918
export const actions = {
20-
async default() {
21-
await delay(5000)
22-
redirect(302, "/v2/issue-622/bad-with-workaround")
23-
}
24-
}
19+
async default() {
20+
await delay(5000);
21+
redirect(302, '/v2/issue-622/bad-with-workaround');
22+
}
23+
};

src/routes/(v2)/v2/issue-622/bad/+page.server.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ import { superValidate } from '$lib/index.js';
33
import { redirect } from '@sveltejs/kit';
44
import { z } from 'zod/v4';
55

6-
const delay = (ms: number) => new Promise(r => setTimeout(r, ms))
6+
const delay = (ms: number) => new Promise((r) => setTimeout(r, ms));
77

8-
const formId = "test-bad"
8+
const formId = 'test-bad';
99

10-
const ZodSchema = z.object({ hello: z.string() })
11-
const FormSchema = zod4(ZodSchema)
10+
const ZodSchema = z.object({ hello: z.string() });
11+
const FormSchema = zod4(ZodSchema);
1212

1313
export async function load() {
14-
const form = await superValidate(FormSchema, { id: formId })
15-
return { form }
14+
const form = await superValidate(FormSchema, { id: formId });
15+
return { form };
1616
}
1717

1818
export const actions = {
19-
async default() {
20-
await delay(5000)
21-
redirect(302, "/v2/issue-622/bad")
22-
}
23-
}
19+
async default() {
20+
await delay(5000);
21+
redirect(302, '/v2/issue-622/bad');
22+
}
23+
};

src/routes/(v2)/v2/issue-622/good/+page.server.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@ import { zod as zod4 } from '$lib/adapters/zod4.js';
22
import { superValidate } from '$lib/index.js';
33
import { z } from 'zod/v4';
44

5-
const delay = (ms: number) => new Promise(r => setTimeout(r, ms))
5+
const delay = (ms: number) => new Promise((r) => setTimeout(r, ms));
66

7-
const formId = "test-good"
7+
const formId = 'test-good';
88

9-
const ZodSchema = z.object({ hello: z.string() })
10-
const FormSchema = zod4(ZodSchema)
9+
const ZodSchema = z.object({ hello: z.string() });
10+
const FormSchema = zod4(ZodSchema);
1111

1212
export async function load() {
13-
const form = await superValidate(FormSchema, { id: formId })
14-
return { form }
13+
const form = await superValidate(FormSchema, { id: formId });
14+
return { form };
1515
}
1616

1717
export const actions = {
18-
async default() {
19-
await delay(5000)
20-
const form = await superValidate(FormSchema, { id: formId })
21-
return { form }
22-
}
23-
}
18+
async default() {
19+
await delay(5000);
20+
const form = await superValidate(FormSchema, { id: formId });
21+
return { form };
22+
}
23+
};

0 commit comments

Comments
 (0)