File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,11 @@ The following patterns are considered warnings:
31
31
## Rule Options
32
32
33
33
It takes an option as the second parameter which can be ` "tab" ` for tab-based indentation or a positive number for space indentations.
34
+ To enable checking the indentation of attributes, use the third parameter to turn on the ` checkAttributes ` option (default is false).
34
35
35
36
``` js
36
37
...
37
- " react/jsx-indent" : [< enabled> , ' tab' | < number> ]
38
+ " react/jsx-indent" : [< enabled> , ' tab' | < number> , {checkAttributes : < boolean > } ]
38
39
...
39
40
```
40
41
@@ -52,6 +53,14 @@ The following patterns are considered warnings:
52
53
< App>
53
54
< Hello / >
54
55
< / App>
56
+
57
+ // [2, 2, {checkAttributes: true}]
58
+ < App render= {
59
+ < Hello render= {
60
+ (bar ) => < div> hi< / div>
61
+ }
62
+ / >
63
+ < / App>
55
64
` ` `
56
65
57
66
The following patterns are **not** warnings:
@@ -75,6 +84,14 @@ The following patterns are **not** warnings:
75
84
< App>
76
85
< Hello / >
77
86
< / App>
87
+
88
+ // [2, 2, {checkAttributes: false}]
89
+ < App render= {
90
+ < Hello render= {
91
+ (bar ) => < div> hi< / div>
92
+ }
93
+ / >
94
+ < / App>
78
95
` ` `
79
96
80
97
## When not to use
You can’t perform that action at this time.
0 commit comments