vue-cli脚手架构建了项目,想去除Eslint验证,如何设置?

时间:2022-08-16 19:38:33

vue-cli脚手架构建了项目,想去除Eslint验证,如何设置?

在webpack.base.conf.js里面删掉下面:

preLoaders: [
{
test: /\.vue$/,
loader: 'eslint',
include: projectRoot,
exclude: [/node_modules/, /ignore_lib/]
},
{
test: /\.js$/,
loader: 'eslint',
include: projectRoot,
exclude: [/node_modules/, /ignore_lib/]
}
]

其实我建议,将不想进行校验的文件就想上面一样创建一个ignore_lib,然后全部丢进去。