fix(linter): merge env from extended config files#20088
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
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. |
e560f76 to
683efae
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes Oxlint config resolution so that env values are inherited from extended (extends) configuration files, addressing missing globals when env was defined only in a base config.
Changes:
- Update
Oxlintrc::mergeto mergeenvfrom extended configs, with the current config taking precedence. - Add an
OxlintEnv::mergehelper to support merging env maps. - Add a CLI fixture + snapshot test to validate
envinheritance and override behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/oxc_linter/src/config/oxlintrc.rs | Merge env from extended configs instead of ignoring it. |
| crates/oxc_linter/src/config/env.rs | Add OxlintEnv::merge to combine environment maps. |
| apps/oxlint/src/lint.rs | Add a regression test that runs the new extends_env fixture. |
| apps/oxlint/src/snapshots/fixtures__cli__extends_env_@oxlint.snap | Snapshot asserting only the override case reports console as undefined. |
| apps/oxlint/fixtures/cli/extends_env/** | New fixture configs/files covering inheritance + override of env. |
Merging this PR will not alter performance
Comparing Footnotes
|
683efae to
702d3f8
Compare
702d3f8 to
225cd82
Compare
225cd82 to
eb639a1
Compare
c2d4fb9 to
ccf8d18
Compare
eb639a1 to
66d0c24
Compare
ccf8d18 to
f75f83c
Compare
f75f83c to
58a1a9c
Compare
58a1a9c to
7f99530
Compare
66d0c24 to
1451935
Compare

closes #20087
✅
POC: need to check if everything is fine, specially withglobals