oxc-project / oxc

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

oxlint: Improve documentation for rules #6370

Open xaddict opened 1 week ago

xaddict commented 1 week ago

Right now the documentation for oxlint states all the rules, but doesn't show how to turn them on or off. Someone coming from eslint might be familiar with the options, but new users in the javascript ecosystem might not.

This could be a small introduction on the rules page (https://oxc.rs/docs/guide/usage/linter/rules.html), or a more in-depth explanation for the options on the detail page (https://oxc.rs/docs/guide/usage/linter/rules/eslint/eqeqeq.html)

I'm guessing the basic options are still off, warn and error, but if you are going to support sub-options that would be good to put in the detail pages.

Reason for this ticket is I have the following:

...
"unicorn/no-thenable": "off",
...

but the linter still shows the thenable errors. But since I don't know if no-thenable takes off as a value, I could be doing something wrong.

DonIsaac commented 1 week ago

This appears to be two issues:

  1. Rule config documentation is ambiguous
  2. unicorn/no-thenable is not being disabled when set to off.

Could you please provide the full oxlint command you ran, as well as the contents of your oxlintrc.json (or whatever file you use)?

xaddict commented 1 week ago

I wrote this ticket just for Number 1 :) Number 2 I just mentioned because it could be I should not be using "off" there because of 1.

The command:

oxlint --disable-react-plugin --disable-typescript-plugin --jsdoc-plugin --promise-plugin --security-plugin

And the .oxlintrc.json file: .oxlintrc.json