Skip to content

refactor(linter): extract reusable config discovery helper#21640

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/04-22-refactor_linter_extract_reusable_config_discovery_helper
Apr 22, 2026
Merged

refactor(linter): extract reusable config discovery helper#21640
graphite-app[bot] merged 1 commit intomainfrom
c/04-22-refactor_linter_extract_reusable_config_discovery_helper

Conversation

@camc314
Copy link
Copy Markdown
Contributor

@camc314 camc314 commented Apr 22, 2026

No description provided.

Copy link
Copy Markdown
Contributor Author

camc314 commented Apr 22, 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 changes, fast-track this PR to the front of 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.

@graphite-app graphite-app Bot changed the base branch from c/04-22-feat_linter_support_nested_vite_config_discovery to graphite-base/21640 April 22, 2026 16:13
@graphite-app graphite-app Bot force-pushed the c/04-22-refactor_linter_extract_reusable_config_discovery_helper branch from dac94c8 to e978e6a Compare April 22, 2026 16:24
@graphite-app graphite-app Bot force-pushed the graphite-base/21640 branch from 1c7a595 to 63ec351 Compare April 22, 2026 16:24
@graphite-app graphite-app Bot changed the base branch from graphite-base/21640 to main April 22, 2026 16:25
@graphite-app graphite-app Bot force-pushed the c/04-22-refactor_linter_extract_reusable_config_discovery_helper branch from e978e6a to 2fc70db Compare April 22, 2026 16:25
@camc314 camc314 force-pushed the c/04-22-refactor_linter_extract_reusable_config_discovery_helper branch 2 times, most recently from 4530ee7 to ca4e3b0 Compare April 22, 2026 16:34
@camc314 camc314 marked this pull request as ready for review April 22, 2026 16:38
@camc314 camc314 requested a review from overlookmotel as a code owner April 22, 2026 16:38
Copilot AI review requested due to automatic review settings April 22, 2026 16:38
Copy link
Copy Markdown
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 refactors oxlint’s configuration file discovery by extracting reusable discovery logic into a dedicated helper, and updates expected diagnostic output to match the new behavior.

Changes:

  • Introduces ConfigDiscovery + ConfigFileNames to centralize config file matching and conflict detection.
  • Refactors config_loader to use the new helper for directory scanning and single-config selection.
  • Updates a fixture snapshot to reflect changed ordering in the conflict diagnostic.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
apps/oxlint/test/fixtures/js_config_nested_conflict/output.snap.md Updates expected conflict message output order in the fixture snapshot.
apps/oxlint/src/config_loader.rs Replaces inline config-discovery logic with calls to ConfigDiscovery (including unique-config selection).
apps/oxlint/src/config_discovery.rs Adds reusable discovery structs and adjusts conflict message generation (test-only sorting).

Comment thread apps/oxlint/src/config_loader.rs
Comment thread apps/oxlint/src/config_discovery.rs
@camc314 camc314 self-assigned this Apr 22, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Apr 22, 2026
Copy link
Copy Markdown
Contributor Author

camc314 commented Apr 22, 2026

Merge activity

@graphite-app graphite-app Bot force-pushed the c/04-22-refactor_linter_extract_reusable_config_discovery_helper branch from c371af9 to 9c4815f Compare April 22, 2026 16:49
@graphite-app graphite-app Bot merged commit 9c4815f into main Apr 22, 2026
25 checks passed
@graphite-app graphite-app Bot deleted the c/04-22-refactor_linter_extract_reusable_config_discovery_helper branch April 22, 2026 16:59
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants