docs(linter): Improve prefer-spread docs.#17976
Conversation
There was a problem hiding this comment.
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 Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
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.
78edab4 to
132cc48
Compare
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.