在前端项目开发中,去除eslint检测,目前我知道的有两种方式,一是在vue.config.js里面加配置,如下:
module.exports = {
lintOnSave:false,//是否开启eslint保存检测 ,它的有效值为 true || false || 'error'
}
第二种就是在package.json里面加入如下配置:
{
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended" //这句代码去掉
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {
"indent": [0] //主要是这里,设置成0,意思就是不检测
}
},
}
eslint好用是好用,有时候又挺烦人的,各种不规范检测,所以我每次都是直接关掉了!