IanVS / eslint-nibble

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

`Autofix warnings?` question is confusing #100

Closed ehoogeveen-medweb closed 1 year ago

ehoogeveen-medweb commented 2 years ago

If the rule you're examining has the warning severity, eslint-nibble first asks "Would you like to attempt to auto-fix?" and then "Autofix warnings?".

I found this confusing: If I answer "yes", does it mean "auto-fix this rule" or does it mean "auto-fix this rule and also all (other) warnings"? If I answer "no", does it mean "only auto-fix this rule" or does it mean "do nothing"?

If we're only considering 1 rule (e.g. --multi is off) or if all the selected rules are warnings, I think this question should be skipped.

IanVS commented 1 year ago

Thanks for the feedback, I can see your point. However, what if different files in the project have different configurations, with some using warning and some error? I think we can't necessarily say that if you're only fixing a single rule, you should automatically autofix warnings.

ehoogeveen-medweb commented 1 year ago

That's a fair point. I guess any time the rule(s) being fixed is (are) a warning in some cases but not others, the question makes sense.