style: auto-fix ESLint issues (curly braces and formatting)

- Add curly braces to all if/else/for/while statements
- Fix indentation and trailing spaces
- Auto-fixed 372 linting errors using eslint --fix
- Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
William Valentin
2026-02-11 10:30:24 -08:00
parent 0578a87d85
commit 6090508bad
99 changed files with 418 additions and 418 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ export class Lifecycle {
}
async shutdown(): Promise<void> {
if (this.shuttingDown) return;
if (this.shuttingDown) {return;}
this.shuttingDown = true;
this._isRunning = false;
+1 -1
View File
@@ -57,7 +57,7 @@ export async function initMemory(deps: MemoryDeps): Promise<MemoryResult> {
}
const hash = contentHash(content);
if (vectorStore.hasContentHash(ns, hash)) continue;
if (vectorStore.hasContentHash(ns, hash)) {continue;}
const chunks = chunkText(content, ns, {
chunkSize: config.memory.embedding.chunk_size,
+5 -5
View File
@@ -12,7 +12,7 @@ function requireApiKey(cfg: ModelConfig, envVar: string): string {
if (!key) {
throw new Error(
`API key required for ${cfg.provider}. ` +
`Set ${envVar} environment variable or provide api_key in config.`
`Set ${envVar} environment variable or provide api_key in config.`,
);
}
return key;
@@ -118,7 +118,7 @@ export function anthropicToGitHubModel(anthropicModel: string): string | undefin
'claude-haiku-4-5-20251001': 'claude-haiku-4.5',
};
if (MAPPINGS[anthropicModel]) return MAPPINGS[anthropicModel];
if (MAPPINGS[anthropicModel]) {return MAPPINGS[anthropicModel];}
// Generic fallback: strip date suffix, then convert trailing -N to .N
// only when preceded by another digit (i.e. "4-5" → "4.5", not "sonnet-5" → "sonnet.5")
@@ -140,10 +140,10 @@ export function anthropicToGitHubModel(anthropicModel: string): string | undefin
* Returns undefined if no mapping exists or the tier isn't Anthropic.
*/
export function createAutoFallbackClient(tierConfig: { provider: string; model: string }): ModelClient | undefined {
if (tierConfig.provider !== 'anthropic') return undefined;
if (tierConfig.provider !== 'anthropic') {return undefined;}
const githubModel = anthropicToGitHubModel(tierConfig.model);
if (!githubModel) return undefined;
if (!githubModel) {return undefined;}
return new GitHubModelsClient({
model: githubModel,
@@ -202,7 +202,7 @@ export function createModelRouter(config: Config): ModelRouter {
const autoFallbackTiers: string[] = [];
for (const { tier, cfg } of tierConfigs) {
if (!cfg) continue;
if (!cfg) {continue;}
const fallbackList: ModelClient[] = [];
+1 -1
View File
@@ -92,7 +92,7 @@ export function loadSystemPrompt(config: Config, skillRegistry: SkillRegistry):
// ── Pairing Manager ─────────────────────────────────────────────
export function initPairingManager(config: Config, store?: PairingStore): PairingManager | undefined {
if (!config.pairing.enabled) return undefined;
if (!config.pairing.enabled) {return undefined;}
const ttlMatch = config.pairing.code_ttl.match(/^(\d+)(s|m|h)$/);
const codeTtlMs = ttlMatch