Max Phillips
Max Phillips

Reputation: 7489

Have eslint only show fatal errors?

I would like to silence all style warnings and only be alerted when there is a major leak in my code, like a missing bracket, or a referenced var that doesn't exist. Is there a rule that can be inserted into eslint.json to quiet everything except fatal errors?

Upvotes: 103

Views: 73891

Answers (2)

Yasuhiro TATSUNO
Yasuhiro TATSUNO

Reputation: 2009

You can use --quiet option to show error-level only, like eslint --quiet "*.js"

https://eslint.org/docs/user-guide/command-line-interface

Handling warnings:
 --quiet                        Report errors only - default: false

Upvotes: 184

btmills
btmills

Reputation: 4542

You can use the "eslint:recommended" config that ships with ESLint. It enables rules that catch common errors but doesn't enforce any specific style.

Upvotes: -5

Related Questions