chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -5,13 +5,19 @@ export function getCliSessionId(
entry: SessionEntry | undefined,
provider: string,
): string | undefined {
if (!entry) return undefined;
if (!entry) {
return undefined;
}
const normalized = normalizeProviderId(provider);
const fromMap = entry.cliSessionIds?.[normalized];
if (fromMap?.trim()) return fromMap.trim();
if (fromMap?.trim()) {
return fromMap.trim();
}
if (normalized === "claude-cli") {
const legacy = entry.claudeCliSessionId?.trim();
if (legacy) return legacy;
if (legacy) {
return legacy;
}
}
return undefined;
}
@@ -19,7 +25,9 @@ export function getCliSessionId(
export function setCliSessionId(entry: SessionEntry, provider: string, sessionId: string): void {
const normalized = normalizeProviderId(provider);
const trimmed = sessionId.trim();
if (!trimmed) return;
if (!trimmed) {
return;
}
const existing = entry.cliSessionIds ?? {};
entry.cliSessionIds = { ...existing };
entry.cliSessionIds[normalized] = trimmed;