diff --git a/.oxlintrc.json b/.oxlintrc.json index 6a86d7b0d..a7247fd7d 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -37,6 +37,7 @@ "allow": ["URL", "URLSearchParams"] } ], + "typescript/no-unnecessary-boolean-literal-compare": "error", "jsx-a11y/interactive-supports-focus": "off", "unicorn/prefer-spread": "error" }, diff --git a/packages/cli/src/commands/alert/issues/edit.ts b/packages/cli/src/commands/alert/issues/edit.ts index 37e96573c..30fc6e951 100644 --- a/packages/cli/src/commands/alert/issues/edit.ts +++ b/packages/cli/src/commands/alert/issues/edit.ts @@ -334,7 +334,7 @@ export const editCommand = buildCommand({ id: stringifyUnknown(updated.id ?? rule.id), // The workflows endpoint returns `enabled` rather than `status`; map it // back to a status label so human/JSON output matches the create path. - status: updated.enabled === false ? "disabled" : "active", + status: !updated.enabled ? "disabled" : "active", } satisfies IssueAlertEditOutput); }, }); diff --git a/packages/cli/src/commands/alert/metrics/edit.ts b/packages/cli/src/commands/alert/metrics/edit.ts index f06d92a69..05bbab2b7 100644 --- a/packages/cli/src/commands/alert/metrics/edit.ts +++ b/packages/cli/src/commands/alert/metrics/edit.ts @@ -326,7 +326,7 @@ export const editCommand = buildCommand({ org: orgSlug, id: stringifyUnknown(updated.id ?? rule.id), // The detectors endpoint returns `enabled` rather than `status`. - status: updated.enabled === false ? "disabled" : "active", + status: !updated.enabled ? "disabled" : "active", } satisfies MetricAlertEditOutput); }, }); diff --git a/packages/cli/test/skill-eval/helpers/judge.ts b/packages/cli/test/skill-eval/helpers/judge.ts index ab90920e1..f6688ae43 100644 --- a/packages/cli/test/skill-eval/helpers/judge.ts +++ b/packages/cli/test/skill-eval/helpers/judge.ts @@ -137,7 +137,7 @@ or } const parsed = JSON.parse(jsonMatch[0]) as { - pass: boolean; + pass: unknown; reason: string; }; return { diff --git a/packages/mcp-core/src/tools/tools.test.ts b/packages/mcp-core/src/tools/tools.test.ts index efdea86c0..0cc99ce22 100644 --- a/packages/mcp-core/src/tools/tools.test.ts +++ b/packages/mcp-core/src/tools/tools.test.ts @@ -82,10 +82,7 @@ test("unlisted tools declare a unique display title", () => { test("no tool is both read-only and destructive", () => { for (const tool of Object.values(tools.default)) { assert( - !( - tool.annotations.readOnlyHint === true && - tool.annotations.destructiveHint === true - ), + !(tool.annotations.readOnlyHint && tool.annotations.destructiveHint), `${tool.name} cannot be both read-only and destructive`, ); }