refactor(linter): extract vite lint config in JS loader#20228
refactor(linter): extract vite lint config in JS loader#20228
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. |
ac0b786 to
4a9c448
Compare
4a9c448 to
b396df5
Compare
There was a problem hiding this comment.
Pull request overview
Refactors Vite config handling so that vite.config.ts is interpreted on the JS side by extracting the .lint field before sending the config payload back to Rust, rather than doing .lint extraction in the Rust JSON response parser.
Changes:
- Move Vite
.lintfield extraction from Rust (parse_js_config_response) into the Node/TS loader (loadJsConfigs). - Adjust fixture snapshot to reflect new behavior when a
vite.config.tshas no.lintfield (now lints with defaults instead of failing config parse). - Add a Rust unit test ensuring
parse_js_config_responseaccepts the new “already-extracted” payload shape.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/oxlint/test/fixtures/vite_config_no_lint_field/output.snap.md | Updates expected output for the “no lint field” Vite fixture to match new loader semantics. |
| apps/oxlint/src/lib.rs | Removes the no-longer-needed VITE_OXLINT_CONFIG_FIELD constant. |
| apps/oxlint/src/js_config.rs | Removes Vite-specific .lint extraction during Rust-side parsing; adds a regression test for the new payload shape. |
| apps/oxlint/src-js/js_config.ts | Implements Vite .lint extraction in the JS loader and runs extends validation on the extracted object. |
You can also share your feedback on Copilot code review. Take the survey.

No description provided.