Skip to content

docs(linter): Fix typo and add vitest compatibility note to prefer_to_contain rule documentation#16838

Merged
graphite-app[bot] merged 1 commit intomainfrom
copilot/address-pr-review-comment
Dec 14, 2025
Merged

docs(linter): Fix typo and add vitest compatibility note to prefer_to_contain rule documentation#16838
graphite-app[bot] merged 1 commit intomainfrom
copilot/address-pr-review-comment

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 14, 2025

Corrects documentation typo in the jest/prefer-to-contain rule and adds vitest compatibility information.

Changes:

  • Fixed typo in rule documentation: TThis rule triggersThis 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.

Original prompt

action this PR review comment #16836 (comment)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Address PR review comment for pull request 16836 Fix typo in prefer_to_contain rule documentation Dec 14, 2025
Copilot AI requested a review from camc314 December 14, 2025 15:52
@connorshea
Copy link
Copy Markdown
Member

@copilot Add a note like this to the rule docs for this rule, please:

    /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md),
    /// to use it, add the following configuration to your `.oxlintrc.json`:
    ///
    /// ```json
    /// {
    ///   "rules": {
    ///      "vitest/no-restricted-vi-methods": "error"
    ///   }
    /// }
    /// ```

Copy link
Copy Markdown
Member

@connorshea connorshea left a comment

Choose a reason for hiding this comment

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

Confirmed the link works, LGTM

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Dec 14, 2025

@copilot Add a note like this to the rule docs for this rule, please:

    /// This rule is compatible with [eslint-plugin-vitest](https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/doc...

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.

@github-actions github-actions bot added the A-linter Area - Linter label Dec 14, 2025
@connorshea connorshea changed the title Fix typo in prefer_to_contain rule documentation docs(linter): Add compatibility note in prefer_to_contain rule documentation Dec 14, 2025
@connorshea connorshea marked this pull request as ready for review December 14, 2025 15:58
Copilot AI review requested due to automatic review settings December 14, 2025 15:58
@github-actions github-actions bot added the C-docs Category - Documentation. Related to user-facing or internal documentation label Dec 14, 2025
Copilot AI changed the title docs(linter): Add compatibility note in prefer_to_contain rule documentation Fix typo and add vitest compatibility note to prefer_to_contain rule documentation Dec 14, 2025
Copy link
Copy Markdown

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

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

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. ### Compatibility or ### Notes) to clearly separate it.
Summary of changes

Summary of changes

  • Fixed a documentation typo in prefer_to_contain rule docs: TThisThis.
  • 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.json configuration enabling vitest/prefer-to-contain.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@connorshea connorshea changed the title Fix typo and add vitest compatibility note to prefer_to_contain rule documentation docs(linter): Fix typo and add vitest compatibility note to prefer_to_contain rule documentation Dec 14, 2025
@connorshea connorshea added the 0-merge Merge with Graphite Merge Queue label Dec 14, 2025
Copy link
Copy Markdown
Member

connorshea commented Dec 14, 2025

Merge activity

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Dec 14, 2025

CodSpeed Performance Report

Merging #16838 will not alter performance

Comparing copilot/address-pr-review-comment (4bb796e) with main (652a2bf)

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.

…_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.
@graphite-app graphite-app bot force-pushed the copilot/address-pr-review-comment branch from 4bb796e to 4542e75 Compare December 14, 2025 16:07
@graphite-app graphite-app bot merged commit 4542e75 into main Dec 14, 2025
20 checks passed
@graphite-app graphite-app bot deleted the copilot/address-pr-review-comment branch December 14, 2025 16:12
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 14, 2025
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.

4 participants