报错

ERROR

C:\Users\HP\hyyvue\src\components\Counter\Counter.vue
  1:1  error  Component name "Counter" should always be multi-word  vue/multi-word-component-names

C:\Users\HP\hyyvue\src\components\Footer\Footer.vue
  1:1  error  Component name "Footer" should always be multi-word  vue/multi-word-component-names

C:\Users\HP\hyyvue\src\components\Goods\Goods.vue
  1:1  error  Component name "Goods" should always be multi-word  vue/multi-word-component-names

C:\Users\HP\hyyvue\src\components\Header\Header.vue
  1:1  error  Component name "Header" should always be multi-word  vue/multi-word-component-names

✖ 4 problems (4 errors, 0 warnings)

意思是组件的命名不规范

vue/multi-word-component-names是用于检测当前的组件名称是否使用驼峰或多单词命名,eslint默认是要求检测,可以手动关闭检测

在vue.config.js文件中加入

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false//关闭语法检查
})
Logo

前往低代码交流专区

更多推荐