refactor(linter/plugins): simplify ser/deser of ExternalPluginEntry#17019
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 serialization and deserialization of ExternalPluginEntry to simplify the code by removing the custom deserialize_external_plugins function. The refactoring leverages serde's built-in support for deserializing Option<FxHashSet<T>> where T implements Deserialize, since ExternalPluginEntry already has a custom Deserialize implementation that handles both string and object formats.
Key changes:
- Removed the
deserialize_external_pluginsfunction and its associated visitor logic - Simplified serde attributes on fields using
external_pluginsby removing the customdeserialize_withparameter - Updated imports to remove unused references to the removed function
- Cleaned up unused imports (
fmt,rustc_hash::FxHashSetfrom the main module)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
crates/oxc_linter/src/config/external_plugins.rs |
Removed deserialize_external_plugins function and unnecessary imports; improved documentation comments for the ExternalPluginEntry ser/deser implementations; simplified test configurations to use default serde behavior |
crates/oxc_linter/src/config/oxlintrc.rs |
Removed deserialize_external_plugins from imports and simplified serde attributes on the external_plugins field |
crates/oxc_linter/src/config/overrides.rs |
Removed deserialize_external_plugins from imports and simplified serde attributes on the external_plugins field |
The refactoring is well-tested and maintains the same behavior as before while reducing code complexity. No issues were identified during the review.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #17019 will not alter performanceComparing Summary
Footnotes
|
cc98a49 to
a32dba3
Compare
b54c467 to
674dab9
Compare
a32dba3 to
a6004b2
Compare
Merge activity
|
a6004b2 to
e2537db
Compare
…oxc-project#17019) Follow-on after oxc-project#15569. Simplify serialization/deserialization of `ExternalPluginEntry`. Since we now have a type for this, there's no need for `deserialize_external_plugins` any more.

Follow-on after #15569. Simplify serialization/deserialization of
ExternalPluginEntry. Since we now have a type for this, there's no need fordeserialize_external_pluginsany more.