如何在vue-cli中禁用ESLint? [英] How to disable ESLint in vue-cli?
本文介绍了如何在vue-cli中禁用ESLint?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在使用 vue-cli
生成的项目中禁用 ESlint
?
How do I go about disabling ESlint
in project generated with vue-cli
?
preLoaders: [
{
test: /\.vue$/,
loader: 'eslint',
include: projectRoot,
exclude: /node_modules/
},
{
test: /\.js$/,
loader: 'eslint',
include: projectRoot,
exclude: /node_modules/
}
]
如果我删除 loader:'eslint'
行,它将无法编译,同样将其设置为空串。我知道我可以在初始化阶段选择退出 ESLint
,但是如何在创建项目后禁用它?
If I remove the loader: 'eslint'
line it won't compile, same with setting it to an empty string. I know I can opt out of ESLint
during the initialization phase, but how can I disable it after my project has been created?
推荐答案
Vue的初级项目本身是用模板语言构建的。
Vue's starter projects are themselves built with a templating language.
查看模板( {{# lint}}
bits)看来你可以删除整个 preLoaders
块。
Looking at the templates (the {{#lint}}
bits) it appears you can remove the entire preLoaders
block.
这篇关于如何在vue-cli中禁用ESLint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文