oxc-project / oxc

⚓ A collection of JavaScript tools written in Rust.
https://oxc.rs
MIT License
12.6k stars 466 forks source link

Oxc_language_server adds the same command line parameters as oxlint and supports oxlintrc.json. #7202

Open suxiaoshao opened 3 weeks ago

suxiaoshao commented 3 weeks ago

Are the command line parameters for oxc_language_server consistent with those of oxlint? Adding ‘–jsx-a11y-plugin’ doesn’t seem to work, and I can’t configure plugins in oxlintrc.json.

pumano commented 3 weeks ago

I think it's not consistent, but looks like it should be consistent (as much as possible). Some details at #7118

nrayburn-tech commented 3 weeks ago

I’m not sure about CLI args for the language server. I don’t know if that’s standard for language servers, so I’d like to know that.

Enabling/disabling plugins with the language server somehow is definitely a requirement in my opinion. This should be doable with oxlint json config files. I’m not sure if this is already setup or not.

Sysix commented 1 week ago

I’m not sure about CLI args for the language server. I don’t know if that’s standard for language servers, so I’d like to know that.

You can configure them ans Config Properties like lint.run. But this feels really hacky. I did not find a similar setting in eslint vscode-client

@suxiaoshao to your original Problem: The newest oxlint version disables plugins via the config file. See here how it works: https://github.com/oxc-project/oxc/issues/6896#issuecomment-2439930221

The language server will react automatically to it.
Feel free to test it with the latest oxlint version and oxc vscode-extension.

You need to set your config with in settings.json or else it defaults to .eslintrc: { "oxc.configPath": "oxlint.json" }