Skip to content

feat(eslint-plugin-jest): Add fix capabilities to prefer to contain rule#16809

Merged
camc314 merged 5 commits intooxc-project:mainfrom
Afsoon:12_13_update_jest_prefer_to_contain_to_be_fixable
Dec 14, 2025
Merged

feat(eslint-plugin-jest): Add fix capabilities to prefer to contain rule#16809
camc314 merged 5 commits intooxc-project:mainfrom
Afsoon:12_13_update_jest_prefer_to_contain_to_be_fixable

Conversation

@Afsoon
Copy link
Copy Markdown
Contributor

@Afsoon Afsoon commented Dec 13, 2025

Currently oxclint can't fix any prefer-to-contain error, but the jest eslint rule can, also this will be helpful to vitest.

Any alternative for the trailing comma check are welcome. None of my global searched in the codebase lead to an example, only to check if a trailing comma exists.

@Afsoon Afsoon requested a review from camc314 as a code owner December 13, 2025 18:56
@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Dec 13, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 13, 2025

CodSpeed Performance Report

Merging #16809 will not alter performance

Comparing Afsoon:12_13_update_jest_prefer_to_contain_to_be_fixable (e566c62) with main (1bdaab1)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (b1d6bac) during the generation of this report, so 1bdaab1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 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.

@camc314 camc314 self-assigned this Dec 14, 2025
@camc314 camc314 force-pushed the 12_13_update_jest_prefer_to_contain_to_be_fixable branch from 97a8468 to e566c62 Compare December 14, 2025 14:10
@camc314 camc314 merged commit 8bb67a6 into oxc-project:main Dec 14, 2025
20 checks passed
@camc314
Copy link
Copy Markdown
Contributor

camc314 commented Dec 14, 2025

Any alternative for the trailing comma check are welcome. None of my global searched in the codebase lead to an example, only to check if a trailing comma exists.

we shouldn't care too much about formatting of fixed code, users should run their formatter over the fixed code anyway. I removed this logic as it toofrequently detects the commas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants