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

@@ -20,7 +20,9 @@ type BlueBubblesProbeResult = {
function readBlueBubblesAccountStatus(
value: ChannelAccountSnapshot,
): BlueBubblesAccountStatus | null {
if (!isRecord(value)) return null;
if (!isRecord(value)) {
return null;
}
return {
accountId: value.accountId,
enabled: value.enabled,
@@ -33,7 +35,9 @@ function readBlueBubblesAccountStatus(
}
function readBlueBubblesProbeResult(value: unknown): BlueBubblesProbeResult | null {
if (!isRecord(value)) return null;
if (!isRecord(value)) {
return null;
}
return {
ok: typeof value.ok === "boolean" ? value.ok : undefined,
status: typeof value.status === "number" ? value.status : null,
@@ -47,10 +51,14 @@ export function collectBlueBubblesStatusIssues(
const issues: ChannelStatusIssue[] = [];
for (const entry of accounts) {
const account = readBlueBubblesAccountStatus(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 configured = account.configured === true;
const running = account.running === true;