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
Copy file name to clipboardExpand all lines: docs/rules/max-attributes-per-line.md
+66-85Lines changed: 66 additions & 85 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,6 @@
5
5
6
6
Limits the maximum number of attributes/properties per line to improve readability.
7
7
8
-
9
8
## :book: Rule Details
10
9
11
10
This rule aims to enforce a number of attributes per line in templates.
@@ -14,43 +13,39 @@ An attribute is considered to be in a new line when there is a line break betwee
14
13
15
14
There is a configurable number of attributes that are acceptable in one-line case (default 1), as well as how many attributes are acceptable per line in multi-line case (default 1).
16
15
17
-
:-1: Examples of **incorrect** code for this rule:
@@ -60,73 +55,59 @@ There is a configurable number of attributes that are acceptable in one-line cas
60
55
}
61
56
```
62
57
63
-
#### `allowFirstLine`
64
-
65
-
For multi-line declarations, defines if allows attributes to be put in the first line. (Default false)
58
+
-`singleline` (`number`) ... The number of maximum attributes per line when the opening tag is in a single line. Default is `1`.
59
+
-`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.
60
+
-`multiline.allowFirstLine` (`boolean`) ... If `true`, it allows attributes on the same line as that tag name. Default is `false`.
66
61
67
-
:-1: Example of **incorrect** code for this setting:
0 commit comments