Skip to content

docs(linter): Improve prefer-spread docs.#17976

Merged
graphite-app[bot] merged 1 commit intomainfrom
spread-docs
Jan 14, 2026
Merged

docs(linter): Improve prefer-spread docs.#17976
graphite-app[bot] merged 1 commit intomainfrom
spread-docs

Conversation

@connorshea
Copy link
Member

And diagnostic.

The rule previously said it was a merging of two rules, but we support the other rule as well, so that doens't really make sense.

@connorshea connorshea requested a review from camc314 as a code owner January 14, 2026 01:22
Copilot AI review requested due to automatic review settings January 14, 2026 01:22
@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Jan 14, 2026
Copy link
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 improves the documentation and diagnostic messages for the prefer-spread linter rule. The changes remove the outdated claim that this rule is a combination of two separate rules and update the messaging to be more concise and consistent.

Changes:

  • Updated diagnostic message from "Require spread operators instead of .apply()" to "Use spread operators instead of .apply()."
  • Removed the documentation statement claiming the rule combines two ESLint rules
  • Improved code formatting in documentation by adding backticks around .apply()

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crates/oxc_linter/src/snapshots/eslint_prefer_spread.snap Updated all diagnostic messages in test snapshots to reflect the new wording
crates/oxc_linter/src/rules/eslint/prefer_spread.rs Updated the diagnostic function and documentation comments to improve clarity and accuracy

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 14, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing spread-docs (78edab4) with main (bbadb8e)

Summary

✅ 4 untouched benchmarks
⏩ 41 skipped benchmarks1

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.

@camc314 camc314 self-assigned this Jan 14, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
Copy link
Contributor

camc314 commented Jan 14, 2026

Merge activity

And diagnostic.

The rule previously said it was a merging of two rules, but we support the other rule as well, so that doens't really make sense.
@graphite-app graphite-app bot merged commit 132cc48 into main Jan 14, 2026
20 checks passed
@graphite-app graphite-app bot deleted the spread-docs branch January 14, 2026 11:59
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 14, 2026
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.

3 participants