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

相关推荐
坐吃山猪7 小时前
SpringBoot01-配置文件
java·开发语言
晚风(●•σ )7 小时前
C++语言程序设计——06 字符串
开发语言·c++
我叫汪枫7 小时前
《Java餐厅的待客之道:BIO, NIO, AIO三种服务模式的进化》
java·开发语言·nio
Nicole-----7 小时前
Python - Union联合类型注解
开发语言·python
晚云与城7 小时前
今日分享:C++ -- list 容器
开发语言·c++
兰雪簪轩8 小时前
分布式通信平台测试报告
开发语言·网络·c++·网络协议·测试报告
FPGAI8 小时前
Qt编程之信号与槽
开发语言·qt
Swift社区9 小时前
从 JDK 1.8 切换到 JDK 21 时遇到 NoProviderFoundException 该如何解决?
java·开发语言
0wioiw09 小时前
Go基础(④指针)
开发语言·后端·golang
gnip9 小时前
Jst执行上下文栈和变量对象
前端·javascript