Vue报错error: Unexpected console statement (no-console)

写项目过程中用ESLint遵守代码规范很有必要,但是对于一些规范也很是无语,比如:‘Unexpected console statement (no-console)’,连console都不能用,这就很抓狂了。其实增加一行代码即可。
修改package.json中的eslintConfig:{} 中的 “rules”:{},增加一行代码: "no-console":"off"
修改package.json中的eslintConfig:{} 中的 “rules”:{},增加一行代码: "no-console":"off"
示例:
"eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/essential", "eslint:recommended" ], "rules": { "no-console":"off" }, "parserOptions": { "parser": "babel-eslint" } }



本文作者:起点终站
文章标题: Vue报错error: Unexpected console statement (no-console)
本文地址:https://blog.hellozwh.com/?post=442
版权声明:若无注明,本文皆为“起点终站”原创,转载请保留文章出处。
本文地址:https://blog.hellozwh.com/?post=442
版权声明:若无注明,本文皆为“起点终站”原创,转载请保留文章出处。


