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:
3131## Rule Options
3232
3333It 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).
3435
3536``` js
3637...
37- " react/jsx-indent" : [< enabled> , ' tab' | < number> ]
38+ " react/jsx-indent" : [< enabled> , ' tab' | < number> , {checkAttributes : < boolean > } ]
3839...
3940```
4041
@@ -52,6 +53,14 @@ The following patterns are considered warnings:
5253< App>
5354 < Hello / >
5455< / App>
56+
57+ // [2, 2, {checkAttributes: true}]
58+ < App render= {
59+ < Hello render= {
60+ (bar ) => < div> hi< / div>
61+ }
62+ / >
63+ < / App>
5564` ` `
5665
5766The following patterns are **not** warnings:
@@ -75,6 +84,14 @@ The following patterns are **not** warnings:
7584< App>
7685< Hello / >
7786< / App>
87+
88+ // [2, 2, {checkAttributes: false}]
89+ < App render= {
90+ < Hello render= {
91+ (bar ) => < div> hi< / div>
92+ }
93+ / >
94+ < / App>
7895` ` `
7996
8097## When not to use
You can’t perform that action at this time.
0 commit comments