Skip to content

fix(linter): merge env from extended config files#20088

Draft
Sysix wants to merge 1 commit intomainfrom
03-06-fix_linter_merge_env_from_extended_config_files
Draft

fix(linter): merge env from extended config files#20088
Sysix wants to merge 1 commit intomainfrom
03-06-fix_linter_merge_env_from_extended_config_files

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Mar 6, 2026

closes #20087
POC: need to check if everything is fine, specially with globals

Copy link
Member Author

Sysix commented Mar 6, 2026


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 A-cli Area - CLI C-bug Category - Bug labels Mar 6, 2026
@Sysix Sysix force-pushed the 03-06-fix_linter_merge_env_from_extended_config_files branch 4 times, most recently from e560f76 to 683efae Compare March 6, 2026 19:52
@Sysix Sysix requested a review from Copilot March 6, 2026 19:54
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 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::merge to merge env from extended configs, with the current config taking precedence.
  • Add an OxlintEnv::merge helper to support merging env maps.
  • Add a CLI fixture + snapshot test to validate env inheritance 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/[email protected] 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 6, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 52 skipped benchmarks1


Comparing 03-06-fix_linter_merge_env_from_extended_config_files (702d3f8) with main (e8547cc)2

Open in CodSpeed

Footnotes

  1. 52 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.

  2. No successful run was found on main (2c0010a) during the generation of this report, so e8547cc was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Sysix Sysix force-pushed the 03-06-fix_linter_merge_env_from_extended_config_files branch from 683efae to 702d3f8 Compare March 6, 2026 20:09
@Sysix Sysix requested a review from Copilot March 6, 2026 20:10
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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: env config is not inherited when using extends

2 participants