Component name “xxx“ should always be multi-word

简介: Component name “xxx“ should always be multi-word

ESLint是一款插件化的javascript代码检测工具,用来规范开发者的代码样式与风格, 这样可以提高团队协作效率,But,刚接触的朋友们用上了它,你可能就会觉得你不会写代码了,一行代码,n个bug,各种报错层出不穷!!!


  • 解决方案:


如果是ESLint导致的错误,去ESLint官网查找自己不符合哪条rules规则,相应修改就能解决

但是这次遇到的报错并不能通过上面的方式解决



解决方案:



在项目根目录vue.config.js文件中加入以下配置即可


lintOnSave: false


  • 但是以上方法在vue3项目中依旧会报同样的错误, 这时可以在.eslintrc.js中添加以下规则


overrides: [
    {
      files: ['src/views/**/*.vue'],
      rules: {
        'vue/multi-word-component-names': 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
140 0
|
7月前
|
JavaScript
Component name “header“ should always be multi-word
Component name “header“ should always be multi-word
|
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【已解决】
503 1
|
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
|
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……
You should blog even if you have no readers--Nathan Marz
You should blog even if you have no readers FRIDAY, JULY 30, 2010 Spencer Fry wrote a great post on "Why entrepreneurs should write.
1223 0
|
Java 索引 Spring
Circular view path xxx would dispatch back to the current handler URL
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/79700275 ...
5514 0
|
9月前
|
数据库
Field ‘xxx‘ doesn‘t have a default value
Field ‘xxx‘ doesn‘t have a default value
81 0
Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs extension.
Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs extension.

热门文章

最新文章