vue3报错 Component name “Footer“ should always be multi-word

报错内容

shell 复制代码
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] 
/Users/soul/projects/learning-vuejs3/chapter07/01_learn_component/src/01_seperate/Footer.vue
  1:1  error  Component name "Footer" should always be multi-word  vue/multi-word-component-names

/Users/soul/projects/learning-vuejs3/chapter07/01_learn_component/src/01_seperate/Header.vue
  1:1  error  Component name "Header" should always be multi-word  vue/multi-word-component-names

/Users/soul/projects/learning-vuejs3/chapter07/01_learn_component/src/01_seperate/Main.vue
  1:1  error  Component name "Main" should always be multi-word  vue/multi-word-component-names

✖ 3 problems (3 errors, 0 warnings)

解决办法

修改配置文件 .eslintrc.js ,在rules中加入这一段。

shell 复制代码
// 关闭名称校验
'vue/multi-word-component-names': "off" 

修改之后需要重新启动npm run serve

相关推荐
鱼鱼说测试3 分钟前
Jenkins+Python自动化持续集成详细教程
开发语言·servlet·php
艾莉丝努力练剑33 分钟前
【洛谷刷题】用C语言和C++做一些入门题,练习洛谷IDE模式:分支机构(一)
c语言·开发语言·数据结构·c++·学习·算法
CHEN5_021 小时前
【Java基础面试题】Java基础概念
java·开发语言
烛阴1 小时前
前端必会:如何创建一个可随时取消的定时器
前端·javascript·typescript
萌萌哒草头将军2 小时前
Oxc 最新 Transformer Alpha 功能速览! 🚀🚀🚀
前端·javascript·vue.js
武昌库里写JAVA2 小时前
JAVA面试汇总(四)JVM(一)
java·vue.js·spring boot·sql·学习
杜子不疼.2 小时前
《Python学习之字典(一):基础操作与核心用法》
开发语言·python·学习
落霞的思绪3 小时前
Java设计模式详细解读
java·开发语言·设计模式
阿巴~阿巴~3 小时前
深入解析C++ STL链表(List)模拟实现
开发语言·c++·链表·stl·list
1024小神3 小时前
nextjs项目build导出静态文件
前端·javascript