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

@@ -13,7 +13,9 @@ type WhatsAppAccountStatus = {
};
function readWhatsAppAccountStatus(value: ChannelAccountSnapshot): WhatsAppAccountStatus | null {
if (!isRecord(value)) return null;
if (!isRecord(value)) {
return null;
}
return {
accountId: value.accountId,
enabled: value.enabled,
@@ -31,10 +33,14 @@ export function collectWhatsAppStatusIssues(
const issues: ChannelStatusIssue[] = [];
for (const entry of accounts) {
const account = readWhatsAppAccountStatus(entry);
if (!account) continue;
if (!account) {
continue;
}
const accountId = asString(account.accountId) ?? "default";
const enabled = account.enabled !== false;
if (!enabled) continue;
if (!enabled) {
continue;
}
const linked = account.linked === true;
const running = account.running === true;
const connected = account.connected === true;