refactor(parser): move duplicate_default_export diagnostic to diagnostics mod#17557
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. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the parser code to move the duplicate_default_export diagnostic creation from inline code in module_record.rs to a dedicated function in the diagnostics.rs module, improving code organization and consistency.
Key changes:
- Extracted inline diagnostic creation into a reusable
duplicate_default_exportfunction in the diagnostics module
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/oxc_parser/src/module_record.rs | Replaced inline OxcDiagnostic::error() call with diagnostics::duplicate_default_export() function call |
| crates/oxc_parser/src/diagnostics.rs | Added new duplicate_default_export diagnostic function following established patterns with #[cold] attribute |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #17557 will not alter performanceComparing Summary
Footnotes
|
Merge activity
|
2f81c86 to
1cd2b1f
Compare

No description provided.