refactor(linter): introduce ConfigConflict struct for conflicting config files#21635
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 22, 2026
Conversation
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors oxlint’s config-loading error reporting by introducing a ConfigConflict struct to represent and convert conflicting config-file discoveries into a single user-facing diagnostic.
Changes:
- Added
ConfigConflict(andFrom<ConfigConflict> for OxcDiagnostic) inconfig_discovery.rs. - Updated
ConfigLoaderto constructConfigConflictinstead of calling the removedconfig_conflict_diagnostichelper. - Removed the old conflict diagnostic formatting function from
config_loader.rs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/oxlint/src/config_loader.rs | Constructs ConfigConflict on multi-config discovery; removes inline diagnostic helper. |
| apps/oxlint/src/config_discovery.rs | Adds ConfigConflict struct + diagnostic conversion and shared conflict-name formatting. |
04bbb33 to
ad793d9
Compare
a2b9445 to
74014cc
Compare
74014cc to
e9bda23
Compare
ad793d9 to
feaf85c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors oxlint’s configuration conflict diagnostics by introducing a dedicated ConfigConflict type in config discovery and reusing it from the config loader to report “multiple config files in one directory” errors consistently.
Changes:
- Added
ConfigConflictstruct +From<ConfigConflict> for OxcDiagnosticconversion in config discovery. - Updated config loading paths to collect conflicting
DiscoveredConfigFiles and emit the new conflict diagnostic. - Removed the legacy
config_conflict_diagnostichelper fromconfig_loader.rs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/oxlint/src/config_loader.rs | Switches conflict detection to build a ConfigConflict from discovered paths and converts it into an OxcDiagnostic. |
| apps/oxlint/src/config_discovery.rs | Introduces ConfigConflict and centralized formatting of conflict diagnostics. |
Base automatically changed from
c/04-22-refactor_oxlint_split_discoveredconfigfile_into_it_s_own_module
to
main
April 22, 2026 09:55
e9bda23 to
921af18
Compare
Contributor
Author
Merge activity
|
921af18 to
be46a91
Compare
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

No description provided.