File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -832,6 +832,19 @@ const Component = () => (
832
832
}
833
833
` ,
834
834
options : [ 2 , { checkAttributes : true } ]
835
+ } , {
836
+ code : `
837
+ function Foo() {
838
+ return (
839
+ <div>
840
+ {condition && (
841
+ <p>Bar</p>
842
+ )}
843
+ </div>
844
+ );
845
+ }
846
+ ` ,
847
+ options : [ 2 , { indentLogicalExpressions : true } ]
835
848
} ] ,
836
849
837
850
invalid : [ {
@@ -1652,5 +1665,32 @@ const Component = () => (
1652
1665
errors : [
1653
1666
{ message : 'Expected indentation of 2 tab characters but found 0.' }
1654
1667
]
1668
+ } , {
1669
+ code : `
1670
+ function Foo() {
1671
+ return (
1672
+ <div>
1673
+ {condition && (
1674
+ <p>Bar</p>
1675
+ )}
1676
+ </div>
1677
+ );
1678
+ }
1679
+ ` ,
1680
+ output : `
1681
+ function Foo() {
1682
+ return (
1683
+ <div>
1684
+ {condition && (
1685
+ <p>Bar</p>
1686
+ )}
1687
+ </div>
1688
+ );
1689
+ }
1690
+ ` ,
1691
+ options : [ 2 , { indentLogicalExpressions : true } ] ,
1692
+ errors : [
1693
+ { message : 'Expected indentation of 12 space characters but found 10.' }
1694
+ ]
1655
1695
} ]
1656
1696
} ) ;
You can’t perform that action at this time.
0 commit comments