Skip to content

Comments

refactor(linter/plugins): simplify ser/deser of ExternalPluginEntry#17019

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_
Dec 17, 2025
Merged

refactor(linter/plugins): simplify ser/deser of ExternalPluginEntry#17019
graphite-app[bot] merged 1 commit intomainfrom
12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 17, 2025

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

Copy link
Member Author

overlookmotel commented Dec 17, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 17, 2025
@overlookmotel overlookmotel marked this pull request as ready for review December 17, 2025 19:22
Copilot AI review requested due to automatic review settings December 17, 2025 19:22
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 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_plugins function and its associated visitor logic
  • Simplified serde attributes on fields using external_plugins by removing the custom deserialize_with parameter
  • Updated imports to remove unused references to the removed function
  • Cleaned up unused imports (fmt, rustc_hash::FxHashSet from 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-hq
Copy link

codspeed-hq bot commented Dec 17, 2025

CodSpeed Performance Report

Merging #17019 will not alter performance

Comparing 12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_ (a6004b2) with main (674dab9)

Summary

✅ 4 untouched
⏩ 41 skipped1

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.

@graphite-app graphite-app bot changed the base branch from 12-17-fix_linter_plugins_fix_indentation_in_error_message to graphite-base/17019 December 17, 2025 21:15
@graphite-app graphite-app bot force-pushed the 12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_ branch from cc98a49 to a32dba3 Compare December 17, 2025 21:22
@graphite-app graphite-app bot force-pushed the graphite-base/17019 branch from b54c467 to 674dab9 Compare December 17, 2025 21:22
@graphite-app graphite-app bot changed the base branch from graphite-base/17019 to main December 17, 2025 21:23
@graphite-app graphite-app bot force-pushed the 12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_ branch from a32dba3 to a6004b2 Compare December 17, 2025 21:23
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 17, 2025
Copy link
Contributor

camc314 commented Dec 17, 2025

Merge activity

…#17019)

Follow-on after #15569. Simplify serialization/deserialization of `ExternalPluginEntry`. Since we now have a type for this, there's no need for `deserialize_external_plugins` any more.
@graphite-app graphite-app bot force-pushed the 12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_ branch from a6004b2 to e2537db Compare December 17, 2025 23:09
@graphite-app graphite-app bot merged commit e2537db into main Dec 17, 2025
20 checks passed
@graphite-app graphite-app bot deleted the 12-17-refactor_linter_plugins_simplify_ser_deser_of_externalpluginentry_ branch December 17, 2025 23:14
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 17, 2025
qinyuhang pushed a commit to qinyuhang/oxc that referenced this pull request Jan 22, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants