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
+21-21Lines changed: 21 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,17 @@
3
3
Limits the maximum number of attributes/properties per line to improve readability.
4
4
5
5
6
-
## Rule Details
6
+
## :book:Rule Details
7
7
8
8
This rule aims to enforce a number of attributes per line in templates.
9
9
It checks all the elements in a template and verifies that the number of attributes per line does not exceed the defined maximum.
10
10
An attribute is considered to be in a new line when there is a line break between two attributes.
11
11
12
12
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).
13
13
14
-
Examples of **incorrect** code for this rule:
14
+
:-1:Examples of **incorrect** code for this rule:
15
15
16
-
```js
16
+
```html
17
17
<componentlorem="1"ipsum="2"dolor="3"sit="4">
18
18
</component>
19
19
@@ -25,9 +25,9 @@ Examples of **incorrect** code for this rule:
25
25
</component>
26
26
```
27
27
28
-
Examples of **correct** code for this rule:
28
+
:+1:Examples of **correct** code for this rule:
29
29
30
-
```js
30
+
```html
31
31
<componentlorem="1"ipsum="2"dolor="3">
32
32
</component>
33
33
@@ -41,7 +41,7 @@ Examples of **correct** code for this rule:
41
41
42
42
```
43
43
44
-
### Options
44
+
### :wrench:Options
45
45
46
46
```
47
47
{
@@ -55,19 +55,19 @@ Examples of **correct** code for this rule:
55
55
}
56
56
```
57
57
58
-
### `allowFirstLine`
58
+
####`allowFirstLine`
59
59
For multi-line declarations, defines if allows attributes to be put in the first line. (Default false)
60
60
61
-
Example of **incorrect** code for this setting:
62
-
```js
61
+
:-1:Example of **incorrect** code for this setting:
62
+
```html
63
63
// [{ "multiline": { "allowFirstLine": false }}]
64
64
<componentfoo="John"bar="Smith"
65
65
foobar={5555555}>
66
66
</component>;
67
67
```
68
68
69
-
Example of **correct** code for this setting:
70
-
```js
69
+
:+1:Example of **correct** code for this setting:
70
+
```html
71
71
// [{ "multiline": { "allowFirstLine": false }}]
72
72
<component
73
73
foo="John"
@@ -78,35 +78,35 @@ Example of **correct** code for this setting:
78
78
```
79
79
80
80
81
-
### `singleline`
81
+
####`singleline`
82
82
Number of maximum attributes per line when the opening tag is in a single line. (Default is 3)
83
83
84
-
Example of **incorrect** code for this setting:
85
-
```js
84
+
:-1:Example of **incorrect** code for this setting:
0 commit comments