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

@@ -44,7 +44,9 @@ describe("startTelegramWebhook", () => {
}),
);
const address = server.address();
if (!address || typeof address === "string") throw new Error("no address");
if (!address || typeof address === "string") {
throw new Error("no address");
}
const url = `http://127.0.0.1:${address.port}`;
const health = await fetch(`${url}/healthz`);
@@ -74,7 +76,9 @@ describe("startTelegramWebhook", () => {
}),
);
const addr = server.address();
if (!addr || typeof addr === "string") throw new Error("no addr");
if (!addr || typeof addr === "string") {
throw new Error("no addr");
}
await fetch(`http://127.0.0.1:${addr.port}/hook`, { method: "POST" });
expect(handlerSpy).toHaveBeenCalled();
abort.abort();