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

@@ -15,7 +15,9 @@ async function readLastLogLine(filePath: string): Promise<string | null> {
const raw = await fs.readFile(filePath, "utf8");
const lines = raw.split(/\r?\n/).map((line) => line.trim());
for (let i = lines.length - 1; i >= 0; i -= 1) {
if (lines[i]) return lines[i];
if (lines[i]) {
return lines[i];
}
}
return null;
} catch {
@@ -32,7 +34,9 @@ export async function readLastGatewayErrorLine(env: NodeJS.ProcessEnv): Promise<
);
for (let i = lines.length - 1; i >= 0; i -= 1) {
const line = lines[i];
if (!line) continue;
if (!line) {
continue;
}
if (GATEWAY_LOG_ERROR_PATTERNS.some((pattern) => pattern.test(line))) {
return line;
}