@@ -716,6 +716,110 @@ ruleTester.run('jsx-indent', rule, {
716
716
` ,
717
717
parser : 'babel-eslint' ,
718
718
options : [ 2 ]
719
+ } , {
720
+ code : `
721
+ const Component = () => (
722
+ <View
723
+ ListFooterComponent={(
724
+ <View
725
+ rowSpan={3}
726
+ placeholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
727
+ />
728
+ )}
729
+ />
730
+ );
731
+ ` ,
732
+ output : `
733
+ const Component = () => (
734
+ <View
735
+ ListFooterComponent={(
736
+ <View
737
+ rowSpan={3}
738
+ placeholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
739
+ />
740
+ )}
741
+ />
742
+ );
743
+ ` ,
744
+ options : [ 2 ]
745
+ } , {
746
+ code : `
747
+ const Component = () => (
748
+ \t<View
749
+ \t\tListFooterComponent={(
750
+ \t\t\t<View
751
+ \t\t\t\trowSpan={3}
752
+ \t\t\t\tplaceholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
753
+ \t\t\t/>
754
+ )}
755
+ \t/>
756
+ );
757
+ ` ,
758
+ output : `
759
+ const Component = () => (
760
+ \t<View
761
+ \t\tListFooterComponent={(
762
+ \t\t\t<View
763
+ \t\t\t\trowSpan={3}
764
+ \t\t\t\tplaceholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
765
+ \t\t\t/>
766
+ \t\t)}
767
+ \t/>
768
+ );
769
+ ` ,
770
+ options : [ 'tab' ]
771
+ } , {
772
+ code : `
773
+ const Component = () => (
774
+ <View
775
+ ListFooterComponent={(
776
+ <View
777
+ rowSpan={3}
778
+ placeholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
779
+ />
780
+ )}
781
+ />
782
+ );
783
+ ` ,
784
+ output : `
785
+ const Component = () => (
786
+ <View
787
+ ListFooterComponent={(
788
+ <View
789
+ rowSpan={3}
790
+ placeholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
791
+ />
792
+ )}
793
+ />
794
+ );
795
+ ` ,
796
+ options : [ 2 , { checkAttributes : false } ]
797
+ } , {
798
+ code : `
799
+ const Component = () => (
800
+ \t<View
801
+ \t\tListFooterComponent={(
802
+ \t\t\t<View
803
+ \t\t\t\trowSpan={3}
804
+ \t\t\t\tplaceholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
805
+ \t\t\t/>
806
+ )}
807
+ \t/>
808
+ );
809
+ ` ,
810
+ output : `
811
+ const Component = () => (
812
+ \t<View
813
+ \t\tListFooterComponent={(
814
+ \t\t\t<View
815
+ \t\t\t\trowSpan={3}
816
+ \t\t\t\tplaceholder="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do"
817
+ \t\t\t/>
818
+ \t\t)}
819
+ \t/>
820
+ );
821
+ ` ,
822
+ options : [ 'tab' , { checkAttributes : false } ]
719
823
} ] ,
720
824
721
825
invalid : [ {
@@ -1503,7 +1607,7 @@ ruleTester.run('jsx-indent', rule, {
1503
1607
/>
1504
1608
);
1505
1609
` ,
1506
- options : [ 2 ] ,
1610
+ options : [ 2 , { checkAttributes : true } ] ,
1507
1611
errors : [
1508
1612
{ message : 'Expected indentation of 8 space characters but found 4.' }
1509
1613
]
@@ -1532,7 +1636,7 @@ const Component = () => (
1532
1636
\t/>
1533
1637
);
1534
1638
` ,
1535
- options : [ 'tab' ] ,
1639
+ options : [ 'tab' , { checkAttributes : true } ] ,
1536
1640
errors : [
1537
1641
{ message : 'Expected indentation of 2 tab characters but found 0.' }
1538
1642
]
0 commit comments