From 38a987676e1818441ad169e8c74b64f6971ae47c Mon Sep 17 00:00:00 2001 From: Alan Mooiman Date: Mon, 29 Sep 2025 08:18:43 -0400 Subject: [PATCH] Fix frontend CI (#1028) --- .vscode/settings.json | 1 + frontend/composables/utils.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 96522090..2dad0e2a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,7 @@ "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, "eslint.format.enable": true, + "eslint.validate": ["javascript", "typescript", "vue"], "eslint.useFlatConfig": true, "css.validate": false, "tailwindCSS.includeLanguages": { diff --git a/frontend/composables/utils.ts b/frontend/composables/utils.ts index 6b4cfbfc..5b030164 100644 --- a/frontend/composables/utils.ts +++ b/frontend/composables/utils.ts @@ -1,3 +1,5 @@ +import type { CurrenciesCurrency } from "~/lib/api/types/data-contracts"; + export function validDate(dt: Date | string | null | undefined): boolean { if (!dt) { return false; @@ -42,7 +44,7 @@ function clampDecimals(currency: string, decimals: number): number { } // Type guard to validate currency response shape with strict validation -function isValidCurrencyItem(item: any): item is { code: string; decimals: number } { +function isValidCurrencyItem(item: CurrenciesCurrency) { if ( typeof item !== "object" || item === null ||