IanVS / eslint-nibble

Ease into ESLint, by fixing one rule at a time
MIT License
787 stars 29 forks source link

Select multiple rules at a time? #46

Closed ljharb closed 4 years ago

ljharb commented 6 years ago

I'd love a way to select multiple rules at a time, in particular so I can apply multiple whitespace rules all at once (generating the initial report takes a lot of time)

IanVS commented 6 years ago

Would it meet your needs if multiple rules could be passed on the cli (https://github.com/IanVS/eslint-nibble/issues/47)?

ljharb commented 6 years ago

Yes; but at that point it’d seem inconsistent to only allow one via the UI.

IanVS commented 6 years ago

I took another look, and it seems it might be possible with inquirer using a checkbox type (https://github.com/SBoudrias/Inquirer.js#checkbox---type-checkbox). If I get some time I'll try it out.

IanVS commented 6 years ago

Subsequent lint runs are a lot faster now with --cache, and I'm reluctant to use the checkbox option because it's more cumbersome to use. The faster speed, together with the new --rule flag, should be enough to meet your needs here. If you'd like to try, it's available as eslint-nibble@next. If you still need multiple rules, I can add a --multi flag, but I wouldn't want it to be the default. Thoughts?

ljharb commented 6 years ago

Since I’m intending to fix all whitespace-related rules at once, it’d be great to have a multi flag - it needn’t be the default.

slorber commented 6 years ago

hey @IanVS thanks for this tool

I'd like to nibble only error rules and exclude warning rules, is that possible instead of mananing myself a hardcoded list in the cli cmd?

IanVS commented 6 years ago

Hi @slorber, great idea. I've added a --no-warnings option, available in version 5.1.0.

slorber commented 6 years ago

great thanks ;)

kaatt commented 4 years ago

I second this. Would save a lot of time if I could select multiple rules using the CLI (instead of passing flags).

IanVS commented 4 years ago

Better late than never? https://github.com/IanVS/eslint-nibble/releases/tag/v6.0.0