vue开发技术h5前端开发

vs工程配置eslint检测环境

2019-10-07  本文已影响0人  手指乐

vs工程打开一个js文件,会提示
"No ESLint configuration (e.g .eslintrc) found for file ......."

"Failed to load the ESLint library for the document ......."
就是需要配置eslint检测环境

module.exports = {
"env": {
"browser": true,
"es6": true,
"commonjs": true
},
........
}
"no-console":"off"
比如:
module.exports = {
......
"rules": {
"no-console":"off"
}
};

off也可以用0替代
"off" -> 0 关闭规则
"warn" -> 1 开启警告规则
"error" -> 2 开启错误规则

上一篇 下一篇

猜你喜欢

热点阅读