vue3.0 如何取消eslint 的代码格式校验

2023-04-04 14:49:05 浏览数 (1)

报错:

代码语言:javascript复制
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in [eslint]
C:UsersxuhuichenDesktopgpyh-wechat-h5srccomponentsa1.vue
  1:1  error  Component name "a1" should always be multi-word  vue/multi-word-component-names

解决方法:

  1. 打开vue.config.js 文件
代码语言:javascript复制
  module.exports = {
        lintOnSave: false //如果为false,就是取消eslint规则的检查
  }
  1. 重启后, eslint就关闭了

0 人点赞