File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -1116,6 +1116,24 @@ const Component = () => (
1116
1116
options : [ 2 ] ,
1117
1117
parserOptions,
1118
1118
} ,
1119
+ {
1120
+ code : `
1121
+ const myFunction = () => (
1122
+ [
1123
+ <Tag
1124
+ {...properties}
1125
+ />,
1126
+ <Tag
1127
+ {...properties}
1128
+ />,
1129
+ <Tag
1130
+ {...properties}
1131
+ />,
1132
+ ]
1133
+ )
1134
+ ` ,
1135
+ options : [ 2 ] ,
1136
+ } ,
1119
1137
] ) ,
1120
1138
1121
1139
invalid : parsers . all ( [
@@ -2853,5 +2871,40 @@ const Component = () => (
2853
2871
parserOptions,
2854
2872
errors : [ { message : 'Expected indentation of 10 space characters but found 8.' } ] ,
2855
2873
} ,
2874
+ {
2875
+ code : `
2876
+ {condition && [
2877
+ <Tag key="a" onClick={() => {
2878
+ // some code
2879
+ }} />,
2880
+ <Tag key="b" onClick={() => {
2881
+ // some code
2882
+ }} />,
2883
+ ]
2884
+ }
2885
+ ` ,
2886
+ output : `
2887
+ {condition && [
2888
+ <Tag key="a" onClick={() => {
2889
+ // some code
2890
+ }} />,
2891
+ <Tag key="b" onClick={() => {
2892
+ // some code
2893
+ }} />,
2894
+ ]
2895
+ }
2896
+ ` ,
2897
+ options : [ 2 ] ,
2898
+ errors : [
2899
+ {
2900
+ message : 'Expected indentation of 10 space characters but found 12.' ,
2901
+ line : 3 ,
2902
+ } ,
2903
+ {
2904
+ message : 'Expected indentation of 10 space characters but found 12.' ,
2905
+ line : 6 ,
2906
+ } ,
2907
+ ] ,
2908
+ } ,
2856
2909
] ) ,
2857
2910
} ) ;
You can’t perform that action at this time.
0 commit comments