From b974de37e8f12baba55f92b1c8167af88faaa811 Mon Sep 17 00:00:00 2001 From: Decobus Date: Sat, 26 Jul 2025 00:26:41 -0400 Subject: [PATCH] Fix ESLint warnings and errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove unused imports in test files - Fix unused variable warnings - Fix React unescaped entity warning in settings page - Remove unused error parameters in catch blocks 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- app/api/__tests__/streams.test.ts | 2 +- app/api/__tests__/teams.test.ts | 4 ++-- app/settings/page.tsx | 4 ++-- lib/obsClient.js | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/api/__tests__/streams.test.ts b/app/api/__tests__/streams.test.ts index 41f6389..1e1eea1 100644 --- a/app/api/__tests__/streams.test.ts +++ b/app/api/__tests__/streams.test.ts @@ -1,4 +1,4 @@ -import { GET } from '../streams/route'; +// import { GET } from '../streams/route'; // Mock the database module jest.mock('@/lib/database', () => ({ diff --git a/app/api/__tests__/teams.test.ts b/app/api/__tests__/teams.test.ts index bd09053..d7e431b 100644 --- a/app/api/__tests__/teams.test.ts +++ b/app/api/__tests__/teams.test.ts @@ -1,4 +1,4 @@ -import { GET } from '../teams/route'; +// import { GET } from '../teams/route'; // Mock the database module jest.mock('@/lib/database', () => ({ @@ -13,7 +13,7 @@ jest.mock('@/lib/apiHelpers', () => ({ status, json: async () => ({ success: true, data }), })), - createDatabaseError: jest.fn((operation, error) => ({ + createDatabaseError: jest.fn((operation) => ({ error: 'Database Error', status: 500, json: async () => ({ diff --git a/app/settings/page.tsx b/app/settings/page.tsx index 07f070b..13d2692 100644 --- a/app/settings/page.tsx +++ b/app/settings/page.tsx @@ -4,7 +4,7 @@ import { useState } from 'react'; import { useApiKey } from '@/contexts/ApiKeyContext'; export default function SettingsPage() { - const { apiKey, setApiKey, clearApiKey, isAuthenticated } = useApiKey(); + const { setApiKey, clearApiKey, isAuthenticated } = useApiKey(); const [inputValue, setInputValue] = useState(''); const [error, setError] = useState(''); const [success, setSuccess] = useState(''); @@ -62,7 +62,7 @@ export default function SettingsPage() {

API Key Authentication

API keys are required when accessing this application from external networks. - The key is stored securely in your browser's local storage. + The key is stored securely in your browser's local storage.

diff --git a/lib/obsClient.js b/lib/obsClient.js index 1aa6709..9910fb5 100644 --- a/lib/obsClient.js +++ b/lib/obsClient.js @@ -380,7 +380,7 @@ async function createStreamGroup(groupName, streamName, teamName, url, lockSourc try { await obsClient.call('CreateScene', { sceneName: streamGroupName }); console.log(`Created nested scene "${streamGroupName}" for stream grouping`); - } catch (error) { + } catch { console.log(`Nested scene "${streamGroupName}" might already exist`); } @@ -535,7 +535,7 @@ async function createStreamGroup(groupName, streamName, teamName, url, lockSourc console.error(`Failed to lock color source:`, lockError.message); } } - } catch (error) { + } catch { console.log('Color source background might already be in nested scene'); } @@ -559,7 +559,7 @@ async function createStreamGroup(groupName, streamName, teamName, url, lockSourc console.error(`Failed to lock text source:`, lockError.message); } } - } catch (error) { + } catch { console.log('Text source might already be in nested scene'); }