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
+9 -3
View File
@@ -13,10 +13,16 @@ export function resolveCommandAuthorizedFromAuthorizers(params: {
const { useAccessGroups, authorizers } = params;
const mode = params.modeWhenAccessGroupsOff ?? "allow";
if (!useAccessGroups) {
if (mode === "allow") return true;
if (mode === "deny") return false;
if (mode === "allow") {
return true;
}
if (mode === "deny") {
return false;
}
const anyConfigured = authorizers.some((entry) => entry.configured);
if (!anyConfigured) return true;
if (!anyConfigured) {
return true;
}
return authorizers.some((entry) => entry.configured && entry.allowed);
}
return authorizers.some((entry) => entry.configured && entry.allowed);