Xo: Only show warnings when there are no errors

Created on 22 Nov 2020  Â·  2Comments  Â·  Source: xojs/xo

Warnings make it harder to see the errors in the terminal output. How about we just hide warnings if there are any lint errors?

enhancement question

All 2 comments

I think that's a good idea. I suggest having a new option --always-show-warnings (or something like that) that is false by default.

When it's false (the default), I'd like to see at least one summary line in the end of the report such as:

Also, 18 warnings found. Run with `--always-show-warnings` for details on them.

For the record, eslint’s flag to hide warnings is quiet. The suggested behavior could thus be called “auto-quiet” and that leaves us with

  • quiet flag: always hide warnings, just like eslint
  • no-quiet flag: mix warnings and errors, the current default
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pizzafox picture pizzafox  Â·  5Comments

iwata picture iwata  Â·  5Comments

lagden picture lagden  Â·  3Comments

SamVerschueren picture SamVerschueren  Â·  4Comments

sindresorhus picture sindresorhus  Â·  8Comments