Skip to content

Commit 982d9f2

Browse files
author
Filipa Lacerda
committed
Update docs as per code review
1 parent 796611e commit 982d9f2

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

docs/rules/max-attributes-per-line.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
Limits the maximum number of attributes/properties per line to improve readability.
44

55

6-
## Rule Details
6+
## :book: Rule Details
77

88
This rule aims to enforce a number of attributes per line in templates.
99
It checks all the elements in a template and verifies that the number of attributes per line does not exceed the defined maximum.
1010
An attribute is considered to be in a new line when there is a line break between two attributes.
1111

1212
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).
1313

14-
Examples of **incorrect** code for this rule:
14+
:-1: Examples of **incorrect** code for this rule:
1515

16-
```js
16+
```html
1717
<component lorem="1" ipsum="2" dolor="3" sit="4">
1818
</component>
1919

@@ -25,9 +25,9 @@ Examples of **incorrect** code for this rule:
2525
</component>
2626
```
2727

28-
Examples of **correct** code for this rule:
28+
:+1: Examples of **correct** code for this rule:
2929

30-
```js
30+
```html
3131
<component lorem="1" ipsum="2" dolor="3">
3232
</component>
3333

@@ -41,7 +41,7 @@ Examples of **correct** code for this rule:
4141

4242
```
4343

44-
### Options
44+
### :wrench: Options
4545

4646
```
4747
{
@@ -55,19 +55,19 @@ Examples of **correct** code for this rule:
5555
}
5656
```
5757

58-
### `allowFirstLine`
58+
#### `allowFirstLine`
5959
For multi-line declarations, defines if allows attributes to be put in the first line. (Default false)
6060

61-
Example of **incorrect** code for this setting:
62-
```js
61+
:-1: Example of **incorrect** code for this setting:
62+
```html
6363
// [{ "multiline": { "allowFirstLine": false }}]
6464
<component foo="John" bar="Smith"
6565
foobar={5555555}>
6666
</component>;
6767
```
6868

69-
Example of **correct** code for this setting:
70-
```js
69+
:+1: Example of **correct** code for this setting:
70+
```html
7171
// [{ "multiline": { "allowFirstLine": false }}]
7272
<component
7373
foo="John"
@@ -78,35 +78,35 @@ Example of **correct** code for this setting:
7878
```
7979

8080

81-
### `singleline`
81+
#### `singleline`
8282
Number of maximum attributes per line when the opening tag is in a single line. (Default is 3)
8383

84-
Example of **incorrect** code for this setting:
85-
```js
84+
:-1: Example of **incorrect** code for this setting:
85+
```html
8686
// [{"singleline": 2,}]
8787
<component foo="John" bar="Smith" foobar={5555555}></component>;
8888
```
8989

90-
Example of **correct** code for this setting:
91-
```js
90+
:+1: Example of **correct** code for this setting:
91+
```html
9292
// [{"singleline": 3,}]
9393
<component foo="John" bar="Smith" foobar={5555555}></component>;
9494
```
9595

9696

97-
### `multiline`
97+
#### `multiline`
9898
Number of maximum attributes per line when a tag is in multiple lines. (Default is 1)
9999

100-
Example of **incorrect** code for this setting:
101-
```js
100+
:-1: Example of **incorrect** code for this setting:
101+
```html
102102
// [{"multiline": 1}]
103103
<component foo="John" bar="Smith"
104104
foobar={5555555}>
105105
</component>;
106106
```
107107

108-
Example of **correct** code for this setting:
109-
```js
108+
:+1: Example of **correct** code for this setting:
109+
```html
110110
// [{"multiline": 1}]
111111
<component
112112
foo="John"

0 commit comments

Comments
 (0)