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

@@ -69,7 +69,9 @@ const validateTelegramCustomCommands = (
value: { customCommands?: Array<{ command?: string; description?: string }> },
ctx: z.RefinementCtx,
) => {
if (!value.customCommands || value.customCommands.length === 0) return;
if (!value.customCommands || value.customCommands.length === 0) {
return;
}
const { issues } = resolveTelegramCustomCommands({
commands: value.customCommands,
checkReserved: false,
@@ -476,12 +478,20 @@ export const SlackConfigSchema = SlackAccountSchema.extend({
path: ["signingSecret"],
});
}
if (!value.accounts) return;
if (!value.accounts) {
return;
}
for (const [accountId, account] of Object.entries(value.accounts)) {
if (!account) continue;
if (account.enabled === false) continue;
if (!account) {
continue;
}
if (account.enabled === false) {
continue;
}
const accountMode = account.mode ?? baseMode;
if (accountMode !== "http") continue;
if (accountMode !== "http") {
continue;
}
const accountSecret = account.signingSecret ?? value.signingSecret;
if (!accountSecret) {
ctx.addIssue({