feat(linter/vitest): prefer-mock-return-shorthand rule vitest compatible#330
Closed
Afsoon wants to merge 1 commit intooxc-project:mainfrom
Closed
feat(linter/vitest): prefer-mock-return-shorthand rule vitest compatible#330Afsoon wants to merge 1 commit intooxc-project:mainfrom
Afsoon wants to merge 1 commit intooxc-project:mainfrom
Conversation
Member
|
With #344, this is synced automatically now. So this change will happen automatically once the rule list is updated in the oxc repo. Thanks! |
camc314
added a commit
to oxc-project/oxc
that referenced
this pull request
Feb 19, 2026
…shorthand (#18002) Related to #492 and #4656 The implementation is based on `vitest` as it's more simple and cover all jest and vitest test cases. Jest - [Docs](https://github.com/jest-community/eslint-plugin-jest/blob/v29.12.1/docs/rules/prefer-mock-return-shorthand.md) - [Source Code](https://github.com/jest-community/eslint-plugin-jest/blob/v29.12.1/src/rules/prefer-mock-return-shorthand.ts) - [Test](https://github.com/jest-community/eslint-plugin-jest/blob/v29.12.1/src/rules/__tests__/prefer-mock-return-shorthand.test.ts) Vitest - [Docs](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md) - [Source Code](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/src/rules/prefer-mock-return-shorthand.ts) - [Test](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/tests/prefer-mock-return-shorthand.test.ts) Oxlint migrate PR: oxc-project/oxlint-migrate#330 Eslint-plugin-oxlint PR: oxc-project/eslint-plugin-oxlint#607 --------- Co-authored-by: Cameron Clark <cameron.clark@hey.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on: oxc-project/oxc#18002