chore: Fix all lint errors and remove unused code

- Fix 75 ESLint errors by updating eslint.config.mjs:
  - Add missing browser globals (MouseEvent, AbortController, Response, etc.)
  - Add Vite define global (__APP_VERSION__)
  - Configure @ts-nocheck to require descriptions
  - Add no-unused-vars rule for .mjs scripts

- Fix runtime bug in agent-output-modal.tsx (setOutput -> setStreamedContent)

- Remove ~120 unused variable warnings across 97 files:
  - Remove unused imports (React hooks, lucide icons, types)
  - Remove unused constants and variables
  - Remove unused function definitions
  - Prefix intentionally unused parameters with underscore

- Add descriptions to all @ts-nocheck comments (25 files)

- Clean up misc issues:
  - Remove invalid deprecation plugin comments
  - Fix eslint-disable comment placement
  - Add missing RefreshCw import in code-view.tsx

Reduces lint warnings from ~300 to 67 (all remaining are no-explicit-any)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-25 17:33:45 +01:00
parent 3b56d553c9
commit 006152554b
97 changed files with 129 additions and 339 deletions

View File

@@ -1037,7 +1037,8 @@ if (typeof window !== 'undefined') {
}
// Mock API for development/fallback when no backend is available
const getMockElectronAPI = (): ElectronAPI => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const _getMockElectronAPI = (): ElectronAPI => {
return {
ping: async () => 'pong (mock)',
@@ -1456,7 +1457,7 @@ function createMockSetupAPI(): SetupAPI {
};
},
storeApiKey: async (provider: string, apiKey: string) => {
storeApiKey: async (provider: string, _apiKey: string) => {
console.log('[Mock] Storing API key for:', provider);
// In mock mode, we just pretend to store it (it's already in the app store)
return { success: true };
@@ -1511,12 +1512,12 @@ function createMockSetupAPI(): SetupAPI {
};
},
onInstallProgress: (callback) => {
onInstallProgress: (_callback) => {
// Mock progress events
return () => {};
},
onAuthProgress: (callback) => {
onAuthProgress: (_callback) => {
// Mock auth events
return () => {};
},
@@ -1955,7 +1956,7 @@ function createMockWorktreeAPI(): WorktreeAPI {
};
},
onDevServerLogEvent: (callback) => {
onDevServerLogEvent: (_callback) => {
console.log('[Mock] Subscribing to dev server log events');
// Return unsubscribe function
return () => {
@@ -2007,7 +2008,7 @@ function createMockWorktreeAPI(): WorktreeAPI {
};
},
onInitScriptEvent: (callback) => {
onInitScriptEvent: (_callback) => {
console.log('[Mock] Subscribing to init script events');
// Return unsubscribe function
return () => {
@@ -2067,7 +2068,7 @@ function createMockWorktreeAPI(): WorktreeAPI {
};
},
onTestRunnerEvent: (callback) => {
onTestRunnerEvent: (_callback) => {
console.log('[Mock] Subscribing to test runner events');
// Return unsubscribe function
return () => {
@@ -2212,7 +2213,7 @@ function createMockAutoModeAPI(): AutoModeAPI {
return { success: true, passes: true };
},
resumeFeature: async (projectPath: string, featureId: string, useWorktrees?: boolean) => {
resumeFeature: async (projectPath: string, featureId: string, _useWorktrees?: boolean) => {
if (mockRunningFeatures.has(featureId)) {
return {
success: false,
@@ -2348,7 +2349,7 @@ function createMockAutoModeAPI(): AutoModeAPI {
featureId: string,
prompt: string,
imagePaths?: string[],
useWorktrees?: boolean
_useWorktrees?: boolean
) => {
if (mockRunningFeatures.has(featureId)) {
return {
@@ -2703,7 +2704,7 @@ function emitSpecRegenerationEvent(event: SpecRegenerationEvent) {
async function simulateSpecCreation(
projectPath: string,
projectOverview: string,
generateFeatures = true
_generateFeatures = true
) {
mockSpecRegenerationPhase = 'initialization';
emitSpecRegenerationEvent({