From 083aa3010f5a1eea15e675c5d92181083c42e3c2 Mon Sep 17 00:00:00 2001 From: Rafael Mestre <277805+rlmestre@users.noreply.github.com> Date: Thu, 31 Jul 2025 18:28:40 -0400 Subject: [PATCH] chore: update API type, add consistent type imports rule --- .oxlintrc.json | 5 ++++- src/bom/validation.mts | 2 +- src/types/eol-scan.mts | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 33a6cd1..391cc0c 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -1,3 +1,6 @@ { - "plugins": ["typescript", "unicorn", "oxc", "node", "promise"] + "plugins": ["typescript", "unicorn", "oxc", "node", "promise"], + "rules": { + "typescript/consistent-type-imports": "error" + } } diff --git a/src/bom/validation.mts b/src/bom/validation.mts index 840f864..9680914 100644 --- a/src/bom/validation.mts +++ b/src/bom/validation.mts @@ -5,7 +5,7 @@ function parseBomOrString(bomOrString: string | object): SupportedBom | null { if (typeof bomOrString === 'string') { try { return JSON.parse(bomOrString); - } catch (e) { + } catch { return null; } } diff --git a/src/types/eol-scan.mts b/src/types/eol-scan.mts index 04a6b19..39e24bc 100644 --- a/src/types/eol-scan.mts +++ b/src/types/eol-scan.mts @@ -14,8 +14,10 @@ export interface EolScanComponentMetadata { } export interface NesRemediation { - purls: { nes: string; oss: string }; - urls: { main: string }; + remediations: { + purls: { nes: string; oss: string }; + urls: { main: string }; + }[]; } export interface EolScanComponent {