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
      }
    }
  ]
相关文章
|
4月前
|
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
|
5月前
|
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【已解决】
257 1
|
4月前
|
JavaScript
Component name “header“ should always be multi-word
Component name “header“ should always be multi-word
|
5月前
|
关系型数据库 MySQL Linux
FATAL ERROR: Could not find my_print_defaults
FATAL ERROR: Could not find my_print_defaults
162 0
|
6月前
|
IDE 开发工具 Android开发
Couldn‘t get post build model. Module:UpdateService_0804.main Variant: debugOpen logcat panel fo
Couldn‘t get post build model. Module:UpdateService_0804.main Variant: debugOpen logcat panel fo
72 0
|
6月前
Angular启动/node_modules/@types/node/index.d.ts (20,1): Invalid ‘reference‘ directive syntax.
Angular启动/node_modules/@types/node/index.d.ts (20,1): Invalid ‘reference‘ directive syntax.
73 2
|
6月前
|
数据库
Field ‘xxx‘ doesn‘t have a default value
Field ‘xxx‘ doesn‘t have a default value
48 0
|
6月前
|
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……
|
11月前
(node)Warning: Accessing non-existent property ‘xxx‘ of module exports inside circular depen
(node)Warning: Accessing non-existent property ‘xxx‘ of module exports inside circular depen
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
99 0