Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): support env and globals in overrides configuration #8915

Conversation

Sysix
Copy link
Collaborator

@Sysix Sysix commented Feb 5, 2025

This PR supports env and globals keys in overrides[x].

I added tests where I could. Snapshot CLI tests are working 🥳

@github-actions github-actions bot added the A-linter Area - Linter label Feb 5, 2025
Copy link
Collaborator Author

Sysix commented Feb 5, 2025


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 the C-enhancement Category - New feature or request label Feb 5, 2025
Copy link

codspeed-hq bot commented Feb 5, 2025

CodSpeed Performance Report

Merging #8915 will not alter performance

Comparing 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration (5d508a4) with main (ec601f2)

Summary

✅ 33 untouched benchmarks

@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch 3 times, most recently from 53aa4f7 to 12beab8 Compare February 6, 2025 19:53
@github-actions github-actions bot added the A-cli Area - CLI label Feb 6, 2025
@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch 2 times, most recently from 6b81a59 to da5fdd4 Compare February 6, 2025 20:01
@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch 2 times, most recently from a30a177 to e5fe2a0 Compare February 8, 2025 14:43
@Sysix Sysix changed the base branch from main to 02-07-fix_linter_no-global-assign_look_for_globals_entry_too February 8, 2025 14:43
@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch from e5fe2a0 to 4c309f2 Compare February 8, 2025 14:47
@Sysix Sysix force-pushed the 02-07-fix_linter_no-global-assign_look_for_globals_entry_too branch from 7b10cad to 5d5278d Compare February 8, 2025 15:00
@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch from 4c309f2 to 403a65e Compare February 8, 2025 15:00
@Boshen Boshen changed the base branch from 02-07-fix_linter_no-global-assign_look_for_globals_entry_too to graphite-base/8915 February 8, 2025 15:07
@Boshen Boshen force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch from 403a65e to b71faf1 Compare February 8, 2025 15:18
@Boshen Boshen force-pushed the graphite-base/8915 branch from 5d5278d to b191390 Compare February 8, 2025 15:18
@Boshen Boshen changed the base branch from graphite-base/8915 to main February 8, 2025 15:19
@Boshen Boshen force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch from b71faf1 to a495142 Compare February 8, 2025 15:19
@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch 2 times, most recently from 39436fa to 0f3cbea Compare February 8, 2025 15:40
@Sysix Sysix changed the title feat(linter): allow env and globals in overrides configuration feat(linter): support env and globals in overrides configuration Feb 8, 2025
@Sysix Sysix marked this pull request as ready for review February 8, 2025 15:49
@Boshen Boshen requested a review from camchenry February 9, 2025 01:15
Copy link
Contributor

@camchenry camchenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

some small test suggestions, but feel free to merge and address later as you see fit

crates/oxc_linter/src/config/env.rs Show resolved Hide resolved
crates/oxc_linter/src/config/globals.rs Show resolved Hide resolved
crates/oxc_linter/src/config/overrides.rs Outdated Show resolved Hide resolved
@Sysix Sysix force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch from 0f3cbea to 4957d56 Compare February 9, 2025 11:14
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 9, 2025
Copy link
Member

Boshen commented Feb 9, 2025

Merge activity

  • Feb 9, 7:40 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 9, 7:40 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 9, 7:45 AM EST: A user merged this pull request with the Graphite merge queue.

#8915)

This PR supports `env` and `globals` keys in `overrides[x]`.

I added tests where I could. Snapshot CLI tests are working 🥳
@graphite-app graphite-app bot force-pushed the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch from 4957d56 to 5d508a4 Compare February 9, 2025 12:41
@graphite-app graphite-app bot merged commit 5d508a4 into main Feb 9, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-05-feat_linter_allow_env_and_globals_in_overrides_configuration branch February 9, 2025 12:45
Dunqing pushed a commit that referenced this pull request Feb 10, 2025
#8915)

This PR supports `env` and `globals` keys in `overrides[x]`.

I added tests where I could. Snapshot CLI tests are working 🥳
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-cli Area - CLI A-linter Area - Linter C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants