Skip to content

docs(linter): Added in the missing jest rules that are compatible with vitest.#16679

Merged
camc314 merged 2 commits intooxc-project:mainfrom
Afsoon:12-10-improve-vitest-compatible-rules-doc
Dec 10, 2025
Merged

docs(linter): Added in the missing jest rules that are compatible with vitest.#16679
camc314 merged 2 commits intooxc-project:mainfrom
Afsoon:12-10-improve-vitest-compatible-rules-doc

Conversation

@Afsoon
Copy link
Copy Markdown
Contributor

@Afsoon Afsoon commented Dec 10, 2025

After the review @connorshea did in #16540 (review), suggested to me add a missing part of documentation in the linter rule. I hadn't added it because the reference rule I used lack of it.

So this PR aims to add it in all jest rules stated as compatible.

Before this PR

The following Jest linter only had this documentation part:

  • consistent-test-it
  • expect-expect
  • no-alias-methods
  • no-commented-out-tests
  • no-disabled-tests
  • no-focused-tests
  • no-identical-title
  • no-test-prefixes
  • prefer-hooks-in-order
  • valid-describe-callback
  • valid-expect

Adding in this PR

  • max-expects
  • max-nested-describe
  • no-conditional-expect
  • no-conditional-in-test
  • no-duplicate-hooks
  • no-hooks
  • no-interpolation-in-snapshots
  • no-restricted-jest-methods: I have doubts here see my comment in the vitest-eslint-plugin issue
  • no-restricted-matchers
  • no-standalone-expect
  • no-test-return-statement
  • prefer-comparison-matcher
  • prefer-each
  • prefer-equality-matcher
  • prefer-expect-resolves
  • prefer-hooks-on-top
  • prefer-lowercase-title
  • prefer-mock-promise-shorthand
  • prefer-strict-equal
  • prefer-to-be
  • prefer-to-have-length
  • prefer-todo
  • require-to-throw-message
  • require-top-level-describe

@Afsoon Afsoon requested a review from camc314 as a code owner December 10, 2025 07:14
@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Dec 10, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 10, 2025

CodSpeed Performance Report

Merging #16679 will not alter performance

Comparing Afsoon:12-10-improve-vitest-compatible-rules-doc (214d561) with main (8babdf9)

Summary

✅ 4 untouched
⏩ 41 skipped1

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Afsoon Afsoon changed the title docs(linter): Added in the missing jest rule that are compatible with vitest. docs(linter): Added in the missing jest rules that are compatible with vitest. Dec 10, 2025
Copy link
Copy Markdown
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

Thank you!

@camc314 camc314 self-assigned this Dec 10, 2025
@camc314 camc314 merged commit 397bcd5 into oxc-project:main Dec 10, 2025
22 checks passed
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
…h vitest. (#16679)

After the review @connorshea did in
#16540 (review),
suggested to me add a missing part of documentation in the linter rule.
I hadn't added it because the reference rule I used lack of it.

So this PR aims to add it in all jest rules stated as compatible.

## Before this PR

The following Jest linter only had this documentation part:

- consistent-test-it
- expect-expect
- no-alias-methods
- no-commented-out-tests
- no-disabled-tests
- no-focused-tests
- no-identical-title
- no-test-prefixes
- prefer-hooks-in-order
- valid-describe-callback
- valid-expect

## Adding in this PR

- max-expects
- max-nested-describe
- no-conditional-expect
- no-conditional-in-test
- no-duplicate-hooks
- no-hooks
- no-interpolation-in-snapshots
- no-restricted-jest-methods: I have doubts here see my comment in the
[vitest-eslint-plugin
issue](#4656 (comment))
- no-restricted-matchers
- no-standalone-expect
- no-test-return-statement
- prefer-comparison-matcher
- prefer-each
- prefer-equality-matcher
- prefer-expect-resolves
- prefer-hooks-on-top
- prefer-lowercase-title
- prefer-mock-promise-shorthand
- prefer-strict-equal
- prefer-to-be
- prefer-to-have-length
- prefer-todo
- require-to-throw-message
- require-top-level-describe
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…h vitest. (oxc-project#16679)

After the review @connorshea did in
oxc-project#16540 (review),
suggested to me add a missing part of documentation in the linter rule.
I hadn't added it because the reference rule I used lack of it.

So this PR aims to add it in all jest rules stated as compatible.

## Before this PR

The following Jest linter only had this documentation part:

- consistent-test-it
- expect-expect
- no-alias-methods
- no-commented-out-tests
- no-disabled-tests
- no-focused-tests
- no-identical-title
- no-test-prefixes
- prefer-hooks-in-order
- valid-describe-callback
- valid-expect

## Adding in this PR

- max-expects
- max-nested-describe
- no-conditional-expect
- no-conditional-in-test
- no-duplicate-hooks
- no-hooks
- no-interpolation-in-snapshots
- no-restricted-jest-methods: I have doubts here see my comment in the
[vitest-eslint-plugin
issue](oxc-project#4656 (comment))
- no-restricted-matchers
- no-standalone-expect
- no-test-return-statement
- prefer-comparison-matcher
- prefer-each
- prefer-equality-matcher
- prefer-expect-resolves
- prefer-hooks-on-top
- prefer-lowercase-title
- prefer-mock-promise-shorthand
- prefer-strict-equal
- prefer-to-be
- prefer-to-have-length
- prefer-todo
- require-to-throw-message
- require-top-level-describe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants