Skip to content

chore(lint): prevent focused vitest tests - #3483

Merged
setchy merged 1 commit into
mainfrom
chore/lint-vitest-focused-tests
Oct 24, 2026
Merged

setchy merged 1 commit into
mainfrom
chore/lint-vitest-focused-tests

Conversation

@setchy

@setchy setchy commented Oct 24, 2026

Copy link
Copy Markdown
Member

Summary

Adds the Vitest lint plugin with vitest/no-focused-tests as an error, so a committed describe.only / it.only fails pnpm check instead of silently reducing coverage. Vitest itself only rejects focused tests in CI (allowOnly defaults to !process.env.CI), so this catches the mistake locally too.

The plugin's other correctness rules are explicitly disabled because they would require a broad test refactor (notably require-mock-type-parameters: 286 existing hits). Only no-focused-tests is opted into.

Verification

  • Confirmed a temporary describe.only(...) test is reported by the new rule.
  • pnpm check passes.

@setchy
setchy requested a review from afonsojramos as a code owner October 24, 2026 13:13
@github-actions github-actions Bot added the chore Miscellaneous tasks label Oct 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

@setchy
setchy merged commit fa6fe12 into main Oct 24, 2026
19 checks passed
@setchy
setchy deleted the chore/lint-vitest-focused-tests branch October 24, 2026 13:25
@github-actions github-actions Bot added this to the Release 7.11.0 milestone Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Miscellaneous tasks

Development

Successfully merging this pull request may close these issues.

1 participant