From 859e19a1ed3d98cd978b17c67b12e715bd22781f Mon Sep 17 00:00:00 2001 From: Decobus Date: Sun, 20 Jul 2025 15:52:18 -0400 Subject: [PATCH] Fix ESLint errors and warnings in main codebase MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix TypeScript error: Replace 'any' type with specific union type in teams API - Remove unused variable assignment in obsClient.js - Remove unused error binding in apiHelpers.ts catch block - Disable exhaustive-deps rule for custom hook with dynamic dependencies All blocking linter errors resolved. Remaining warnings are in test files only. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app/api/teams/[teamId]/route.ts | 2 +- lib/apiHelpers.ts | 2 +- lib/obsClient.js | 2 +- lib/performance.ts | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/api/teams/[teamId]/route.ts b/app/api/teams/[teamId]/route.ts index f7d5086..74582f4 100644 --- a/app/api/teams/[teamId]/route.ts +++ b/app/api/teams/[teamId]/route.ts @@ -21,7 +21,7 @@ export async function PUT( // Build dynamic query based on what fields are being updated const updates: string[] = []; - const values: any[] = []; + const values: (string | number | null)[] = []; if (team_name) { updates.push('team_name = ?'); diff --git a/lib/apiHelpers.ts b/lib/apiHelpers.ts index d6c5687..7373f17 100644 --- a/lib/apiHelpers.ts +++ b/lib/apiHelpers.ts @@ -140,7 +140,7 @@ export async function parseRequestBody( } return { success: true, data: body as T }; - } catch (_error) { + } catch { return { success: false, response: createErrorResponse( diff --git a/lib/obsClient.js b/lib/obsClient.js index f32b955..4d323b3 100644 --- a/lib/obsClient.js +++ b/lib/obsClient.js @@ -130,7 +130,7 @@ async function createGroupIfNotExists(groupName) { if (!existingScene) { console.log(`Creating group "${groupName}"`); - const createResult = await obsClient.call('CreateScene', { sceneName: groupName }); + await obsClient.call('CreateScene', { sceneName: groupName }); // Get the scene UUID after creation const { scenes: updatedScenes } = await obsClient.call('GetSceneList'); diff --git a/lib/performance.ts b/lib/performance.ts index c523293..fa8a079 100644 --- a/lib/performance.ts +++ b/lib/performance.ts @@ -193,5 +193,6 @@ export function useSmartPolling( intervalRef.current = null; } }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [interval, isVisible, ...dependencies]); } \ No newline at end of file