From c455f7ffa24ec7d1e6e2bdc4de5fe8b42a30b584 Mon Sep 17 00:00:00 2001 From: asyouplz <136051230+asyouplz@users.noreply.github.com> Date: Fri, 26 Dec 2025 11:21:47 +0900 Subject: [PATCH] fix: address reviewbot lint issues (#39) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: address reviewbot lint issues Resolve lint findings to satisfy ObsidianReviewBot checks. ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 * fix: address reviewbot typecheck feedback Restore required typing, narrow DOM queries, and move deepgram SDK to devDependencies. ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --------- Co-authored-by: Claude Sonnet 4.5 --- .gitignore | 2 ++ package.json | 5 ++-- src/application/EventManager.ts | 20 ++++++------- src/application/TextInsertionHandler.ts | 6 ++-- src/architecture/DependencyContainer.ts | 2 +- src/architecture/ErrorBoundary.ts | 6 ++-- src/infrastructure/api/BatchRequestManager.ts | 12 ++++---- src/infrastructure/api/FileUploadManager.ts | 2 +- src/infrastructure/api/SettingsAPI.ts | 12 ++++---- src/infrastructure/api/SettingsMigrator.ts | 6 ++-- src/infrastructure/api/TranscriberFactory.ts | 4 +-- .../api/TranscriberFactoryRefactored.ts | 4 +-- src/infrastructure/api/WhisperService.ts | 3 +- .../api/providers/common/RateLimiter.ts | 4 +-- .../api/providers/deepgram/DeepgramAdapter.ts | 4 +-- .../api/providers/deepgram/DeepgramService.ts | 8 ++++-- .../deepgram/DiarizationFormatter.ts | 3 +- .../deepgram/ModelMigrationService.ts | 10 ++++--- .../api/providers/deepgram/errorHandler.ts | 3 +- .../providers/deepgram/reliabilityUtils.ts | 4 +-- src/main-fixed.ts | 2 +- src/main-refactored.ts | 12 ++++---- src/main.ts | 8 ++++-- src/patterns/Observer.ts | 8 +++--- src/types/resources.ts | 4 +-- src/ui/managers/StatusBarManager.ts | 4 +-- src/ui/modals/FilePickerModal.ts | 8 +++--- src/ui/modals/FilePickerModalRefactored.ts | 6 ++-- src/ui/notifications/NotificationManager.ts | 8 +++--- src/ui/settings/EnhancedSettingsTab.ts | 28 +++++++++---------- src/ui/settings/SettingsTab.ts | 2 +- src/ui/settings/SettingsTabOptimized.ts | 18 ++++++++---- src/ui/settings/SettingsTabRefactored.ts | 4 +-- .../AccessibilityEnhancements.ts | 2 +- .../settings/components/ShortcutSettings.ts | 6 ++-- src/ui/settings/error/ErrorHandling.ts | 2 +- .../provider/ProviderSettingsContainer.ts | 2 +- .../ProviderSettingsContainerRefactored.ts | 4 +-- .../provider/components/APIKeyManager.ts | 8 +++--- .../components/APIKeyManagerRefactored.ts | 16 +++++++---- src/ui/settings/types/SettingsTypes.ts | 4 +-- src/utils/async/AsyncManager.ts | 6 ++-- src/utils/async/AsyncTaskCoordinator.ts | 4 +-- src/utils/error/ErrorManager.ts | 8 +++--- src/utils/memory/MemoryManager.ts | 2 +- src/utils/memory/MemoryProfiler.ts | 6 ++-- 46 files changed, 165 insertions(+), 137 deletions(-) diff --git a/.gitignore b/.gitignore index 4557045..97ae75d 100644 --- a/.gitignore +++ b/.gitignore @@ -146,3 +146,5 @@ docs/ # Requirement documents requirment*.md +# Local review notes +REVIEW_NOTES_PR8004.md diff --git a/package.json b/package.json index 88d534c..7135138 100644 --- a/package.json +++ b/package.json @@ -44,11 +44,10 @@ ], "author": "Taesun Lee", "license": "MIT", - "dependencies": { - "@deepgram/sdk": "^3.9.0" - }, + "dependencies": {}, "devDependencies": { "@testing-library/jest-dom": "^6.9.1", + "@deepgram/sdk": "^3.9.0", "@types/jest": "^29.5.12", "@types/node": "^16.18.126", "@typescript-eslint/eslint-plugin": "^5.29.0", diff --git a/src/application/EventManager.ts b/src/application/EventManager.ts index 5461da5..cb855c9 100644 --- a/src/application/EventManager.ts +++ b/src/application/EventManager.ts @@ -104,10 +104,10 @@ export class EventManager extends EventEmitter { emit(event: string, data?: unknown): void; emit(event: string, data?: unknown): void { // ํ†ต๊ณ„ ์—…๋ฐ์ดํŠธ - this.updateStats(event as keyof AppEventMap); + this.updateStats(event); // ํžˆ์Šคํ† ๋ฆฌ ๊ธฐ๋ก - this.recordHistory(event as keyof AppEventMap, data as AppEventMap[keyof AppEventMap]); + this.recordHistory(event, data as AppEventMap[keyof AppEventMap]); // ๋””๋ฒ„๊ทธ ๋กœ๊น… if (this.isDebugMode && this.logger) { @@ -115,7 +115,7 @@ export class EventManager extends EventEmitter { } // ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ emit ํ˜ธ์ถœ - super.emit(event as keyof AppEventMap, data as AppEventMap[keyof AppEventMap]); + super.emit(event, data as AppEventMap[keyof AppEventMap]); } /** @@ -125,10 +125,10 @@ export class EventManager extends EventEmitter { async emitAsync(event: string, data?: unknown): Promise; async emitAsync(event: string, data?: unknown): Promise { // ํ†ต๊ณ„ ์—…๋ฐ์ดํŠธ - this.updateStats(event as keyof AppEventMap); + this.updateStats(event); // ํžˆ์Šคํ† ๋ฆฌ ๊ธฐ๋ก - this.recordHistory(event as keyof AppEventMap, data as AppEventMap[keyof AppEventMap]); + this.recordHistory(event, data as AppEventMap[keyof AppEventMap]); // ๋””๋ฒ„๊ทธ ๋กœ๊น… if (this.isDebugMode && this.logger) { @@ -136,7 +136,7 @@ export class EventManager extends EventEmitter { } // ๋ถ€๋ชจ ํด๋ž˜์Šค์˜ emitAsync ํ˜ธ์ถœ - await super.emitAsync(event as keyof AppEventMap, data as AppEventMap[keyof AppEventMap]); + await super.emitAsync(event, data as AppEventMap[keyof AppEventMap]); } /** @@ -203,7 +203,7 @@ export class EventManager extends EventEmitter { ): Unsubscribe { return this.on(event, (data) => { if (predicate(data)) { - listener(data); + void listener(data); } }); } @@ -224,7 +224,7 @@ export class EventManager extends EventEmitter { } timeoutId = setTimeout(() => { - listener(data); + void listener(data); timeoutId = null; }, wait); }); @@ -242,7 +242,7 @@ export class EventManager extends EventEmitter { return this.on(event, (data) => { if (!inThrottle) { - listener(data); + void listener(data); inThrottle = true; setTimeout(() => { inThrottle = false; @@ -330,7 +330,7 @@ export class EventManager extends EventEmitter { return { totalEvents: eventNames.length, totalListeners: eventNames.reduce((sum: number, event) => - sum + this.listenerCount(event as keyof AppEventMap), 0 + sum + this.listenerCount(event), 0 ), totalEmitted: Array.from(this.eventStats.values()).reduce((sum, count) => sum + count, 0 diff --git a/src/application/TextInsertionHandler.ts b/src/application/TextInsertionHandler.ts index 532bfa8..167e6e9 100644 --- a/src/application/TextInsertionHandler.ts +++ b/src/application/TextInsertionHandler.ts @@ -367,19 +367,21 @@ export class TextInsertionHandler { case 'prepend': return await this.editorService.prependToDocument(text, true); - case 'line-end': + case 'line-end': { const lineNumber = this.editorService.getCurrentLineNumber(); if (lineNumber !== null) { return await this.editorService.appendToLine(lineNumber, text); } return false; + } - case 'new-line': + case 'new-line': { const cursor = this.editorService.getCursorPosition(); if (cursor) { return await this.editorService.insertAtPosition(`\n${text}`, cursor); } return false; + } default: return await this.editorService.insertAtCursor(text); diff --git a/src/architecture/DependencyContainer.ts b/src/architecture/DependencyContainer.ts index cb1f1ea..78fab2c 100644 --- a/src/architecture/DependencyContainer.ts +++ b/src/architecture/DependencyContainer.ts @@ -99,7 +99,7 @@ export class DependencyContainer { return this.resolveScoped(token, registration); default: - throw new Error(`Unknown lifetime: ${registration.lifetime}`); + throw new Error(`Unknown lifetime: ${String(registration.lifetime)}`); } } diff --git a/src/architecture/ErrorBoundary.ts b/src/architecture/ErrorBoundary.ts index 06c7d19..ec915c4 100644 --- a/src/architecture/ErrorBoundary.ts +++ b/src/architecture/ErrorBoundary.ts @@ -107,7 +107,7 @@ export class ErrorBoundary { // ์ฒ˜๋ฆฌ๋˜์ง€ ์•Š์€ Promise rejection ์ฒ˜๋ฆฌ if (typeof window !== 'undefined') { window.addEventListener('unhandledrejection', (event) => { - this.handleError( + void this.handleError( new Error(event.reason?.message || 'Unhandled Promise rejection'), { component: 'Global', operation: 'Promise' } ); @@ -116,7 +116,7 @@ export class ErrorBoundary { // ์ „์—ญ ์—๋Ÿฌ ์ฒ˜๋ฆฌ window.addEventListener('error', (event) => { - this.handleError( + void this.handleError( event.error || new Error(event.message), { component: 'Global', operation: 'Runtime' } ); @@ -158,7 +158,7 @@ export class ErrorBoundary { try { return fn(); } catch (error) { - this.handleError(error as Error, context); + void this.handleError(error as Error, context); return undefined; } } diff --git a/src/infrastructure/api/BatchRequestManager.ts b/src/infrastructure/api/BatchRequestManager.ts index 408fcac..112095b 100644 --- a/src/infrastructure/api/BatchRequestManager.ts +++ b/src/infrastructure/api/BatchRequestManager.ts @@ -87,7 +87,7 @@ export class BatchRequestManager { } = {} ): Promise { return new Promise((resolve, reject) => { - const request: BatchRequest = { + const request: AnyBatch = { id: this.generateRequestId(), endpoint, method, @@ -95,13 +95,13 @@ export class BatchRequestManager { body: options.body, headers: options.headers, priority: options.priority || 'normal', - resolve, + resolve: (value: unknown) => resolve(value as T), reject, timestamp: Date.now(), retries: 0 }; - this.enqueueRequest(request as AnyBatch); + this.enqueueRequest(request); this.stats.totalRequests++; }); } @@ -117,7 +117,7 @@ export class BatchRequestManager { } const queue = this.queues.get(batchKey)!; - queue.push(request as AnyBatch); + queue.push(request); // ์šฐ์„ ์ˆœ์œ„ ์ •๋ ฌ if (this.priorityQueuing) { @@ -141,7 +141,7 @@ export class BatchRequestManager { if (this.timers.has(batchKey)) return; const timer = window.setTimeout(() => { - this.processBatch(batchKey); + void this.processBatch(batchKey); this.timers.delete(batchKey); }, this.batchDelay); @@ -157,7 +157,7 @@ export class BatchRequestManager { clearTimeout(timer); this.timers.delete(batchKey); } - this.processBatch(batchKey); + void this.processBatch(batchKey); } /** diff --git a/src/infrastructure/api/FileUploadManager.ts b/src/infrastructure/api/FileUploadManager.ts index d0fca8f..630dacd 100644 --- a/src/infrastructure/api/FileUploadManager.ts +++ b/src/infrastructure/api/FileUploadManager.ts @@ -516,7 +516,7 @@ export class FileUploadManager { */ cleanup(): void { if (this.audioContext) { - this.audioContext.close(); + void this.audioContext.close(); this.audioContext = undefined; } this.abortController = undefined; diff --git a/src/infrastructure/api/SettingsAPI.ts b/src/infrastructure/api/SettingsAPI.ts index c9f04c5..e92b9f6 100644 --- a/src/infrastructure/api/SettingsAPI.ts +++ b/src/infrastructure/api/SettingsAPI.ts @@ -302,11 +302,11 @@ export class SettingsAPI implements ISettingsAPI { await this.apiKeyManager.clearApiKey(); } else if (Array.isArray(scope)) { scope.forEach(key => { - const typedKey = key as keyof SettingsSchema; + const typedKey = key; this.settings[typedKey] = this.defaultSettings[typedKey]; }); } else { - const typedKey = scope as keyof SettingsSchema; + const typedKey = scope; this.settings[typedKey] = this.defaultSettings[typedKey]; } @@ -408,8 +408,8 @@ export class SettingsAPI implements ISettingsAPI { readable: ReadableStream; }; const writer = cs.writable.getWriter(); - writer.write(data); - writer.close(); + await writer.write(data); + await writer.close(); const chunks: Uint8Array[] = []; const reader = cs.readable.getReader(); @@ -451,8 +451,8 @@ export class SettingsAPI implements ISettingsAPI { readable: ReadableStream; }; const writer = ds.writable.getWriter(); - writer.write(data); - writer.close(); + await writer.write(data); + await writer.close(); const chunks: Uint8Array[] = []; const reader = ds.readable.getReader(); diff --git a/src/infrastructure/api/SettingsMigrator.ts b/src/infrastructure/api/SettingsMigrator.ts index 7fa2603..475776c 100644 --- a/src/infrastructure/api/SettingsMigrator.ts +++ b/src/infrastructure/api/SettingsMigrator.ts @@ -43,7 +43,7 @@ export class SettingsMigrator { if (path.length === 0) { // ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ๊ฒฝ๋กœ๊ฐ€ ์—†์œผ๋ฉด ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜ - return currentSettings as SettingsSchema; + return currentSettings; } let settings = currentSettings; @@ -62,7 +62,7 @@ export class SettingsMigrator { // ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ settings.version = toVersion; - return settings as SettingsSchema; + return settings; } /** @@ -383,7 +383,7 @@ export class SettingsMigrator { } const backup = JSON.parse(backupData); - return backup.settings as SettingsSchema; + return backup.settings; } /** diff --git a/src/infrastructure/api/TranscriberFactory.ts b/src/infrastructure/api/TranscriberFactory.ts index b8772d4..dd920c8 100644 --- a/src/infrastructure/api/TranscriberFactory.ts +++ b/src/infrastructure/api/TranscriberFactory.ts @@ -253,7 +253,7 @@ export class TranscriberFactory { return { defaultProvider: settings.defaultProvider || 'whisper', autoSelect: settings.autoSelect || false, - selectionStrategy: (settings.selectionStrategy as SelectionStrategy) || SelectionStrategy.MANUAL, + selectionStrategy: settings.selectionStrategy || SelectionStrategy.MANUAL, fallbackEnabled: settings.fallbackEnabled !== false, whisper: { @@ -424,7 +424,7 @@ export class TranscriberFactory { // ๋ชจ๋‹ˆํ„ฐ๋ง ์—”๋“œํฌ์ธํŠธ๋กœ ์ „์†ก (์„ค์ •๋œ ๊ฒฝ์šฐ) if (this.config.monitoring?.enabled && this.config.monitoring.metricsEndpoint) { - this.sendMetricsToEndpoint(provider); + void this.sendMetricsToEndpoint(provider); } } diff --git a/src/infrastructure/api/TranscriberFactoryRefactored.ts b/src/infrastructure/api/TranscriberFactoryRefactored.ts index 8348a4c..edaa68c 100644 --- a/src/infrastructure/api/TranscriberFactoryRefactored.ts +++ b/src/infrastructure/api/TranscriberFactoryRefactored.ts @@ -85,7 +85,7 @@ export class TranscriberFactoryRefactored { this.metricsTracker.recordRequest(provider, success, latency, cost, error); if (this.shouldSendMetrics()) { - this.sendMetricsToEndpoint(provider); + void this.sendMetricsToEndpoint(provider); } } @@ -542,7 +542,7 @@ class PluginSettingsManagerAdapter implements ISettingsManager { enabled: Boolean(deepgramApiKey), apiKey: deepgramApiKey, model: - this.pickString((deepgramConfigRaw as Partial).model) ?? + this.pickString(deepgramConfigRaw?.model) ?? this.pickString(deepgramSettings?.model) ?? this.settings.deepgramModel ?? 'nova-3', diff --git a/src/infrastructure/api/WhisperService.ts b/src/infrastructure/api/WhisperService.ts index 8902fde..6dbc419 100644 --- a/src/infrastructure/api/WhisperService.ts +++ b/src/infrastructure/api/WhisperService.ts @@ -424,9 +424,10 @@ export class WhisperService implements IWhisperService { ); case 401: throw new AuthenticationError(); - case 429: + case 429: { const retryAfter = response.headers?.['retry-after']; throw new RateLimitError(retryAfter ? parseInt(retryAfter) : undefined); + } case 413: throw new FileTooLargeError(); case 500: diff --git a/src/infrastructure/api/providers/common/RateLimiter.ts b/src/infrastructure/api/providers/common/RateLimiter.ts index 44e5553..0f51b91 100644 --- a/src/infrastructure/api/providers/common/RateLimiter.ts +++ b/src/infrastructure/api/providers/common/RateLimiter.ts @@ -70,7 +70,7 @@ export class RateLimiter { } this.queue.push(resolve); - this.processQueue(); + void this.processQueue(); }); } @@ -165,4 +165,4 @@ export class RateLimiter { private sleep(ms: number): Promise { return new Promise(resolve => setTimeout(resolve, ms)); } -} \ No newline at end of file +} diff --git a/src/infrastructure/api/providers/deepgram/DeepgramAdapter.ts b/src/infrastructure/api/providers/deepgram/DeepgramAdapter.ts index 14e620d..3843534 100644 --- a/src/infrastructure/api/providers/deepgram/DeepgramAdapter.ts +++ b/src/infrastructure/api/providers/deepgram/DeepgramAdapter.ts @@ -380,8 +380,8 @@ export class DeepgramAdapter implements ITranscriber { const transcriptionSettings = this.settingsManager?.get( 'transcription' ) as SettingsStoreTranscriptionSettings | undefined; - const deepgramSettings = transcriptionSettings?.deepgram as DeepgramSettings | undefined; - const deepgramFeatures = deepgramSettings?.features as DeepgramFeatures | undefined; + const deepgramSettings = transcriptionSettings?.deepgram; + const deepgramFeatures = deepgramSettings?.features; if (deepgramFeatures) { this.logger.debug( diff --git a/src/infrastructure/api/providers/deepgram/DeepgramService.ts b/src/infrastructure/api/providers/deepgram/DeepgramService.ts index c7586a0..47423d0 100644 --- a/src/infrastructure/api/providers/deepgram/DeepgramService.ts +++ b/src/infrastructure/api/providers/deepgram/DeepgramService.ts @@ -233,7 +233,7 @@ class RateLimiter { async acquire(): Promise { return new Promise(resolve => { this.queue.push(resolve); - this.processQueue(); + void this.processQueue(); }); } @@ -785,17 +785,18 @@ export class DeepgramService { false, 402 ); - case 429: + case 429: { const retryAfter = response.headers?.['retry-after']; throw new ProviderRateLimitError( 'deepgram', retryAfter ? parseInt(retryAfter) : undefined ); + } case 500: case 502: case 503: throw new ProviderUnavailableError('deepgram'); - case 504: + case 504: { // Extract file size info if available const sizeInfo = this.lastAudioSize ? ` (${Math.round(this.lastAudioSize / (1024 * 1024))}MB)` : ''; throw new TranscriptionError( @@ -805,6 +806,7 @@ export class DeepgramService { true, // retryable 504 ); + } default: throw new TranscriptionError( `API error: ${errorMessage}`, diff --git a/src/infrastructure/api/providers/deepgram/DiarizationFormatter.ts b/src/infrastructure/api/providers/deepgram/DiarizationFormatter.ts index 4c65a72..049b162 100644 --- a/src/infrastructure/api/providers/deepgram/DiarizationFormatter.ts +++ b/src/infrastructure/api/providers/deepgram/DiarizationFormatter.ts @@ -375,9 +375,10 @@ export class DiarizationFormatter { } switch (numbering) { - case 'alphabetic': + case 'alphabetic': { const letter = String.fromCharCode(65 + (speakerNumber % 26)); // A, B, C... return `${prefix} ${letter}`; + } case 'numeric': default: diff --git a/src/infrastructure/api/providers/deepgram/ModelMigrationService.ts b/src/infrastructure/api/providers/deepgram/ModelMigrationService.ts index f5a3a41..46a453e 100644 --- a/src/infrastructure/api/providers/deepgram/ModelMigrationService.ts +++ b/src/infrastructure/api/providers/deepgram/ModelMigrationService.ts @@ -451,15 +451,17 @@ export class ModelMigrationService { // ์‹ค์ œ ๊ตฌํ˜„์—์„œ๋Š” UI๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉ์ž ๋™์˜๋ฅผ ๋ฐ›์•„์•ผ ํ•จ return false; // ๊ธฐ๋ณธ์ ์œผ๋กœ ์‚ฌ์šฉ์ž ๋™์˜ ํ•„์š” - case 'cost_threshold': + case 'cost_threshold': { const _maxIncrease = condition.parameters.maxIncrease || 20; // ๋น„์šฉ ์ฆ๊ฐ€์œจ ๊ณ„์‚ฐ ๋กœ์ง return true; // ์ž„์‹œ ๊ตฌํ˜„ + } - case 'feature_compatible': + case 'feature_compatible': { const _requiredFeatures = condition.parameters.requiredFeatures || []; // ๊ธฐ๋Šฅ ํ˜ธํ™˜์„ฑ ์ฒดํฌ return true; // ์ž„์‹œ ๊ตฌํ˜„ + } default: return true; @@ -562,7 +564,7 @@ export class ModelMigrationService { break; default: - throw new Error(`Unknown migration action: ${step.action}`); + throw new Error(`Unknown migration action: ${String(step.action)}`); } } @@ -619,7 +621,7 @@ export class ModelMigrationService { } const backupId = `migration_backup_${Date.now()}`; - this.settingsManager.set(`backup.${backupId}`, backup); + await this.settingsManager.set(`backup.${backupId}`, backup); this.logger.debug('Settings backup created', { backupId, settingsCount: settingsToBackup.length }); } diff --git a/src/infrastructure/api/providers/deepgram/errorHandler.ts b/src/infrastructure/api/providers/deepgram/errorHandler.ts index cf8a6ce..b7498a6 100644 --- a/src/infrastructure/api/providers/deepgram/errorHandler.ts +++ b/src/infrastructure/api/providers/deepgram/errorHandler.ts @@ -142,12 +142,13 @@ export class DeepgramErrorHandler { false, 402 ); - case 429: + case 429: { const retryAfter = response.headers?.['retry-after']; throw new ProviderRateLimitError( 'deepgram', retryAfter ? parseInt(retryAfter) : undefined ); + } case 500: case 502: case 503: diff --git a/src/infrastructure/api/providers/deepgram/reliabilityUtils.ts b/src/infrastructure/api/providers/deepgram/reliabilityUtils.ts index 797d2c3..fe63e23 100644 --- a/src/infrastructure/api/providers/deepgram/reliabilityUtils.ts +++ b/src/infrastructure/api/providers/deepgram/reliabilityUtils.ts @@ -30,7 +30,7 @@ export class RateLimiter { async acquire(): Promise { return new Promise(resolve => { this.queue.push(resolve); - this.processQueue(); + void this.processQueue(); }); } @@ -296,4 +296,4 @@ export class ReliabilityManager { circuitBreakerState: this.circuitBreaker.getState() }; } -} \ No newline at end of file +} diff --git a/src/main-fixed.ts b/src/main-fixed.ts index eebb1ff..1cd2812 100644 --- a/src/main-fixed.ts +++ b/src/main-fixed.ts @@ -135,7 +135,7 @@ export default class SpeechToTextPlugin extends Plugin { id: 'transcribe-audio', name: 'Transcribe audio file', callback: () => { - this.showAudioFilePicker(); + void this.showAudioFilePicker(); } }); diff --git a/src/main-refactored.ts b/src/main-refactored.ts index fe934cc..27fe6f5 100644 --- a/src/main-refactored.ts +++ b/src/main-refactored.ts @@ -287,7 +287,7 @@ export default class SpeechToTextPlugin extends Plugin { id: 'transcribe-audio', name: 'Transcribe audio file', callback: () => { - this.errorBoundary.wrap( + void this.errorBoundary.wrap( () => this.showAudioFilePicker(), { component: 'Command', operation: 'transcribe-audio' } ); @@ -313,7 +313,7 @@ export default class SpeechToTextPlugin extends Plugin { id: 'show-format-options', name: 'Show text formatting options', callback: () => { - this.errorBoundary.wrap( + void this.errorBoundary.wrap( () => this.showFormatOptions(), { component: 'Command', operation: 'show-format-options' } ); @@ -413,7 +413,7 @@ export default class SpeechToTextPlugin extends Plugin { await this.insertTranscription(result.text); } } catch (error) { - this.errorBoundary.handleError( + void this.errorBoundary.handleError( error as Error, { component: 'TranscriptionService', operation: 'transcribe' } ); @@ -472,15 +472,17 @@ export default class SpeechToTextPlugin extends Plugin { case 'cursor': editor.replaceSelection(text); break; - case 'end': + case 'end': { const lastLine = editor.lastLine(); const currentText = editor.getLine(lastLine); editor.setLine(lastLine, currentText + '\n\n' + text); break; - case 'beginning': + } + case 'beginning': { const firstLineText = editor.getLine(0); editor.setLine(0, text + '\n\n' + firstLineText); break; + } } } diff --git a/src/main.ts b/src/main.ts index c1d4e89..deb95f8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -278,7 +278,7 @@ export default class SpeechToTextPlugin extends Plugin { id: 'transcribe-audio-file', name: 'Transcribe audio file', callback: () => { - this.showAudioFilePicker(); + void this.showAudioFilePicker(); } }); @@ -635,15 +635,17 @@ export default class SpeechToTextPlugin extends Plugin { case 'cursor': editor.replaceSelection(text); break; - case 'end': + case 'end': { const lastLine = editor.lastLine(); const lastLineText = editor.getLine(lastLine); editor.setLine(lastLine, lastLineText + '\n\n' + text); break; - case 'beginning': + } + case 'beginning': { const firstLineText = editor.getLine(0); editor.setLine(0, text + '\n\n' + firstLineText); break; + } } } diff --git a/src/patterns/Observer.ts b/src/patterns/Observer.ts index 2ba99f2..cf9db5e 100644 --- a/src/patterns/Observer.ts +++ b/src/patterns/Observer.ts @@ -78,7 +78,7 @@ export class EventEmitter { // ์ผ๋ฐ˜ ๋ฆฌ์Šค๋„ˆ ์‹คํ–‰ (this.events.get(event) as Set> | undefined)?.forEach(listener => { try { - listener(data); + void listener(data); } catch (error) { console.error(`Error in event listener for ${String(event)}:`, error); } @@ -89,7 +89,7 @@ export class EventEmitter { if (onceListeners) { onceListeners.forEach(listener => { try { - listener(data); + void listener(data); } catch (error) { console.error(`Error in once listener for ${String(event)}:`, error); } @@ -181,7 +181,7 @@ export class Subject implements IObservable { notify(data: T): void { this.observers.forEach(observer => { try { - observer.update(data); + void observer.update(data); } catch (error) { console.error('Error notifying observer:', error); } @@ -225,7 +225,7 @@ export class BehaviorSubject extends Subject { subscribe(observer: IObserver): Unsubscribe { // ๊ตฌ๋… ์‹œ ํ˜„์žฌ ๊ฐ’์„ ์ฆ‰์‹œ ์ „๋‹ฌ - observer.update(this.value); + void observer.update(this.value); return super.subscribe(observer); } } diff --git a/src/types/resources.ts b/src/types/resources.ts index 39f536b..78420a0 100644 --- a/src/types/resources.ts +++ b/src/types/resources.ts @@ -154,7 +154,7 @@ export class ResourcePool { private maxSize = 10, private minSize = 2 ) { - this.initialize(); + void this.initialize(); } private async initialize(): Promise { @@ -194,4 +194,4 @@ export class ResourcePool { this.available = []; this.inUse.clear(); } -} \ No newline at end of file +} diff --git a/src/ui/managers/StatusBarManager.ts b/src/ui/managers/StatusBarManager.ts index ce77e2d..96c1f5e 100644 --- a/src/ui/managers/StatusBarManager.ts +++ b/src/ui/managers/StatusBarManager.ts @@ -213,7 +213,7 @@ export class StatusBarManager implements IDisposable { */ public show(): void { if (this.statusBarItem) { - (this.statusBarItem as HTMLElement).classList.remove('sn-hidden'); + this.statusBarItem.classList.remove('sn-hidden'); } } @@ -222,7 +222,7 @@ export class StatusBarManager implements IDisposable { */ public hide(): void { if (this.statusBarItem) { - (this.statusBarItem as HTMLElement).classList.add('sn-hidden'); + this.statusBarItem.classList.add('sn-hidden'); } } diff --git a/src/ui/modals/FilePickerModal.ts b/src/ui/modals/FilePickerModal.ts index c76c323..0d1b68b 100644 --- a/src/ui/modals/FilePickerModal.ts +++ b/src/ui/modals/FilePickerModal.ts @@ -183,7 +183,7 @@ export class FilePickerModal extends Modal { // ํŒŒ์ผ ์„ ํƒ ์ด๋ฒคํŠธ this.fileBrowser.onFileSelected((file) => { - this.handleFileSelection(file); + void this.handleFileSelection(file); }); return browseContent; @@ -197,7 +197,7 @@ export class FilePickerModal extends Modal { // ์ตœ๊ทผ ํŒŒ์ผ ์„ ํƒ ์ด๋ฒคํŠธ this.recentFiles.onFileSelected((file) => { - this.handleFileSelection(file); + void this.handleFileSelection(file); }); } @@ -433,7 +433,7 @@ export class FilePickerModal extends Modal { } if (e.key === 'Enter' && this.selectedFiles.length > 0) { - this.processSelectedFiles(); + void this.processSelectedFiles(); } }); } @@ -479,4 +479,4 @@ export class FilePickerModal extends Modal { this.recentFiles?.unmount(); this.progressIndicator.unmount(); } -} \ No newline at end of file +} diff --git a/src/ui/modals/FilePickerModalRefactored.ts b/src/ui/modals/FilePickerModalRefactored.ts index 803375d..cc6bf49 100644 --- a/src/ui/modals/FilePickerModalRefactored.ts +++ b/src/ui/modals/FilePickerModalRefactored.ts @@ -168,7 +168,9 @@ export class FilePickerModalRefactored extends Modal { uiBuilder.buildProgressSection(); uiBuilder.buildFooter( () => this.handleCancel(), - () => this.handleSubmit(), + () => { + void this.handleSubmit(); + }, this.state.selectedFiles.length ); @@ -261,7 +263,7 @@ export class FilePickerModalRefactored extends Modal { this.handleCancel(); } else if (e.key === 'Enter' && !this.state.isProcessing) { if (this.state.selectedFiles.length > 0) { - this.handleSubmit(); + void this.handleSubmit(); } } }; diff --git a/src/ui/notifications/NotificationManager.ts b/src/ui/notifications/NotificationManager.ts index a5aa09c..d8c98e8 100644 --- a/src/ui/notifications/NotificationManager.ts +++ b/src/ui/notifications/NotificationManager.ts @@ -684,7 +684,7 @@ class ProgressNotification implements IProgressNotification { progress: 0 }; - this.init(); + void this.init(); } private async init(): Promise { @@ -857,7 +857,7 @@ export class NotificationManager implements INotificationAPI { // ์ฑ„๋„ ์„ ํƒ ๋ฐ ์ „์†ก const channels = this.selectChannels(notification); - Promise.all( + void Promise.all( channels.map(channel => channel.send(notification).catch(error => { console.error('Notification channel error:', error); @@ -977,7 +977,7 @@ export class NotificationManager implements INotificationAPI { const modal = new ModalChannel(); const id = this.generateNotificationId(); - modal.send({ + void modal.send({ type: 'info', title: options?.title || 'ํ™•์ธ', message, @@ -1022,7 +1022,7 @@ export class NotificationManager implements INotificationAPI { const modal = new ModalChannel(); const id = this.generateNotificationId(); - modal.send({ + void modal.send({ type: 'info', title: title || '์•Œ๋ฆผ', message, diff --git a/src/ui/settings/EnhancedSettingsTab.ts b/src/ui/settings/EnhancedSettingsTab.ts index 0b02eab..5ddcc45 100644 --- a/src/ui/settings/EnhancedSettingsTab.ts +++ b/src/ui/settings/EnhancedSettingsTab.ts @@ -30,7 +30,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { this.memoryManager = new ResourceManager(); // ์ดˆ๊ธฐํ™” - this.initialize(); + void this.initialize(); } /** @@ -179,16 +179,16 @@ export class EnhancedSettingsTab extends PluginSettingTab { this.showGeneralSettings(container); break; case 'api': - this.showApiSettings(container); + void this.showApiSettings(container); break; case 'audio': - this.showAudioSettings(container); + void this.showAudioSettings(container); break; case 'advanced': - this.showAdvancedSettings(container); + void this.showAdvancedSettings(container); break; case 'shortcuts': - this.showShortcutSettings(container); + void this.showShortcutSettings(container); break; case 'about': this.showAbout(container); @@ -224,7 +224,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { dropdown.addOption(code, name); }); - this.settingsAPI.get('general').then(general => { + void this.settingsAPI.get('general').then(general => { dropdown.setValue(general.language); }); @@ -245,7 +245,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .addOption('light', 'Light') .addOption('dark', 'Dark'); - this.settingsAPI.get('general').then(general => { + void this.settingsAPI.get('general').then(general => { dropdown.setValue(general.theme); }); @@ -262,7 +262,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .setName('Auto Save') .setDesc('Automatically save transcriptions') .addToggle(toggle => { - this.settingsAPI.get('general').then(general => { + void this.settingsAPI.get('general').then(general => { toggle.setValue(general.autoSave); }); @@ -282,7 +282,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .setLimits(10, 300, 10) .setDynamicTooltip(); - this.settingsAPI.get('general').then(general => { + void this.settingsAPI.get('general').then(general => { slider.setValue(general.saveInterval / 1000); }); @@ -301,7 +301,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .setName('Enable Notifications') .setDesc('Show notifications for events') .addToggle(toggle => { - this.settingsAPI.get('general').then(general => { + void this.settingsAPI.get('general').then(general => { toggle.setValue(general.notifications.enabled); }); @@ -316,7 +316,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .setName('Sound') .setDesc('Play sound with notifications') .addToggle(toggle => { - this.settingsAPI.get('general').then(general => { + void this.settingsAPI.get('general').then(general => { toggle.setValue(general.notifications.sound); }); @@ -346,7 +346,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .addOption('azure', 'Azure Speech Services') .addOption('custom', 'Custom Endpoint'); - this.settingsAPI.get('api').then(api => { + void this.settingsAPI.get('api').then(api => { dropdown.setValue(api.provider); }); @@ -356,7 +356,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { await this.settingsAPI.set('api', api); // UI ์—…๋ฐ์ดํŠธ - this.showApiSettings(container); + void this.showApiSettings(container); }); }); @@ -831,7 +831,7 @@ export class EnhancedSettingsTab extends PluginSettingTab { .onClick(async () => { const defaults = this.settingsAPI.getDefault('shortcuts'); await this.settingsAPI.set('shortcuts', defaults); - this.showShortcutSettings(container); // ํ™”๋ฉด ์ƒˆ๋กœ๊ณ ์นจ + await this.showShortcutSettings(container); // ํ™”๋ฉด ์ƒˆ๋กœ๊ณ ์นจ new Notice('Shortcuts reset to defaults'); }); } diff --git a/src/ui/settings/SettingsTab.ts b/src/ui/settings/SettingsTab.ts index fb5e661..b33b040 100644 --- a/src/ui/settings/SettingsTab.ts +++ b/src/ui/settings/SettingsTab.ts @@ -216,7 +216,7 @@ export class SettingsTab extends PluginSettingTab { default: console.warn('Unknown provider:', provider); containerEl.createEl('p', { - text: `Unknown provider: ${provider}`, + text: `Unknown provider: ${String(provider)}`, cls: 'mod-warning' }); } diff --git a/src/ui/settings/SettingsTabOptimized.ts b/src/ui/settings/SettingsTabOptimized.ts index 5a1fa77..36e8d3c 100644 --- a/src/ui/settings/SettingsTabOptimized.ts +++ b/src/ui/settings/SettingsTabOptimized.ts @@ -215,7 +215,7 @@ export class SettingsTabOptimized extends PluginSettingTab { section.render(); section.onSettingsChange(() => { this.state.isDirty = true; - this.saveSettings(); + void this.saveSettings(); }); this.components.sectionRenderers.set('api', section); @@ -310,7 +310,7 @@ export class SettingsTabOptimized extends PluginSettingTab { inputs.forEach(input => { this.eventManager.add(input as HTMLElement, 'change', () => { this.state.isDirty = true; - this.saveSettings(); + void this.saveSettings(); }); }); } @@ -580,7 +580,7 @@ class SecureApiKeyInput { // Validate on button click this.eventManager.add(this.validateBtn, 'click', () => { - this.validate(); + void this.validate(); }); // Track changes @@ -659,17 +659,23 @@ class SettingsFooter extends SectionRenderer { new Setting(footer) .addButton(btn => btn .setButtonText('์„ค์ • ๋‚ด๋ณด๋‚ด๊ธฐ') - .onClick(() => this.exportSettings())) + .onClick(() => { + void this.exportSettings(); + })) .addButton(btn => btn .setButtonText('์„ค์ • ๊ฐ€์ ธ์˜ค๊ธฐ') - .onClick(() => this.importSettings())); + .onClick(() => { + void this.importSettings(); + })); // Reset button new Setting(footer) .addButton(btn => btn .setButtonText('๊ธฐ๋ณธ๊ฐ’์œผ๋กœ ์žฌ์„ค์ •') .setWarning() - .onClick(() => this.resetSettings())); + .onClick(() => { + void this.resetSettings(); + })); } private async exportSettings(): Promise { diff --git a/src/ui/settings/SettingsTabRefactored.ts b/src/ui/settings/SettingsTabRefactored.ts index bc28be4..d370160 100644 --- a/src/ui/settings/SettingsTabRefactored.ts +++ b/src/ui/settings/SettingsTabRefactored.ts @@ -68,7 +68,7 @@ export class SettingsTabRefactored extends PluginSettingTab { containerEl.empty(); containerEl.addClass('speech-to-text-settings'); - tryCatchAsync(async () => { + void tryCatchAsync(async () => { await this.renderContent(containerEl); }, { onError: (error) => { @@ -704,4 +704,4 @@ class ShortcutSettingsWrapper extends AutoDisposable { protected onDispose(): void { // ์ถ”๊ฐ€ ์ •๋ฆฌ ๋กœ์ง } -} \ No newline at end of file +} diff --git a/src/ui/settings/accessibility/AccessibilityEnhancements.ts b/src/ui/settings/accessibility/AccessibilityEnhancements.ts index 69601d6..68eed53 100644 --- a/src/ui/settings/accessibility/AccessibilityEnhancements.ts +++ b/src/ui/settings/accessibility/AccessibilityEnhancements.ts @@ -154,7 +154,7 @@ export class ScreenReaderAnnouncer { this.liveRegion!.setAttribute('aria-live', 'assertive'); } - this.processQueue(); + void this.processQueue(); } /** diff --git a/src/ui/settings/components/ShortcutSettings.ts b/src/ui/settings/components/ShortcutSettings.ts index 5971e93..316963d 100644 --- a/src/ui/settings/components/ShortcutSettings.ts +++ b/src/ui/settings/components/ShortcutSettings.ts @@ -117,7 +117,7 @@ export class ShortcutSettings { .onClick(() => { this.openShortcutModal(shortcut.id, shortcut.name, (newKey) => { if (newKey) { - this.setShortcut(shortcut.id, newKey); + void this.setShortcut(shortcut.id, newKey); keyDisplay.textContent = newKey; keyDisplay.className = 'shortcut-set'; } @@ -130,7 +130,7 @@ export class ShortcutSettings { .setButtonText('์‚ญ์ œ') .setWarning() .onClick(async () => { - this.removeShortcut(shortcut.id); + await this.removeShortcut(shortcut.id); keyDisplay.textContent = '์„ค์ • ์•ˆ ๋จ'; keyDisplay.className = 'shortcut-unset'; })); @@ -181,7 +181,7 @@ export class ShortcutSettings { return; } // ๊ธฐ์กด ๋‹จ์ถ•ํ‚ค ์ œ๊ฑฐ - this.removeShortcut(existingCommand); + void this.removeShortcut(existingCommand); } } onSubmit(key); diff --git a/src/ui/settings/error/ErrorHandling.ts b/src/ui/settings/error/ErrorHandling.ts index c63ac19..04d591c 100644 --- a/src/ui/settings/error/ErrorHandling.ts +++ b/src/ui/settings/error/ErrorHandling.ts @@ -412,7 +412,7 @@ class StorageErrorHandler implements ErrorHandler { // ์ €์žฅ์†Œ ์šฉ๋Ÿ‰ ํ™•์ธ if ('storage' in navigator && 'estimate' in navigator.storage) { - navigator.storage.estimate().then(estimate => { + void navigator.storage.estimate().then(estimate => { const percentUsed = ((estimate.usage || 0) / (estimate.quota || 1)) * 100; if (percentUsed > 90) { new Notice('์ €์žฅ ๊ณต๊ฐ„์ด ๋ถ€์กฑํ•ฉ๋‹ˆ๋‹ค. ์ผ๋ถ€ ๋ฐ์ดํ„ฐ๋ฅผ ์ •๋ฆฌํ•ด์ฃผ์„ธ์š”.'); diff --git a/src/ui/settings/provider/ProviderSettingsContainer.ts b/src/ui/settings/provider/ProviderSettingsContainer.ts index 31a83f2..5622c86 100644 --- a/src/ui/settings/provider/ProviderSettingsContainer.ts +++ b/src/ui/settings/provider/ProviderSettingsContainer.ts @@ -36,7 +36,7 @@ export class ProviderSettingsContainer { this.apiKeyManager = new APIKeyManager(plugin); this.advancedPanel = new AdvancedSettingsPanel(plugin); - this.initialize(); + void this.initialize(); } /** diff --git a/src/ui/settings/provider/ProviderSettingsContainerRefactored.ts b/src/ui/settings/provider/ProviderSettingsContainerRefactored.ts index a9de3da..ef90c1e 100644 --- a/src/ui/settings/provider/ProviderSettingsContainerRefactored.ts +++ b/src/ui/settings/provider/ProviderSettingsContainerRefactored.ts @@ -59,7 +59,7 @@ export class ProviderSettingsContainerRefactored extends BaseSettingsComponent { this.apiKeyManager = new APIKeyManager(plugin); this.advancedPanel = new AdvancedSettingsPanel(plugin); - this.initialize(); + void this.initialize(); } /** @@ -488,7 +488,7 @@ export class ProviderSettingsContainerRefactored extends BaseSettingsComponent { // 5๋ถ„๋งˆ๋‹ค ์ƒํƒœ ์—…๋ฐ์ดํŠธ this.statusUpdateInterval = window.setInterval(() => { - this.checkAllConnectionsOptimized(); + void this.checkAllConnectionsOptimized(); }, 5 * 60 * 1000); this.disposables.push(() => this.stopStatusMonitoring()); diff --git a/src/ui/settings/provider/components/APIKeyManager.ts b/src/ui/settings/provider/components/APIKeyManager.ts index 989de96..94e6ff4 100644 --- a/src/ui/settings/provider/components/APIKeyManager.ts +++ b/src/ui/settings/provider/components/APIKeyManager.ts @@ -29,7 +29,7 @@ export class APIKeyManager { constructor(private plugin: SpeechToTextPlugin) { this.encryptor = new Encryptor(); - this.loadApiKeys(); + void this.loadApiKeys(); } /** @@ -131,7 +131,7 @@ export class APIKeyManager { 'autocomplete': 'off', 'spellcheck': 'false' } - }) as HTMLInputElement; + }); // ํ˜„์žฌ ๊ฐ’ ์„ค์ • const currentKey = this.apiKeys.get(provider); @@ -293,7 +293,7 @@ export class APIKeyManager { 'aria-label': 'Verify API key', 'title': 'Test API key validity' } - }) as HTMLButtonElement; + }); btn.onclick = async () => { const value = inputEl.value; @@ -809,7 +809,7 @@ export class APIKeyManager { // UI ์—…๋ฐ์ดํŠธ const container = document.querySelector(`.api-key-input-container.${provider}`); if (container) { - const statusEl = container.querySelector('.key-status-indicator') as HTMLElement; + const statusEl = container.querySelector('.key-status-indicator'); if (statusEl) { this.updateStatusIndicator(statusEl, provider); } diff --git a/src/ui/settings/provider/components/APIKeyManagerRefactored.ts b/src/ui/settings/provider/components/APIKeyManagerRefactored.ts index fb3f6e3..f72f0b0 100644 --- a/src/ui/settings/provider/components/APIKeyManagerRefactored.ts +++ b/src/ui/settings/provider/components/APIKeyManagerRefactored.ts @@ -81,7 +81,7 @@ export class APIKeyManagerRefactored extends BaseSettingsComponent { constructor(plugin: SpeechToTextPlugin) { super(plugin); this.encryptor = new Encryptor(); - this.initialize(); + void this.initialize(); } /** @@ -227,7 +227,7 @@ export class APIKeyManagerRefactored extends BaseSettingsComponent { 'aria-label': `${config.name} API ํ‚ค`, 'aria-describedby': `${provider}-validation-message` } - }) as HTMLInputElement; + }); // ๊ธฐ์กด ๊ฐ’ ์„ค์ • if (keyData?.key) { @@ -363,7 +363,7 @@ export class APIKeyManagerRefactored extends BaseSettingsComponent { 'aria-label': 'API ํ‚ค ๊ฒ€์ฆ', 'title': 'API ํ‚ค ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ' } - }) as HTMLButtonElement; + }); btn.onclick = async () => { await this.validateApiKeyWithUI(inputEl, provider, config, btn); @@ -775,11 +775,11 @@ export class APIKeyManagerRefactored extends BaseSettingsComponent { await this.withErrorHandling(async () => { const content = await file.text(); - const keys = JSON.parse(content); + const keys = JSON.parse(content) as Record; for (const [provider, key] of Object.entries(keys)) { - if (this.providerConfigs.has(provider as TranscriptionProvider)) { - await this.saveApiKey(provider as TranscriptionProvider, key as string); + if (this.isTranscriptionProvider(provider)) { + await this.saveApiKey(provider, key); } } @@ -821,6 +821,10 @@ export class APIKeyManagerRefactored extends BaseSettingsComponent { }, 'API ํ‚ค ๋‚ด๋ณด๋‚ด๊ธฐ ์‹คํŒจ'); } + private isTranscriptionProvider(value: string): value is TranscriptionProvider { + return value === 'whisper' || value === 'deepgram'; + } + /** * ๋ณด์•ˆ ์„ค์ • ํ‘œ์‹œ */ diff --git a/src/ui/settings/types/SettingsTypes.ts b/src/ui/settings/types/SettingsTypes.ts index b0aaae3..0a1040a 100644 --- a/src/ui/settings/types/SettingsTypes.ts +++ b/src/ui/settings/types/SettingsTypes.ts @@ -427,8 +427,8 @@ export function deepEqual(a: unknown, b: unknown): boolean { if (typeof a !== 'object') return false; - const keysA = Object.keys(a as object); - const keysB = Object.keys(b as object); + const keysA = Object.keys(a); + const keysB = Object.keys(b); if (keysA.length !== keysB.length) return false; diff --git a/src/utils/async/AsyncManager.ts b/src/utils/async/AsyncManager.ts index b9602d8..a2f8503 100644 --- a/src/utils/async/AsyncManager.ts +++ b/src/utils/async/AsyncManager.ts @@ -418,7 +418,7 @@ export class AsyncQueue { }); if (!this.running) { - this.run(); + void this.run(); } }); } @@ -433,10 +433,10 @@ export class AsyncQueue { const task = this.queue.shift(); if (task) { this.active++; - task().finally(() => { + void task().finally(() => { this.active--; if (this.queue.length > 0) { - this.run(); + void this.run(); } else if (this.active === 0) { this.running = false; } diff --git a/src/utils/async/AsyncTaskCoordinator.ts b/src/utils/async/AsyncTaskCoordinator.ts index 4ae460f..22812a1 100644 --- a/src/utils/async/AsyncTaskCoordinator.ts +++ b/src/utils/async/AsyncTaskCoordinator.ts @@ -368,7 +368,7 @@ export class ConcurrencyManager { async acquire(priority = 0): Promise { return new Promise((resolve) => { this.priorityQueue.enqueue(resolve, priority); - this.processQueue(); + void this.processQueue(); }); } @@ -378,7 +378,7 @@ export class ConcurrencyManager { release(): void { this.semaphore.release(); this.activeCount--; - this.processQueue(); + void this.processQueue(); } /** diff --git a/src/utils/error/ErrorManager.ts b/src/utils/error/ErrorManager.ts index da29d92..d7aae01 100644 --- a/src/utils/error/ErrorManager.ts +++ b/src/utils/error/ErrorManager.ts @@ -86,7 +86,7 @@ export class GlobalErrorManager { private setupGlobalHandlers(): void { // Unhandled rejection ์ฒ˜๋ฆฌ window.addEventListener('unhandledrejection', (event) => { - this.handleError(new Error(event.reason), { + void this.handleError(new Error(event.reason), { type: ErrorType.UNKNOWN, severity: ErrorSeverity.HIGH, context: { promise: true } @@ -96,7 +96,7 @@ export class GlobalErrorManager { // ์ผ๋ฐ˜ ์—๋Ÿฌ ์ฒ˜๋ฆฌ window.addEventListener('error', (event) => { - this.handleError(event.error || new Error(event.message), { + void this.handleError(event.error || new Error(event.message), { type: ErrorType.UNKNOWN, severity: ErrorSeverity.HIGH, context: { @@ -419,7 +419,7 @@ export class ErrorBoundary { this.errorHandler(error); // ์ „์—ญ ์—๋Ÿฌ ๋งค๋‹ˆ์ €์— ๋ณด๊ณ  - GlobalErrorManager.getInstance().handleError(error, { + void GlobalErrorManager.getInstance().handleError(error, { type: ErrorType.UNKNOWN, severity: ErrorSeverity.MEDIUM, context: { boundary: true } @@ -486,7 +486,7 @@ export function tryCatch( options.onError(err); } - GlobalErrorManager.getInstance().handleError(err, { + void GlobalErrorManager.getInstance().handleError(err, { type: ErrorType.UNKNOWN, severity: ErrorSeverity.LOW }); diff --git a/src/utils/memory/MemoryManager.ts b/src/utils/memory/MemoryManager.ts index 38707d7..9339635 100644 --- a/src/utils/memory/MemoryManager.ts +++ b/src/utils/memory/MemoryManager.ts @@ -261,7 +261,7 @@ export class MemoryMonitor { this.monitoring = true; this.interval = window.setInterval(() => { - this.check(); + void this.check(); }, intervalMs); } diff --git a/src/utils/memory/MemoryProfiler.ts b/src/utils/memory/MemoryProfiler.ts index 7f1cb98..b3dc831 100644 --- a/src/utils/memory/MemoryProfiler.ts +++ b/src/utils/memory/MemoryProfiler.ts @@ -69,7 +69,7 @@ export class MemoryProfiler { if (this.isMonitoring || !this.isSupported()) return; this.isMonitoring = true; - this.profileLoop(); + void this.profileLoop(); if (process.env.NODE_ENV === 'development') { console.debug('Memory profiling started'); @@ -120,7 +120,9 @@ export class MemoryProfiler { // ๋‹ค์Œ ์Šค๋ƒ…์ƒท ์Šค์ผ€์ค„ this.monitoringInterval = window.setTimeout( - () => this.profileLoop(), + () => { + void this.profileLoop(); + }, this.snapshotInterval ); }