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
+6 -6
View File
@@ -18,9 +18,9 @@ export function redactConfig(config: Config): Record<string, unknown> {
// Helper: redact specified keys on an object if they exist and are non-nullish
const redact = (obj: Record<string, unknown> | undefined, ...keys: string[]) => {
if (!obj) return;
if (!obj) {return;}
for (const key of keys) {
if (obj[key] !== undefined && obj[key] !== null) obj[key] = '***';
if (obj[key] !== undefined && obj[key] !== null) {obj[key] = '***';}
}
};
@@ -102,22 +102,22 @@ export function redactConfig(config: Config): Record<string, unknown> {
/** Keys that are safe to update at runtime via config.patch. */
const PATCHABLE_KEYS: Record<string, (config: Config, value: unknown) => boolean> = {
'hooks.confirm': (config, value) => {
if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) return false;
if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) {return false;}
config.hooks.confirm = value as string[];
return true;
},
'hooks.log': (config, value) => {
if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) return false;
if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) {return false;}
config.hooks.log = value as string[];
return true;
},
'hooks.silent': (config, value) => {
if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) return false;
if (!Array.isArray(value) || !value.every((v) => typeof v === 'string')) {return false;}
config.hooks.silent = value as string[];
return true;
},
'server.localhost': (config, value) => {
if (typeof value !== 'boolean') return false;
if (typeof value !== 'boolean') {return false;}
config.server.localhost = value;
return true;
},
+1 -1
View File
@@ -16,7 +16,7 @@ export function createSessionHandlers(deps: SessionHandlerDeps) {
id,
messageCount: deps.sessionManager.getSession(
id.split(':')[0],
id.split(':').slice(1).join(':')
id.split(':').slice(1).join(':'),
).getHistory().length,
}));
return makeResponse(request.id, { sessions });