refactor(linter/plugins): add registerPlugin function#16210
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 plugin loading logic by extracting the synchronous plugin registration logic from the async loadPluginImpl function into a new registerPlugin function. This separation prepares the codebase for #16206, which will need to register plugins directly without importing them from a module.
Key changes:
- Renamed
loadPluginImpltoregisterPluginand made it synchronous - Moved plugin import and duplicate registration check into
loadPlugin - Updated JSDoc comments to reflect the new function signature
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1302f61 to
afc5df6
Compare
afc5df6 to
df85032
Compare
9f3caf6 to
c3526d7
Compare
df85032 to
54de704
Compare
c3526d7 to
be36e36
Compare
54de704 to
be3b9ee
Compare
be3b9ee to
832983a
Compare
b15c057 to
35ce097
Compare
Merge activity
|
Pure refactor. Move a few lines of code into `loadPlugin`, to leave a sync function `registerPlugin` which contains the logic for registering a plugin. Required for #16206, which will call this method directly, skipping `import`-ing the plugin from a module.
35ce097 to
c6245a4
Compare
…16210) Pure refactor. Move a few lines of code into `loadPlugin`, to leave a sync function `registerPlugin` which contains the logic for registering a plugin. Required for oxc-project#16206, which will call this method directly, skipping `import`-ing the plugin from a module.

Pure refactor. Move a few lines of code into
loadPlugin, to leave a sync functionregisterPluginwhich contains the logic for registering a plugin.Required for #16206, which will call this method directly, skipping
import-ing the plugin from a module.