-
-
Notifications
You must be signed in to change notification settings - Fork 737
feat(linter/eslint-plugin-vitest): reuse no-mocks-import jest linter rule #16540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #16540 will not alter performanceComparing Summary
Footnotes
|
|
|
||
| /// List of Jest rules that have Vitest equivalents. | ||
| // When adding a new rule to this list, please ensure oxlint-migrate is also updated. | ||
| // See https://github.com/oxc-project/oxlint-migrate/blob/2c336c67d75adb09a402ae66fb3099f1dedbe516/scripts/constants.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should make sure to open a PR to oxlint-migrate if we end up merging this one
connorshea
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs block in the declare_oxc_lint! should be updated to mention that this rule is compatible with Vitest as well. (we should probably consider auto-generating something in the docs for these cases as well, honestly, but for now this is how it is done).
Other rules have a note like so:
/// This rule is compatible with [eslint-plugin-vitest](https://github.com/veritem/eslint-plugin-vitest/blob/v1.1.9/docs/rules/no-alias-methods.md),
/// to use it, add the following configuration to your `.oxlintrc.json`:
///
/// ```json
/// {
/// "rules": {
/// "vitest/no-alias-methods": "error"
/// }
/// }
/// ```
daea57d to
3ad66ee
Compare
|
@connorshea Added missing dock blocks and update the PR description to point the
Just FYI, some compatibles vitest rule are missing that doc block, for example |
Good point, if you want to open a PR for that change, I'd be happy to review/merge that :) |
Related to #4656
Implement no-mocks-import lint ruler adding a new entry in the mapping between jest and vitest compatible rules.
Oxlint-migrate PR related: oxc-project/oxlint-migrate#269