Skip to content
This repository has been archived by the owner on Jul 25, 2023. It is now read-only.

Hints in logs about auto-fixable rules #2

Open
zmeyc opened this issue Jul 1, 2020 · 0 comments
Open

Hints in logs about auto-fixable rules #2

zmeyc opened this issue Jul 1, 2020 · 0 comments

Comments

@zmeyc
Copy link

zmeyc commented Jul 1, 2020

I've noticed that there are a lot of hints about using "error" for auto-fixable rules on each formatting operation.
But these rules are errors by default in ESLint and are not being overridden in .eslintrc.json.

It's possible to add all of them to eslintrc as warnings, but there are downsides:

  • .eslintrc.json will no longer be tidy and will list all possible ESLint rules.
  • it will require continuous updates as new rules will appear in new ESLint versions.
  • CI usually only lints code and can't autofix it, so treating some of the rules (even auto-fixable) as errors is correct behavior imo. Workarounds like passing max-warnings=0 are possible, but they are hacks. Plus it won't be possible to keep some less important rules as warnings in this case.

My proposal is to silence these hints or possibly only output them once because it's easy to miss other errors because of them.

["INFO" - 7:05:05 PM] Hint: Rule "no-regex-spaces" is auto-fixable and need not be set to level error!
["INFO" - 7:05:05 PM] Hint: Rule "no-unused-labels" is auto-fixable and need not be set to level error!
...20 more
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant