问题:
error Component name “Home” should always be multi-word vue/multi-word-component-names
vue3的Component命名规范不能为单个词,修改为多个单词
报错原因是希望组件名写成驼峰式或者链-先形式的,
但是官方又明确单个单词组件命名是符合规定的,
总结在编译的时候eslint 会检测将次写法判定为不规格。
解决方案:
在vue.config.js中直接添加一行代码即可:lintOnSave:false
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false
})