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

@@ -30,7 +30,9 @@ describe("gateway tool", () => {
config: { commands: { restart: true } },
}).find((candidate) => candidate.name === "gateway");
expect(tool).toBeDefined();
if (!tool) throw new Error("missing gateway tool");
if (!tool) {
throw new Error("missing gateway tool");
}
const result = await tool.execute("call1", {
action: "restart",
@@ -78,7 +80,9 @@ describe("gateway tool", () => {
agentSessionKey: "agent:main:whatsapp:dm:+15555550123",
}).find((candidate) => candidate.name === "gateway");
expect(tool).toBeDefined();
if (!tool) throw new Error("missing gateway tool");
if (!tool) {
throw new Error("missing gateway tool");
}
const raw = '{\n agents: { defaults: { workspace: "~/openclaw" } }\n}\n';
await tool.execute("call2", {
@@ -104,7 +108,9 @@ describe("gateway tool", () => {
agentSessionKey: "agent:main:whatsapp:dm:+15555550123",
}).find((candidate) => candidate.name === "gateway");
expect(tool).toBeDefined();
if (!tool) throw new Error("missing gateway tool");
if (!tool) {
throw new Error("missing gateway tool");
}
const raw = '{\n channels: { telegram: { groups: { "*": { requireMention: false } } } }\n}\n';
await tool.execute("call4", {
@@ -130,7 +136,9 @@ describe("gateway tool", () => {
agentSessionKey: "agent:main:whatsapp:dm:+15555550123",
}).find((candidate) => candidate.name === "gateway");
expect(tool).toBeDefined();
if (!tool) throw new Error("missing gateway tool");
if (!tool) {
throw new Error("missing gateway tool");
}
await tool.execute("call3", {
action: "update.run",