Closed
Description
We often struggle to read templates with a different number of props per line.
This rule would limit the maximum number of props on a single line can to improve readability.
There should also be the possibility to disable this rule when a tag has only one prop.
Proposal
'vue/max-props-per-line': {max: Number, when: 'always|multiline'}
The default could be: 'vue/max-props-per-line': {max: 1, when: 'always'}
- Enforcing one prop per line always
'vue/max-props-per-line': {max: 1, when: 'always'}
<component
prop="something"
foo="bar"
/>
<component
prop="something"
/>
- Enforcing one prop per line only when it has multilines it would accept:
'vue/max-props-per-line': {max: 1, when: 'multiline'}
<component prop="something" foo="bar" />
<component
prop="something"
foo="bar"
/>