feat(linter): add suggestion fix for unicorn/require-module-attributes#17168
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
902e292 to
bc27fab
Compare
Merge activity
|
There was a problem hiding this comment.
Pull request overview
This PR adds auto-fix suggestions to the unicorn/require-module-attributes linter rule, enabling automatic removal of empty import/export attribute lists. The rule now provides actionable fixes instead of just reporting violations.
Key Changes
- Upgraded rule category from
pendingtosuggestionto reflect the new fix capability - Added fix logic for both import/export statements with empty
with {}clauses and import expressions with empty or empty-withproperty objects - Added comprehensive test cases covering various scenarios including trailing commas, comments, and property positioning
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/oxc_linter/src/rules/unicorn/require_module_attributes.rs | Implements auto-fix logic for removing empty attribute lists, adds helper function for property removal, includes comprehensive test cases |
| crates/oxc_linter/src/snapshots/unicorn_require_module_attributes.snap | Updates snapshot to include help messages for all diagnostic instances |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
crates/oxc_linter/src/rules/unicorn/require_module_attributes.rs
Outdated
Show resolved
Hide resolved
CodSpeed Performance ReportMerging #17168 will not alter performanceComparing Summary
Footnotes
|
a7e6e6c to
553a391
Compare
553a391 to
ffc1674
Compare

No description provided.