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

@@ -23,7 +23,9 @@ export function resolveProviderAuthOverview(params: {
const profiles = listProfilesForProvider(store, provider);
const withUnusableSuffix = (base: string, profileId: string) => {
const unusableUntil = resolveProfileUnusableUntilForDisplay(store, profileId);
if (!unusableUntil || now >= unusableUntil) return base;
if (!unusableUntil || now >= unusableUntil) {
return base;
}
const stats = store.usageStats?.[profileId];
const kind =
typeof stats?.disabledUntil === "number" && now < stats.disabledUntil
@@ -34,7 +36,9 @@ export function resolveProviderAuthOverview(params: {
};
const labels = profiles.map((profileId) => {
const profile = store.profiles[profileId];
if (!profile) return `${profileId}=missing`;
if (!profile) {
return `${profileId}=missing`;
}
if (profile.type === "api_key") {
return withUnusableSuffix(`${profileId}=${maskApiKey(profile.key)}`, profileId);
}