Skip to content

refactor(linter): share config loading logic between lsp/cli#18672

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli
Jan 29, 2026
Merged

refactor(linter): share config loading logic between lsp/cli#18672
graphite-app[bot] merged 1 commit intomainfrom
c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jan 28, 2026

these both do very similar things, this just helps align them to reduce some duplication with js config support.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Jan 28, 2026
Copy link
Contributor Author

camc314 commented Jan 28, 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.

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

Refactors oxlint configuration loading to centralize shared logic between the LSP and CLI paths.

Changes:

  • Introduces a new ConfigLoader module to parse/build configs and report errors uniformly.
  • Updates LSP nested-config discovery to use ConfigLoader::load_many.
  • Updates CLI nested-config loading to use ConfigLoader, simplifying config construction and error handling.

Reviewed changes

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

File Description
apps/oxlint/src/lsp/server_linter.rs Switches LSP nested config discovery/loading to the shared ConfigLoader.
apps/oxlint/src/lint.rs Switches CLI nested config loading to the shared ConfigLoader and adjusts parameter types to slices.
apps/oxlint/src/lib.rs Registers the new config_loader module.
apps/oxlint/src/config_loader.rs Adds shared config loading implementation and error types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@camc314 camc314 force-pushed the c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli branch from 9392bdd to fff2a9f Compare January 28, 2026 19:51
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jan 29, 2026
Copy link
Contributor Author

camc314 commented Jan 29, 2026

Merge activity

these both do very similar things, this just helps align them to reduce some duplication with js config support.
@graphite-app graphite-app bot force-pushed the c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli branch from fff2a9f to a88ed23 Compare January 29, 2026 09:21
@graphite-app graphite-app bot merged commit a88ed23 into main Jan 29, 2026
20 checks passed
@graphite-app graphite-app bot deleted the c/01-28-refactor_linter_share_config_loading_logic_between_lsp_cli branch January 29, 2026 09:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 29, 2026
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-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants