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

@@ -184,7 +184,9 @@ export function resolveHeartbeatDeliveryTarget(params: {
target = rawTarget;
} else if (typeof rawTarget === "string") {
const normalized = normalizeChannelId(rawTarget);
if (normalized) target = normalized;
if (normalized) {
target = normalized;
}
}
if (target === "none") {
@@ -279,12 +281,16 @@ function resolveHeartbeatSenderId(params: {
}
if (candidates.length > 0 && allowList.length > 0) {
const matched = candidates.find((candidate) => allowList.includes(candidate));
if (matched) return matched;
if (matched) {
return matched;
}
}
if (candidates.length > 0 && allowList.length === 0) {
return candidates[0];
}
if (allowList.length > 0) return allowList[0];
if (allowList.length > 0) {
return allowList[0];
}
return candidates[0] ?? "heartbeat";
}