Skip to content

Commit bada871

Browse files
committed
Eslint fixes
1 parent e50c932 commit bada871

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

src/lib/adapters/typebox.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,5 @@ function _typeboxClient<T extends TSchema>(
9797
export const typebox = /* @__PURE__ */ memoize(_typebox);
9898
export const typeboxClient = /* @__PURE__ */ memoize(_typeboxClient);
9999

100+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
100101
const compiled = new WeakMap<TSchema, Validator<{}, TSchema>>();

src/lib/adapters/zod4.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const defaultJSONSchemaOptions = {
5353
// Handle z.stringbool() - it's a pipe from string->transform->boolean
5454
// Colin Hacks explained: stringbool is just string -> transform -> boolean
5555
// When io:'input', we see the string schema; when io:'output', we see boolean
56+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5657
const pipeDef = def as typeof def & { in: any; out: any };
5758
const inSchema = pipeDef.in;
5859
const outSchema = pipeDef.out;
@@ -75,6 +76,7 @@ const defaultJSONSchemaOptions = {
7576
break;
7677
} else if (currentDef.type === 'pipe') {
7778
// Continue traversing the pipe
79+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7880
const nestedPipeDef = currentDef as typeof currentDef & { out: any };
7981
currentSchema = nestedPipeDef.out;
8082
} else {
@@ -119,13 +121,15 @@ const defaultJSONSchemaOptions = {
119121
ctx.jsonSchema.type = 'array';
120122
ctx.jsonSchema.uniqueItems = true;
121123
// Convert the default value from Set to Array
122-
ctx.jsonSchema.default = Array.from(def.defaultValue);
124+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
125+
ctx.jsonSchema.default = Array.from(def.defaultValue as any);
123126
} else if (innerDef.type === 'map' && def.defaultValue instanceof Map) {
124127
// Set the proper schema type for maps
125128
ctx.jsonSchema.type = 'array';
126129
ctx.jsonSchema.format = 'map';
127130
// Convert the default value from Map to Array of tuples
128-
ctx.jsonSchema.default = Array.from(def.defaultValue);
131+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
132+
ctx.jsonSchema.default = Array.from(def.defaultValue as any);
129133
}
130134
}
131135
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
delayMs: 500,
1717
timeoutMs: 10000
1818
});
19-
const { enhance, submitting, delayed, timeout, reset } = form;
19+
const { enhance, submitting, delayed, timeout } = form;
2020
2121
const time = () => new Date().toISOString();
2222

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
console.log('onResult', event);
2121
}
2222
});
23-
const { enhance, submitting, delayed, timeout, reset } = form;
23+
const { enhance, submitting, delayed, timeout } = form;
2424
2525
const time = () => new Date().toISOString();
2626

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
timeoutMs: 1000
1919
});
20-
const { enhance, submitting, delayed, timeout, reset } = form;
20+
const { enhance, submitting, delayed, timeout } = form;
2121
2222
const time = () => new Date().toISOString();
2323

src/tests/issue-623.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-explicit-any */
12
import { describe, it, expect } from 'vitest';
23
import { z as z4 } from 'zod';
34
import { zod } from '$lib/adapters/zod4.js';

0 commit comments

Comments
 (0)