diff --git a/biome.json b/biome.json index 756918a..ae01b13 100644 --- a/biome.json +++ b/biome.json @@ -8,12 +8,12 @@ "rules": { "recommended": true, "suspicious": { - "noExplicitAny": "warn", + "noExplicitAny": "error", "noRedundantUseStrict": "off", "noImplicitAnyLet": "off" }, "style": { - "noNonNullAssertion": "off", + "noNonNullAssertion": "warn", "useConst": "warn", "useNodejsImportProtocol": "off", "useTemplate": "off" diff --git a/src/schema.ts b/src/schema.ts index 7398d10..05c9ff3 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -105,8 +105,16 @@ export function normalizeCardsPayload(parsed: { cards?: unknown[] }): RawCard[] })); } -export function cardOutputSchema(strict: boolean) { - const cardSchema: any = { +interface JsonSchema { + type: string; + properties?: Record; + items?: unknown; + required?: string[]; + additionalProperties?: boolean; +} + +export function cardOutputSchema(strict: boolean): JsonSchema { + const cardSchema: JsonSchema = { type: 'object', properties: { title: { type: 'string' }, @@ -119,7 +127,7 @@ export function cardOutputSchema(strict: boolean) { }, required: ['title', 'anchor', 'gist', 'bullets'], }; - const rootSchema: any = { + const rootSchema: JsonSchema = { type: 'object', properties: { cards: {