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
+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[] = [];