Fix frontend CI (#1028)

This commit is contained in:
Alan Mooiman
2025-09-29 08:18:43 -04:00
committed by GitHub
parent 1f746efe27
commit 38a987676e
2 changed files with 4 additions and 1 deletions

View File

@@ -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": {

View File

@@ -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 ||