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

@@ -148,7 +148,9 @@ describe("image tool implicit imageModel config", () => {
};
const tool = createImageTool({ config: cfg, agentDir, sandboxRoot });
expect(tool).not.toBeNull();
if (!tool) throw new Error("expected image tool");
if (!tool) {
throw new Error("expected image tool");
}
await expect(tool.execute("t1", { image: "https://example.com/a.png" })).rejects.toThrow(
/Sandboxed image tool does not allow remote URLs/i,
@@ -198,7 +200,9 @@ describe("image tool implicit imageModel config", () => {
};
const tool = createImageTool({ config: cfg, agentDir, sandboxRoot });
expect(tool).not.toBeNull();
if (!tool) throw new Error("expected image tool");
if (!tool) {
throw new Error("expected image tool");
}
const res = await tool.execute("t1", {
prompt: "Describe the image.",
@@ -266,7 +270,9 @@ describe("image tool MiniMax VLM routing", () => {
};
const tool = createImageTool({ config: cfg, agentDir });
expect(tool).not.toBeNull();
if (!tool) throw new Error("expected image tool");
if (!tool) {
throw new Error("expected image tool");
}
const res = await tool.execute("t1", {
prompt: "Describe the image.",
@@ -308,7 +314,9 @@ describe("image tool MiniMax VLM routing", () => {
};
const tool = createImageTool({ config: cfg, agentDir });
expect(tool).not.toBeNull();
if (!tool) throw new Error("expected image tool");
if (!tool) {
throw new Error("expected image tool");
}
await expect(
tool.execute("t1", {