Open Sysix opened 1 week ago
You need to use --disable-<foo>-plugin
to turn plugins off right now. This was a design decision, but if it's too confusing we can change behavior.
I would expect I can use CLI arguments or the config file.
When I use both. I expect CLI arguments to override config file.
So the linked documentation is wrong? The 4 plugins are not "config plugins" but "CLI plugins", which can not enabled/disabled via config file.
Would like to rethink the --disable-<foo>-plugin
argument with the combination --config
:)
I agree with @Sysix that I'd expect the config to replace the defaults if provided, instead of being additive. The current functionality isn't intuitive. I'd prefer to not require CLI commands since tooling like vscode and the eslint integration @Sysix is working on doesn't include any CLI args in those contexts.
What would you expect to happen if a config file is provided but no plugins array is passed? Vs an empty array
I expect the following:
{}
should enable plugin react, unicorn, typescript and oxc
{"plugins": []}
should enable no plugin{"plugins": ["typescript"]}
should enable plugin typescript
Gotcha, I'll make that change
You need to use --disable-
-plugin to turn plugins off right now. This was a design decision, but if it's too confusing we can change behavior.
Ran into the same issue and wanted to add that another reason why this is problematic is that for the vscode plugin I couldn't find a way to pass cli arguments thus in my ide my config wouldn't match my lint command in my package.json and I get additional errors (I'm using solidjs and now get a bunch of react errors).
Whoops, someone already said that! Gotta learn to read everything first 😅
What version of Oxlint are you using?
latest
What command did you run?
npx oxlint -c .oxlint.json
What does your
.oxlint.json
config file look like?{ "plugins": ["typescript"] }
What happened?
because the default values for
plugins
isreact
,unicorn
,typescript
andoxc
,I expect to run
oxlint -c .oxlint.json
with less rules.npx oxlint -c .oxlint.json
output:npx oxlint
output: