chore(lint): burn down remaining warnings to zero

This commit is contained in:
William Valentin
2026-02-15 23:14:21 -08:00
parent 49b752e8b0
commit 948d4ac6d8
67 changed files with 235 additions and 256 deletions
+2 -2
View File
@@ -110,8 +110,8 @@ export async function setupAutomation(p: Prompter, builder: ConfigBuilder): Prom
* Run OAuth auth flows for enabled Google services.
* Called after config is saved so the auth commands can read it.
*/
export async function runGoogleAuth(p: Prompter, config: Record<string, any>): Promise<void> {
const automation = config.automation as Record<string, any> | undefined;
export async function runGoogleAuth(p: Prompter, config: Record<string, unknown>): Promise<void> {
const automation = config.automation as Record<string, unknown> | undefined;
if (!automation) {return;}
const pending: { name: string; authCmd: string }[] = [];
+3 -4
View File
@@ -1,15 +1,14 @@
import { describe, it, expect } from 'vitest';
import { EventEmitter } from 'events';
import type { Interface as ReadlineInterface } from 'readline/promises';
import { createPrompter } from './prompts.js';
import { ConfigBuilder } from './config.js';
import { setupChannels } from './channels.js';
function mockReadline(inputs: string[]) {
let questionIdx = 0;
const emitter = new EventEmitter();
return {
async question(query: string) {
async question(_query: string) {
const answer = inputs[questionIdx++];
return answer ?? '';
},
@@ -25,7 +24,7 @@ function mockReadline(inputs: string[]) {
async next() {
return { done: true };
},
} as any;
} as unknown as ReadlineInterface;
}
describe('setupChannels', () => {
+2 -2
View File
@@ -155,8 +155,8 @@ export class ConfigBuilder {
this.config.automation = automation;
}
build(): Record<string, any> {
return structuredClone(this.config) as Record<string, any>;
build(): Record<string, unknown> {
return structuredClone(this.config) as Record<string, unknown>;
}
toYaml(): string {
+1 -1
View File
@@ -14,7 +14,7 @@ function mockReadline(inputs: string[]): ReadlineInterface {
throw new Error('No more inputs');
}),
close: vi.fn(),
} as any as ReadlineInterface;
} as unknown as ReadlineInterface;
}
describe('first-run wizard integration', () => {
+2 -2
View File
@@ -39,8 +39,8 @@ export async function setupMemory(p: Prompter, builder: ConfigBuilder): Promise<
p.println('✓ Vector search enabled');
}
function findReusableApiKey(config: Record<string, any>, embeddingProvider: string): string | undefined {
const models = config.models ?? {};
function findReusableApiKey(config: Record<string, unknown>, embeddingProvider: string): string | undefined {
const models = (config.models as Record<string, { provider?: string; api_key?: string }>) ?? {};
for (const tier of ['default', 'fast', 'complex', 'local']) {
const m = models[tier];
if (m?.provider === embeddingProvider && m?.api_key) {return m.api_key;}
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect } from 'vitest';
import { describe, it } from 'vitest';
import { createInterface } from 'readline/promises';
import { Readable, Writable } from 'stream';
import { createPrompter } from './prompts.js';
+3 -2
View File
@@ -1,4 +1,5 @@
import { describe, it, expect } from 'vitest';
import type { Interface as ReadlineInterface } from 'readline/promises';
import { createPrompter } from './prompts.js';
import { ConfigBuilder } from './config.js';
import { setupMemory } from './memory.js';
@@ -9,7 +10,7 @@ function mockReadline(inputs: string[]) {
let questionIdx = 0;
return {
async question(query: string) {
async question(_query: string) {
const answer = inputs[questionIdx++];
return answer ?? '';
},
@@ -25,7 +26,7 @@ function mockReadline(inputs: string[]) {
async next() {
return { done: true };
},
} as any;
} as unknown as ReadlineInterface;
}
describe('setupMemory', () => {
+1 -1
View File
@@ -1,4 +1,4 @@
export function renderSummary(config: Record<string, any>): string {
export function renderSummary(config: Record<string, unknown>): string {
const lines: string[] = [];
const models = config.models ?? {};