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

相关推荐
为何创造硅基生物8 小时前
C语言 结构体内存对齐规则(通俗易懂版)
c语言·开发语言
吃好睡好便好8 小时前
在Matlab中绘制横直方图
开发语言·学习·算法·matlab
星寂樱易李9 小时前
iperf3 + Python-- 网络带宽、网速、网络稳定性
开发语言·网络·python
仰泳之鹅9 小时前
【C语言】自定义数据类型2——联合体与枚举
c语言·开发语言·算法
之歆9 小时前
DAY_12JavaScript DOM 完全指南(二):实战与性能篇
开发语言·前端·javascript·ecmascript
Maimai1080810 小时前
React如何用 @microsoft/fetch-event-source 落地 SSE:比原生 EventSource 更灵活的实时推送方案
前端·javascript·react.js·microsoft·前端框架·reactjs·webassembly
candyTong10 小时前
Claude Code 的 Edit 工具是怎么工作的
javascript·后端·架构
cen__y10 小时前
Linux12(Git01)
linux·运维·服务器·c语言·开发语言·git
AI人工智能+电脑小能手10 小时前
【大白话说Java面试题 第65题】【JVM篇】第25题:谈谈对 OOM 的认识
java·开发语言·jvm
社交怪人11 小时前
【算平均分】信息学奥赛一本通C语言解法(题号2071)
c语言·开发语言