refactor(napi/oxlint): move external linter construction into own module#13710
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 external linter construction code by moving the wrap_* functions from lib.rs into a separate external_linter.rs module. The refactor creates a single create_external_linter function that encapsulates both JS callback wrapping operations.
- Moved external linter wrapper functions to a dedicated module
- Added a convenience function to create external linter instances
- Simplified the main
lintfunction by delegating construction logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| napi/oxlint/src/lib.rs | Removed external linter construction code and simplified imports, added module declaration and delegation to new module |
| napi/oxlint/src/external_linter.rs | New module containing all external linter construction logic moved from lib.rs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
94673db to
079c2f2
Compare

Pure refactor. Move
wrap_*functions into separateexternal_linter.rsmodule, and add acreate_external_linterfunction which wraps both JS callbacks.This is necessary so we can feature gate loading the module (next PR #13711).