docs(linter): prefer enum docs over struct field docs for no-unused-vars#18123
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors documentation for the no-unused-vars linter rule by moving enum variant descriptions from struct field comments to the enum variants themselves, eliminating duplication.
Changes:
- Removed duplicated documentation from three struct fields (
vars,args,caught_errors) that described enum variant behavior - Added missing documentation to
CaughtErrorsJsonenum variants (AllandNone) - Updated website documentation snapshot to reflect the new documentation structure with variant-specific sections
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/oxc_linter/src/rules/eslint/no_unused_vars/options.rs | Removed redundant struct field documentation and added missing docs to CaughtErrorsJson enum variants |
| tasks/website_linter/src/rules/snapshots/docs_rule_pages.snap | Updated to show individual variant documentation sections instead of aggregated descriptions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
…ars (#18123) ## Summary - Remove duplicated documentation from struct field comments that was already present on enum variants - Add missing docs to `CaughtErrorsJson` enum variants - Update website docs snapshot Closes #17937 ## Test plan - [x] `cargo test -p oxc_linter -- no_unused_vars` passes - [x] `cargo test -p website_linter` passes 🤖 Generated with [Claude Code](https://claude.ai/code)
799b1c8 to
85a846c
Compare
Summary
CaughtErrorsJsonenum variantsCloses #17937
Test plan
cargo test -p oxc_linter -- no_unused_varspassescargo test -p website_linterpasses🤖 Generated with Claude Code