From 7bb7765c84e9f02bf72b77f36b4326e0dc608dbc Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 18 Nov 2025 22:26:53 +0000 Subject: [PATCH] Lint --- frontend/local-client-cli/src/cli.ts | 4 +++- frontend/local-client-cli/src/healthcheck.ts | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/local-client-cli/src/cli.ts b/frontend/local-client-cli/src/cli.ts index 2655bd38..2a4cef98 100644 --- a/frontend/local-client-cli/src/cli.ts +++ b/frontend/local-client-cli/src/cli.ts @@ -143,7 +143,9 @@ async function main(): Promise { writeHealthStatus(healthFile, status); }); }, 30 * 1000); // every 30 seconds - const clearHealthInterval = () => clearInterval(healthInterval); + const clearHealthInterval = (): void => { + clearInterval(healthInterval); + }; process.on("SIGINT", clearHealthInterval); process.on("SIGTERM", clearHealthInterval); process.on("exit", clearHealthInterval); diff --git a/frontend/local-client-cli/src/healthcheck.ts b/frontend/local-client-cli/src/healthcheck.ts index 75c1906f..256cd2d8 100644 --- a/frontend/local-client-cli/src/healthcheck.ts +++ b/frontend/local-client-cli/src/healthcheck.ts @@ -13,11 +13,13 @@ function isHealthStatus(value: unknown): value is NetworkConnectionStatus { return false; } - const obj = value as Record; return ( - typeof obj.isSuccessful === "boolean" && - typeof obj.isWebSocketConnected === "boolean" && - typeof obj.serverMessage === "string" + "isSuccessful" in value && + typeof value.isSuccessful === "boolean" && + "isWebSocketConnected" in value && + typeof value.isWebSocketConnected === "boolean" && + "serverMessage" in value && + typeof value.serverMessage === "string" ); }