question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using --max-warnings in combination with --quiet should error

See original GitHub issue

The 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. image

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:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
nzakascommented, Mar 18, 2021

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.

0reactions
nzakascommented, Mar 19, 2021

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found