You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(max-attributes-per-line): allow max attribues 0 for singleline
* feat(max-attributes-per-line): allowFirstLine option
* docs(max-attributes-per-line): updated options and added example
Copy file name to clipboardExpand all lines: docs/rules/max-attributes-per-line.md
+24-2Lines changed: 24 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,10 @@ There is a configurable number of attributes that are acceptable in one-line cas
57
57
```json
58
58
{
59
59
"vue/max-attributes-per-line": ["error", {
60
-
"singleline": 1,
60
+
"singleline": {
61
+
"max": 1,
62
+
"allowFirstLine": true
63
+
},
61
64
"multiline": {
62
65
"max": 1,
63
66
"allowFirstLine": false
@@ -66,7 +69,8 @@ There is a configurable number of attributes that are acceptable in one-line cas
66
69
}
67
70
```
68
71
69
-
-`singleline` (`number`) ... The number of maximum attributes per line when the opening tag is in a single line. Default is `1`.
72
+
-`singleline.max` (`number`) ... The number of maximum attributes per line when the opening tag is in a single line. Default is `1`.
73
+
-`singleline.allowFirstLine` (`boolean`) ... If `true`, it allows attributes on the same line as that tag name. Default is `true`.
70
74
-`multiline.max` (`number`) ... The max number of attributes per line when the opening tag is in multiple lines. Default is `1`. This can be `{ multiline: 1 }` instead of `{ multiline: { max: 1 }}` if you don't configure `allowFirstLine` property.
71
75
-`multiline.allowFirstLine` (`boolean`) ... If `true`, it allows attributes on the same line as that tag name. Default is `false`.
72
76
@@ -86,6 +90,24 @@ There is a configurable number of attributes that are acceptable in one-line cas
0 commit comments