Skip to content

feat(oxfmt): Add --config-field CLI option#20138

Closed
leaysgur wants to merge 1 commit into03-09-feat_oxfmt_.js_.ts_config_file_supportfrom
03-09-feat_oxfmt_add_--config-field_cli_option
Closed

feat(oxfmt): Add --config-field CLI option#20138
leaysgur wants to merge 1 commit into03-09-feat_oxfmt_.js_.ts_config_file_supportfrom
03-09-feat_oxfmt_add_--config-field_cli_option

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Mar 9, 2026

NOTE: I'd like to merge this in sync with oxlint.

@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-enhancement Category - New feature or request labels Mar 9, 2026
Copy link
Member Author

leaysgur commented Mar 9, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@leaysgur leaysgur changed the title feat(oxfmt): Add --config-field CLI option feat(oxfmt): Add --config-field CLI option Mar 9, 2026
@leaysgur leaysgur force-pushed the 03-09-feat_oxfmt_add_--config-field_cli_option branch 2 times, most recently from feded2c to 4e6cca3 Compare March 9, 2026 07:25
@github-actions github-actions bot added the A-editor Area - Editor and Language Server label Mar 9, 2026
@leaysgur leaysgur marked this pull request as ready for review March 9, 2026 08:08
@leaysgur leaysgur requested review from Sysix and camc314 as code owners March 9, 2026 08:08
@leaysgur leaysgur force-pushed the 03-09-feat_oxfmt_add_--config-field_cli_option branch from 4e6cca3 to 45322e8 Compare March 9, 2026 09:48
Copy link
Member

@Sysix Sysix left a comment

Choose a reason for hiding this comment

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

I would like to have a intergration test for it. We created a similar js test setup for oxlint lsp :)

Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

How is the LSP going to invoke this? Does it bypass the vscode extension? or some other way?

What about for non-vscode users? Do they manually have to configure this in the LS config?

@Sysix
Copy link
Member

Sysix commented Mar 9, 2026

@camc314 every client (IDE/editor) is responsible to configure the new configuration like the CLI.
For VS Code @leaysgur already created a PR oxc-project/oxc-vscode#134.
This allows to define VS Code settings and pass it to the language server.
Example zed: https://github.com/oxc-project/oxc-zed/blob/main/examples/oxlint/nested-configs/.zed/settings.json

@camc314
Copy link
Contributor

camc314 commented Mar 9, 2026

hmm @leaysgur shall we discuss this tomorow? I think we want this to be as low-friction as possible for vite+, and requireing a user to configure this doens't feel ideal

@leaysgur leaysgur force-pushed the 03-09-feat_oxfmt_add_--config-field_cli_option branch from 45322e8 to f0bd30d Compare March 10, 2026 00:59
@leaysgur leaysgur force-pushed the 03-09-feat_oxfmt_.js_.ts_config_file_support branch from b0ff1a0 to 7f1696f Compare March 10, 2026 00:59
@leaysgur
Copy link
Member Author

@Sysix Thanks~! Once it's merged, I'd like to add some tests soon. 👀

@camc314 Of course. (Since there's been ongoing discussion since last week, it might be best to first review the Discord and VP-side issues as well.)

@leaysgur
Copy link
Member Author

We've decided to take a different approach, so closing.

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

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-formatter Area - Formatter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants