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

相关推荐
顾安r8 小时前
11.8 脚本网页 星际逃生
c语言·前端·javascript·flask
im_AMBER8 小时前
React 17
前端·javascript·笔记·学习·react.js·前端框架
一雨方知深秋8 小时前
2.fs模块对计算机硬盘进行读写操作(Promise进行封装)
javascript·node.js·promise·v8·cpython
独隅9 小时前
在 Lua 中,你可以使用 `os.date()` 函数轻松地将时间戳转换为格式化的时间字符串
开发语言·lua
思麟呀10 小时前
Linux的基础IO流
linux·运维·服务器·开发语言·c++
星释10 小时前
Rust 练习册 :Pythagorean Triplet与数学算法
开发语言·算法·rust
星释10 小时前
Rust 练习册 :Nth Prime与素数算法
开发语言·算法·rust
lkbhua莱克瓦2410 小时前
Java基础——集合进阶3
java·开发语言·笔记
顺凡11 小时前
删一个却少俩:Antd Tag 多节点同时消失的原因
前端·javascript·面试
多喝开水少熬夜11 小时前
Trie树相关算法题java实现
java·开发语言·算法