Using --max-warnings in combination with --quiet should error
See original GitHub issueThe version of ESLint you are using. v7.21.0
The problem you want to solve.
Using the --max-warnings
cli option is useless in combination with --quiet
.
I’m running this in
Note the following, first running without --quiet
, then with.
Your take on the correct solution to problem.
Ideally: The --quiet
flag should be overriden when the amount of warnings exceeds max-warnings
, logging the warnings.
Also acceptable: The exit code should be 1 when max-warnings
is exceeded.
Are you willing to submit a pull request to implement this change? Not really 😇
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >how to silence warnings about ignored files in eslint
One workaround I know at the moment is --quiet option, which suppresses all warnings. Of course that doesn't make sense if you have...
Read more >How to Use ESLint "fix": Options, Issue Types, Exit Codes, and ...
If desired, warnings can be silenced with the --quiet flag. Conversely, if desired, a maximum number of errors can be specified as 'too...
Read more >Options - Stylelint
If using code or stdin to pass a source string directly, you can use codeFilename to associate that code with a particular filename....
Read more >Warning Options (Using the GNU Compiler Collection (GCC))
That option can then be used with -Werror= and -Wno-error= as described above. ... (or modify to prevent the warning), even in conjunction...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, so it sounds like we’ve agreed that the current behavior is a bug.
Current behavior: When using
--quiet
with--max-warnings
, we are not showing an error even when the number of warnings exceeds the threshold for errors.Desired behavior: When using
--quiet
with--max-warnings
, we should show the error that the maximum number of warnings has been reached and not show the actual warnings.I don’t think that’s necessary. The max allowable warnings is already shown so I don’t think there’s any need to show the actual number