[英]eslint rules not working with airbnb rule?
I follow this guide 我遵循本指南
https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a
to setup eslint with prettier in my project, but somehow the rules of no console doesn't work, eslint still throw warning when I use console.log, what's wrong here? 在我的项目中设置漂亮的eslint,但是某种程度上没有控制台的规则不起作用,当我使用console.log时,eslint仍然会发出警告,这是怎么了?
{
"extends": ["airbnb", "prettier"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": ["error"],
"no-console": 0
}
}
I have eslint and prettier installed in my vscode 我的vscode中安装了eslint和更漂亮
You must use 您必须使用
no-console: "error"
and within following to custom allows 在自定义允许范围内
no-console: ["error", { allow: ["warn", "error"] }]
reference: https://eslint.org/docs/rules/no-console 参考: https : //eslint.org/docs/rules/no-console
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.