Component name “header“ should always be multi-word

简介: Component name “header“ should always be multi-word
大家好,我是爱你三千遍斯塔克,我们使用Eslint的时候,可能会碰到这样的错误,那么如何解决:这里有些资料可供大家参考,希望对大家有帮助:

1、再创建Vue组件的时候,有时会爆这样的错误:

2、如何解决

报错的原因:

在组件命名的时候未按照 ESLint 的官方代码规范进行命名,根据 ESLint 官方代码风格指南,除了根组件(App.vue)以外,其他自定义组件命名要使用大驼峰命名方式或者用“-”连接单词进行命名;

文件的名称重命名
重新命名组件名为驼峰命名方式或者用“-”连接单词的格式

3、名字也改成组件


相关文章
|
7月前
|
JavaScript 索引
Component name “index“ should always be multi-word vue/multi-word-component-names
Component name “index“ should always be multi-word vue/multi-word-component-names
|
8月前
|
JavaScript
error Component name “Login“ should always be multi-word vue/multi-word-component-names【已解决】
error Component name “Login“ should always be multi-word vue/multi-word-component-names【已解决】
500 1
|
9月前
|
JavaScript
【Vue Error】 error Component name “product“ should always be multi-word vue/multi-word-compone……
【Vue Error】 error Component name “product“ should always be multi-word vue/multi-word-compone……
|
JavaScript
Vue中遇到的Bug( Component name “School“ should always be multi-word vue/multi-word-component-names)
Vue中遇到的Bug( Component name “School“ should always be multi-word vue/multi-word-component-names)
159 0
913 error Component name “home“ should always be multi-word vuemulti-word-component-names
913 error Component name “home“ should always be multi-word vuemulti-word-component-names
137 0
Warning: [antd: Form.Item] `defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.
Warning: [antd: Form.Item] `defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.
849 0
|
JavaScript 前端开发 开发者
Component name “xxx“ should always be multi-word
Component name “xxx“ should always be multi-word
Component name “xxx“ should always be multi-word
|
Java
java实战小结-Controller报错:Content type ‘multipart/form-data;boundary=----WebKitFormBoundaryxxxx not supp
java实战小结-Controller报错:Content type ‘multipart/form-data;boundary=----WebKitFormBoundaryxxxx not supp
467 0
|
Java Android开发 Spring
javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handl
javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handl
639 0
javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handl