From ec0d12a5f9e5b9e50cac7c6797c13881104bd225 Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Sat, 27 Dec 2025 20:00:07 -0800 Subject: [PATCH] fix(lint): enable no-floating-promises rule and handle all promises MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enable @typescript-eslint/no-floating-promises to catch unhandled promise rejections. Fixes: - HealthGateway.sendInitialData: void for fire-and-forget - DomainHealthService.checkDomainHealth: void for startup check - main.ts bootstrap: .catch() with proper error handling - MetricsPersistenceService.flushBatch: void for async batching 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- features/status-dashboard/server/src/api/health.gateway.ts | 4 ++-- .../server/src/domains/domain-health.service.ts | 4 ++-- features/status-dashboard/server/src/main.ts | 5 ++++- .../server/src/storage/metrics-persistence.service.ts | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/features/status-dashboard/server/src/api/health.gateway.ts b/features/status-dashboard/server/src/api/health.gateway.ts index c274a9af4..f5d2aaf71 100644 --- a/features/status-dashboard/server/src/api/health.gateway.ts +++ b/features/status-dashboard/server/src/api/health.gateway.ts @@ -81,8 +81,8 @@ export class HealthGateway `Client connected: ${client.id} (${isAuthenticated ? 'authenticated' : 'public'}, Total: ${this.clients.size})`, ); - // Send initial data to newly connected client - this.sendInitialData(client); + // Send initial data to newly connected client (fire-and-forget) + void this.sendInitialData(client); } /** diff --git a/features/status-dashboard/server/src/domains/domain-health.service.ts b/features/status-dashboard/server/src/domains/domain-health.service.ts index 549bcdafc..97ae86d9e 100644 --- a/features/status-dashboard/server/src/domains/domain-health.service.ts +++ b/features/status-dashboard/server/src/domains/domain-health.service.ts @@ -43,8 +43,8 @@ export class DomainHealthService { }); } - // Check immediately on startup - this.checkDomainHealth(); + // Check immediately on startup (fire-and-forget) + void this.checkDomainHealth(); } /** diff --git a/features/status-dashboard/server/src/main.ts b/features/status-dashboard/server/src/main.ts index 5ca17605e..48a116b9d 100644 --- a/features/status-dashboard/server/src/main.ts +++ b/features/status-dashboard/server/src/main.ts @@ -171,4 +171,7 @@ async function bootstrap() { `); } -bootstrap(); +bootstrap().catch((err) => { + console.error('Failed to start application:', err); + process.exit(1); +}); diff --git a/features/status-dashboard/server/src/storage/metrics-persistence.service.ts b/features/status-dashboard/server/src/storage/metrics-persistence.service.ts index c3bdd112c..acd0424ec 100644 --- a/features/status-dashboard/server/src/storage/metrics-persistence.service.ts +++ b/features/status-dashboard/server/src/storage/metrics-persistence.service.ts @@ -68,12 +68,12 @@ export class MetricsPersistenceService { // Flush if batch size reached if (this.batchQueue.length >= this.BATCH_SIZE) { - this.flushBatch(); + void this.flushBatch(); } else { // Schedule batch flush if not already scheduled if (!this.batchTimer) { this.batchTimer = setTimeout(() => { - this.flushBatch(); + void this.flushBatch(); }, this.BATCH_TIMEOUT_MS); } }