如何禁用vue.js的<template>中的段落的eslint规则最大行长?

我正在使用airbnb eslint,目前出现错误:

错误:第6行超出path / to / file.vue:6:1处的最大行长度100(max-len):

<template lang="pug">
  div
    .container
      .row
        .col-xl-10.mx-auto
          p Please let us know how you got here, and use the header buttons to navigate back to safe harbor.
</template>

有没有办法为上述段落文本禁用皮棉?
另外,如何将线长从100增加到120?

小小梅Green2020/03/13 00:33:11

您可以将其添加到您的ESLint规则中:

rules: {
  "vue/max-attributes-per-line": "off"
}

This worked for me (even if I rather set it on for my projects).
You can find more information here if you want.

猴子蛋蛋2020/03/13 00:33:11

对于eslint-plugin-vue> =,4.1.0您可以使用指令注释禁用eslint。

https://github.com/vuejs/eslint-plugin-vue/commit/ad84e0ba6d81f24583e65fc70b1d9803d73d3ed9

<template>
  <!-- eslint-disable-next-line vue/max-attributes-per-line -->
  <div a="1" b="2" c="3" d="4">
  </div>
</template>