oxc icon indicating copy to clipboard operation
oxc copied to clipboard

Allow setting cli flags via .oxlintrc.json

Open Raynos opened this issue 1 year ago • 4 comments
trafficstars

I want to set --deny correctness that I can set for the CLI but instead set that via the configuration file.

I see that I can tweak each rule one by one atomically, but I want to set the groups defaults, but without doing it in the CLI all the time.

Raynos avatar Sep 04 '24 17:09 Raynos

I tried

{
  "settings": {},
  "rules": {
    "correctness": "deny"
  }
}

But that didnt work.

Raynos avatar Sep 04 '24 18:09 Raynos

We currently do not support this. I will work on it once the config refactor stack is merged.

DonIsaac avatar Sep 05 '24 18:09 DonIsaac

For reference I'm currently running

oxlint -c=./.oxlintrc.json --tsconfig=./tsconfig.json . -D correctness -D perf -D suspicious --promise-plugin --import-plugin

Because I don't think i can set these flags in the oxlintrc.json

Raynos avatar Sep 05 '24 19:09 Raynos

how do you make those extra rules work in the VScode IDE via the oxc extension if they cannot be set via a config file?

xaviergonz avatar Sep 22 '24 21:09 xaviergonz

Completed. categories is now supported, and plugins will be available in the next release

DonIsaac avatar Oct 16 '24 21:10 DonIsaac