[英]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?
是否有规则可以插入 eslint.json 以消除致命错误之外的所有内容?
You can use --quiet
option to show error
-level only, like eslint --quiet "*.js"
您可以使用
--quiet
选项仅显示error
级别,例如eslint --quiet "*.js"
https://eslint.org/docs/user-guide/command-line-interface https://eslint.org/docs/user-guide/command-line-interface
Handling warnings:
--quiet Report errors only - default: false
You can use the "eslint:recommended"
config that ships with ESLint.您可以使用
"eslint:recommended"
的"eslint:recommended"
配置。 It enables rules that catch common errors but doesn't enforce any specific style.它启用捕获常见错误但不强制执行任何特定样式的规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.