Skip to content

docs(linter): prefer enum docs over struct field docs for no-unused-vars#18123

Merged
graphite-app[bot] merged 1 commit intomainfrom
docs/no-unused-vars-dedupe-enum-docs
Jan 17, 2026
Merged

docs(linter): prefer enum docs over struct field docs for no-unused-vars#18123
graphite-app[bot] merged 1 commit intomainfrom
docs/no-unused-vars-dedupe-enum-docs

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Jan 17, 2026

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

  • cargo test -p oxc_linter -- no_unused_vars passes
  • cargo test -p website_linter passes

🤖 Generated with Claude Code

@Boshen Boshen requested a review from camc314 as a code owner January 17, 2026 08:15
Copilot AI review requested due to automatic review settings January 17, 2026 08:15
@github-actions github-actions bot added A-linter Area - Linter C-docs Category - Documentation. Related to user-facing or internal documentation labels Jan 17, 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 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 CaughtErrorsJson enum variants (All and None)
  • 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 17, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 41 skipped benchmarks1


Comparing docs/no-unused-vars-dedupe-enum-docs (799b1c8) with main (a89b245)2

Open in CodSpeed

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.

  2. No successful run was found on main (8d292b7) during the generation of this report, so a89b245 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@connorshea connorshea added the 0-merge Merge with Graphite Merge Queue label Jan 17, 2026
Copy link
Member

connorshea commented Jan 17, 2026

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)
@graphite-app graphite-app bot force-pushed the docs/no-unused-vars-dedupe-enum-docs branch from 799b1c8 to 85a846c Compare January 17, 2026 18:22
@graphite-app graphite-app bot merged commit 85a846c into main Jan 17, 2026
21 checks passed
@graphite-app graphite-app bot deleted the docs/no-unused-vars-dedupe-enum-docs branch January 17, 2026 18:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 17, 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.

website: duplicated documentation for enum config values in lint rule docs

3 participants