如何在 vue-cli 中禁用 ESLint? [英] How to disable ESLint in vue-cli?

查看:61
本文介绍了如何在 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}} 位)看来您可以删除整个 preLoaders 块.

Looking at the templates (the {{#lint}} bits) it appears you can remove the entire preLoaders block.

这篇关于如何在 vue-cli 中禁用 ESLint?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆