eslint 配置文件报错 "vue/max-attributes-per-line" is invalid 如何解决?

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] .eslintrc.js:
        Configuration for rule "vue/max-attributes-per-line" is invalid:
        Value {"max":1,"allowFirstLine":false} should be number.
        Value {"max":1,"allowFirstLine":false} should NOT have additional properties.
        Value {"max":1,"allowFirstLine":false} should match some schema in anyOf.

终端报错,怎么解决

阅读 17.5k
1 个回答

你的规则配置有问题吧
文档

{
  "vue/max-attributes-per-line": ["error", {
    "singleline": {
      "max": 1
    },      
    "multiline": {
      "max": 1
    }
  }]
}

文档并没有提到 allowFirstLine 这个属性呀

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题