Skip to content

feat(errors): wire up no-silent-catch lint rule, drop ratchet baseline - #1532

Merged
BYK merged 1 commit into
mainfrom
issue-1531-silent-catch-lint-rule
Sep 4, 2026
Merged

feat(errors): wire up no-silent-catch lint rule, drop ratchet baseline#1532
BYK merged 1 commit into
mainfrom
issue-1531-silent-catch-lint-rule

Conversation

@jared-outpost

@jared-outpost jared-outpost Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Resolves the root cause from #1513's discussion: the no-silent-catch Biome plugin was added in #1487 but never registered, so silent catches were still guarded by the hand-rolled script/silent-catch-baseline.json ratchet. This wires the plugin into biome.jsonc (scoped to src/**/*.ts), grandfathers the existing backlog with inline // biome-ignore lint/plugin comments, and runs pnpm run lint with --error-on-warnings so an orphaned suppression fails as suppressions/unused — the same shrink-only ratchet, now enforced by the linter instead of a bespoke script + JSON baseline.

check-error-patterns.ts keeps its two hard checks (ContextError newlines, ad-hoc CliError "Try:" strings); only the silent-catch detection and baseline machinery are removed, along with silent-catch-baseline.json.

Testing

  • pnpm run lint (with --error-on-warnings) — clean, 0 silent catches / 0 unused suppressions
  • pnpm run check:errors — passes
  • vitest run test/script/check-error-patterns.test.ts — 5 passing

Closes #1531

The no-silent-catch Biome plugin was added in #1487 but never registered,
so the silent-catch backlog was still guarded by the hand-rolled
script/silent-catch-baseline.json ratchet. Wire the plugin into biome.jsonc
(scoped to src/**/*.ts), grandfather the existing backlog with inline
`// biome-ignore lint/plugin` comments, and run lint with --error-on-warnings
so an orphaned suppression fails as suppressions/unused — the same shrink-only
ratchet, enforced by the linter instead of a bespoke script + JSON baseline.

Trim the silent-catch detection and baseline machinery out of
check-error-patterns.ts (it still checks ContextError newlines and ad-hoc
CliError "Try:" strings) and its tests, and delete the baseline file.

Fixes #1531
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Sep 4, 2026 10:18am UTC

Request Review

@jared-outpost

jared-outpost Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Deployment notification only — no action needed.

@jared-outpost
jared-outpost Bot marked this pull request as ready for review September 4, 2026 10:25
@jared-outpost
jared-outpost Bot requested a review from BYK September 4, 2026 10:25
@jared-outpost

jared-outpost Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

CI green, self-review clean, ready for review. The ratchet is now the Biome plugin + --error-on-warnings (unused suppressions fail).

@github-actions github-actions Bot added the risk: high PR risk score: high label Sep 4, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 48d910a. Configure here.

Comment thread packages/cli/biome.jsonc
@BYK
BYK merged commit b0b22fe into main Sep 4, 2026
33 checks passed
@BYK
BYK deleted the issue-1531-silent-catch-lint-rule branch September 4, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace ratchet mechanism with actual lint rule

1 participant