From 1559037029cb17e92cf47303d9cdc367eb642638 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Fri, 27 Feb 2026 21:09:07 +0100 Subject: [PATCH] fix(ci): resolve eslint type errors in qa smoke test scripts --- scripts/check-apis.ts | 11 +++++++---- scripts/check-http.ts | 6 ++++-- scripts/check-locale.ts | 6 ++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/scripts/check-apis.ts b/scripts/check-apis.ts index 1583e4f..337024d 100644 --- a/scripts/check-apis.ts +++ b/scripts/check-apis.ts @@ -37,7 +37,8 @@ async function checkUmami() { console.log(` ✅ Umami Analytics is reachable (HTTP ${response.status})`); return true; - } catch (err: any) { + } catch (error) { + const err = error as Error; // If /api/health fails completely, maybe try a DNS check as a fallback try { console.warn( @@ -49,7 +50,8 @@ async function checkUmami() { ` ✅ Umami Analytics DNS resolved successfully (${umamiHost})`, ); return true; - } catch (dnsErr: any) { + } catch (error) { + const dnsErr = error as Error; console.error( ` ❌ CRITICAL: Umami Analytics is completely unreachable! ${err.message} | DNS: ${dnsErr.message}`, ); @@ -85,7 +87,7 @@ async function checkSentry() { validateStatus: () => true, }); console.log(` ✅ Glitchtip/Sentry API root responds to HTTP.`); - } catch (ignore) { + } catch { console.log( ` ⚠️ Glitchtip/Sentry HTTP ping failed or timed out, but DNS is valid. Proceeding.`, ); @@ -94,7 +96,8 @@ async function checkSentry() { return true; } throw new Error("No IP addresses found for DSN host"); - } catch (err: any) { + } catch (error) { + const err = error as Error; console.error( ` ❌ CRITICAL: Glitchtip/Sentry DSN is invalid or hostname is unresolvable! ${err.message}`, ); diff --git a/scripts/check-http.ts b/scripts/check-http.ts index 17334cc..8a21206 100644 --- a/scripts/check-http.ts +++ b/scripts/check-http.ts @@ -57,7 +57,8 @@ async function main() { } else { console.log(`✅ OK ${res.status} -> ${u}`); } - } catch (err: any) { + } catch (error) { + const err = error as Error; console.error(`❌ NETWORK ERROR: ${err.message} -> ${u}`); hasErrors = true; } @@ -74,7 +75,8 @@ async function main() { ); process.exit(0); } - } catch (error: any) { + } catch (e) { + const error = e as Error; console.error(`\n❌ Critical Error during Sitemap Fetch:`, error.message); process.exit(1); } diff --git a/scripts/check-locale.ts b/scripts/check-locale.ts index a48ba68..548751e 100644 --- a/scripts/check-locale.ts +++ b/scripts/check-locale.ts @@ -146,7 +146,8 @@ async function main() { ); pageOk = false; } - } catch (err: any) { + } catch (error) { + const err = error as Error; console.error( `❌ NETWORK ERROR: ${path} → ${alt.href}: ${err.message}`, ); @@ -166,7 +167,8 @@ async function main() { } else { totalFailed++; } - } catch (err: any) { + } catch (error) { + const err = error as Error; console.error(`❌ NETWORK ERROR fetching ${url}: ${err.message}`); totalFailed++; }