Skip to content

Commit 19b47fe

Browse files
ozgesolidkeyclaude
andcommitted
TypeScript: enable noUnusedParameters, fix all violations
Prefix unused parameters with underscore across the codebase: - columnAwareAnalyzer: _options - logcatHandler: _stderr, _code - renderer: _word, _count - test files: _opts, remove unused i All 271 tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2674b20 commit 19b47fe

7 files changed

Lines changed: 10 additions & 8 deletions

File tree

.mcp.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"FIREBASE_UID": "kDuGnwCnBfWCRq7t1KKmPMz69K62",
1818
"WORKSPACE_NAME": "log-analyzer",
1919
"FIREBASE_CREDENTIALS": "/Users/storm/MY/REPOS/nexum/firebase-service-account.json",
20-
"PERMISSION_PORT": "8792"
20+
"PERMISSION_PORT": "8792",
21+
"NEXUM_ORG_ID": "poc-acme"
2122
}
2223
},
2324
"lore": {

src/main/analyzers/columnAwareAnalyzer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class ColumnAwareAnalyzer implements LogAnalyzer {
3838

3939
async analyze(
4040
filePath: string,
41-
options: AnalyzerOptions,
41+
_options: AnalyzerOptions,
4242
onProgress?: (progress: AnalyzeProgress) => void,
4343
signal?: { cancelled: boolean }
4444
): Promise<AnalysisResult> {

src/main/logcatHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class LogcatHandler extends EventEmitter {
1717

1818
async listDevices(): Promise<LogcatDeviceInfo[]> {
1919
return new Promise((resolve, reject) => {
20-
execFile('adb', ['devices', '-l'], { timeout: 5000 }, (err, stdout, stderr) => {
20+
execFile('adb', ['devices', '-l'], { timeout: 5000 }, (err, stdout, _stderr) => {
2121
if (err) {
2222
reject(new Error(`adb not found or failed: ${err.message}`));
2323
return;
@@ -79,7 +79,7 @@ export class LogcatHandler extends EventEmitter {
7979
this.emit('disconnected');
8080
});
8181

82-
this.process.on('close', (code) => {
82+
this.process.on('close', (_code) => {
8383
this.process = null;
8484
this.config = null;
8585
this.connectedSince = null;

src/renderer/renderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6118,7 +6118,7 @@ function formatAgentText(raw: string): string {
61186118
);
61196119

61206120
// Step 6 — "line N" / "Line N" / "lines N-M" references
6121-
s = s.replace(/\b([Ll]ines?)\s+([\d,]+(?:\s*[-–]\s*[\d,]+)?)/g, (match, word, nums) => {
6121+
s = s.replace(/\b([Ll]ines?)\s+([\d,]+(?:\s*[-–]\s*[\d,]+)?)/g, (match, _word, nums) => {
61226122
const first = nums.replace(/[,\s]/g, '').split(/[-–]/)[0];
61236123
return `<span class="chat-link chat-line-link" data-action="goto-line" data-line="${first}" title="Go to line">${match}</span>`;
61246124
});
@@ -6226,7 +6226,7 @@ function sendChatMessage(): void {
62266226
});
62276227
}
62286228

6229-
function updateAgentConnectionStatus(connected: boolean, count: number, name?: string | null): void {
6229+
function updateAgentConnectionStatus(connected: boolean, _count: number, name?: string | null): void {
62306230
const dot = elements.chatAgentDot;
62316231
const text = elements.chatAgentStatusText;
62326232
if (connected) {

src/tests/api-server.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ function buildMockContext() {
407407
saveNotes: async (content: string) => { state.notes = content; return { success: true }; },
408408
detectTimeGaps: async () => ({ success: true, gaps: [], totalLines: 500 }),
409409
navigateToLine: (ln: number) => { state.navigatedLine = ln; },
410-
investigateCrashes: async (opts: any) => ({ success: true, crashes: [{ lineNumber: 100, text: 'FATAL error', context: [] }], count: 1 }),
410+
investigateCrashes: async (_opts: any) => ({ success: true, crashes: [{ lineNumber: 100, text: 'FATAL error', context: [] }], count: 1 }),
411411
investigateComponent: async (opts: any) => ({ success: true, component: opts.component, errorCount: 5, samples: [] }),
412412
investigateTimerange: async (opts: any) => ({ success: true, startTime: opts.startTime, endTime: opts.endTime, events: 42 }),
413413
};

src/tests/baseline.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ describe('BaselineStore edge cases', () => {
746746
});
747747

748748
it('should handle large fingerprint data', () => {
749-
const largeDensity = Array.from({ length: 1440 }, (_, i) => Math.floor(Math.random() * 100));
749+
const largeDensity = Array.from({ length: 1440 }, () => Math.floor(Math.random() * 100));
750750
const fp = makeFingerprint({ timestampDensity: largeDensity });
751751
const id = store.save('large', '', [], fp);
752752
const record = store.get(id)!;

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"noImplicitReturns": true,
1010
"noFallthroughCasesInSwitch": true,
1111
"noUnusedLocals": true,
12+
"noUnusedParameters": true,
1213
"esModuleInterop": true,
1314
"skipLibCheck": true,
1415
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)