mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 21:33:02 +01:00
Fix frontend CI (#1028)
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -22,6 +22,7 @@
|
|||||||
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
|
||||||
},
|
},
|
||||||
"eslint.format.enable": true,
|
"eslint.format.enable": true,
|
||||||
|
"eslint.validate": ["javascript", "typescript", "vue"],
|
||||||
"eslint.useFlatConfig": true,
|
"eslint.useFlatConfig": true,
|
||||||
"css.validate": false,
|
"css.validate": false,
|
||||||
"tailwindCSS.includeLanguages": {
|
"tailwindCSS.includeLanguages": {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import type { CurrenciesCurrency } from "~/lib/api/types/data-contracts";
|
||||||
|
|
||||||
export function validDate(dt: Date | string | null | undefined): boolean {
|
export function validDate(dt: Date | string | null | undefined): boolean {
|
||||||
if (!dt) {
|
if (!dt) {
|
||||||
return false;
|
return false;
|
||||||
@@ -42,7 +44,7 @@ function clampDecimals(currency: string, decimals: number): number {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Type guard to validate currency response shape with strict validation
|
// 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 (
|
if (
|
||||||
typeof item !== "object" ||
|
typeof item !== "object" ||
|
||||||
item === null ||
|
item === null ||
|
||||||
|
|||||||
Reference in New Issue
Block a user