Skip to content

max-attributes-per-line defaults to "singleline: 1", should be 3 according to docs #300

Closed
@tiltec

Description

@tiltec

Tell us about your environment

  • ESLint Version: any
  • eslint-plugin-vue Version: master
  • Node Version: any

What did you do? Please include the actual source code causing the issue.

I use the strongly-recommended rule that enables max-attributes-per-line. It should default to 3 attributes in the singleline case, according to the docs:

There is a configurable number of attributes that are acceptable in one-line case (default 3), as well as how many attributes are acceptable per line in multi-line case (default 1).

This should be correct:

    <div v-for="item of items" :key="item.id">
      {{ item.name }}
    </div>

There's also a docs inconsistency, as this code is given as incorrect in the docs:

<MyComponent lorem="1" ipsum="2"/>

What did you expect to happen?

Don't get a lint error.

What actually happened?

Got a lint error.

Also noticed by @michalsnik in #77 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions