docs(linter): Fix typo and add vitest compatibility note to prefer_to_contain rule documentation#16838
Conversation
|
@copilot Add a note like this to the rule docs for this rule, please: |
connorshea
left a comment
There was a problem hiding this comment.
Confirmed the link works, LGTM
Added the vitest compatibility note with the configuration example in commit 4bb796e. I used "vitest/prefer-to-contain" as the rule name to match this rule's functionality. |
There was a problem hiding this comment.
Docs change is correct and matches the requested Vitest compatibility note. The only improvements are minor doc-structure/readability tweaks (add a small compatibility heading) and making the JSON snippet indentation consistent for copy/paste.
Additional notes (1)
- Readability |
crates/oxc_linter/src/rules/jest/prefer_to_contain.rs:53-63
The added compatibility note is helpful, but it’s appended directly after the “correct” examples without a section header. In generated docs, this can read like it’s still part of the examples section. Consider adding a small heading (e.g.### Compatibilityor### Notes) to clearly separate it.
Summary of changes
Summary of changes
- Fixed a documentation typo in
prefer_to_containrule docs:TThis→This. - Added a new documentation note explaining compatibility with
eslint-plugin-vitest, including:- A link to Vitest’s corresponding rule doc (
prefer-to-contain). - An example
.oxlintrc.jsonconfiguration enablingvitest/prefer-to-contain.
- A link to Vitest’s corresponding rule doc (
There was a problem hiding this comment.
Pull request overview
This PR fixes a typo in the prefer_to_contain rule documentation and adds a vitest compatibility note with a configuration example. The changes improve the documentation clarity and help users understand how to use this rule with vitest.
Key Changes
- Fixed typo "TThis" → "This" in the rule documentation
- Added vitest compatibility note with JSON configuration example showing how to enable the rule as
vitest/prefer-to-contain
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
CodSpeed Performance ReportMerging #16838 will not alter performanceComparing Summary
Footnotes
|
…_contain rule documentation (#16838) Corrects documentation typo in the `jest/prefer-to-contain` rule and adds vitest compatibility information. **Changes:** - Fixed typo in rule documentation: `TThis rule triggers` → `This rule triggers` - Added vitest compatibility note with configuration example showing how to enable `vitest/prefer-to-contain` in `.oxlintrc.json` The vitest compatibility note follows the same format as other vitest-compatible rules in the codebase and includes a link to the eslint-plugin-vitest documentation. <!-- START COPILOT CODING AGENT SUFFIX --> <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > action this PR review comment #16836 (comment) </details> <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/oxc-project/oxc/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
4bb796e to
4542e75
Compare
Corrects documentation typo in the
jest/prefer-to-containrule and adds vitest compatibility information.Changes:
TThis rule triggers→This rule triggersvitest/prefer-to-containin.oxlintrc.jsonThe vitest compatibility note follows the same format as other vitest-compatible rules in the codebase and includes a link to the eslint-plugin-vitest documentation.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.