@@ -63,39 +63,47 @@ ruleTester.run('jsx-indent-props', rule, {
63
63
code : [
64
64
'<App/>'
65
65
] . join ( '\n' ) ,
66
- options : [ 'aligned ' ]
66
+ options : [ 'first ' ]
67
67
} , {
68
68
code : [
69
69
'<App aaa' ,
70
70
' b' ,
71
71
' cc' ,
72
72
'/>'
73
73
] . join ( '\n' ) ,
74
- options : [ 'aligned' ]
74
+ options : [ 'first' ]
75
+ } , {
76
+ code : [
77
+ '<App aaa' ,
78
+ ' b' ,
79
+ ' cc' ,
80
+ '/>'
81
+ ] . join ( '\n' ) ,
82
+ options : [ 'first' ]
75
83
} , {
76
84
code : [
77
85
'const test = <App aaa' ,
78
86
' b' ,
79
87
' cc' ,
80
88
' />'
81
89
] . join ( '\n' ) ,
82
- options : [ 'aligned ' ]
90
+ options : [ 'first ' ]
83
91
} , {
84
92
code : [
85
93
'<App aaa x' ,
86
94
' b y' ,
87
95
' cc' ,
88
96
'/>'
89
97
] . join ( '\n' ) ,
90
- options : [ 'aligned ' ]
98
+ options : [ 'first ' ]
91
99
} , {
92
100
code : [
93
101
'const test = <App aaa x' ,
94
102
' b y' ,
95
103
' cc' ,
96
104
' />'
97
105
] . join ( '\n' ) ,
98
- options : [ 'aligned ' ]
106
+ options : [ 'first ' ]
99
107
} , {
100
108
code : [
101
109
'<App aaa' ,
@@ -105,7 +113,7 @@ ruleTester.run('jsx-indent-props', rule, {
105
113
' d/>' ,
106
114
'</App>'
107
115
] . join ( '\n' ) ,
108
- options : [ 'aligned ' ]
116
+ options : [ 'first ' ]
109
117
} , {
110
118
code : [
111
119
'<Fragment>' ,
@@ -119,7 +127,15 @@ ruleTester.run('jsx-indent-props', rule, {
119
127
' />' ,
120
128
'</Fragment>'
121
129
] . join ( '\n' ) ,
122
- options : [ 'aligned' ]
130
+ options : [ 'first' ]
131
+ } , {
132
+ code : [
133
+ '<App' ,
134
+ ' a' ,
135
+ ' b' ,
136
+ '/>'
137
+ ] . join ( '\n' ) ,
138
+ options : [ 'first' ]
123
139
} ] ,
124
140
125
141
invalid : [ {
@@ -184,20 +200,7 @@ ruleTester.run('jsx-indent-props', rule, {
184
200
' b' ,
185
201
'/>'
186
202
] . join ( '\n' ) ,
187
- options : [ 'aligned' ] ,
188
- errors : [ { message : 'Expected indentation of 5 space characters but found 2.' } ]
189
- } , {
190
- code : [
191
- '<App a x' ,
192
- ' b y' ,
193
- '/>'
194
- ] . join ( '\n' ) ,
195
- output : [
196
- '<App a x' ,
197
- ' b y' ,
198
- '/>'
199
- ] . join ( '\n' ) ,
200
- options : [ 'aligned' ] ,
203
+ options : [ 'first' ] ,
201
204
errors : [ { message : 'Expected indentation of 5 space characters but found 2.' } ]
202
205
} , {
203
206
code : [
@@ -210,11 +213,8 @@ ruleTester.run('jsx-indent-props', rule, {
210
213
' b' ,
211
214
'/>'
212
215
] . join ( '\n' ) ,
213
- options : [ 'aligned' ] ,
214
- errors : [
215
- { message : 'Found too much whitespace between tag name and first attribute.' } ,
216
- { message : 'Expected indentation of 6 space characters but found 3.' }
217
- ]
216
+ options : [ 'first' ] ,
217
+ errors : [ { message : 'Expected indentation of 6 space characters but found 3.' } ]
218
218
} , {
219
219
code : [
220
220
'<App' ,
@@ -228,28 +228,27 @@ ruleTester.run('jsx-indent-props', rule, {
228
228
' b' ,
229
229
'/>'
230
230
] . join ( '\n' ) ,
231
- options : [ 'aligned' ] ,
232
- errors : [
233
- { message : 'Found too much whitespace between tag name and first attribute.' } ,
234
- { message : 'Expected indentation of 6 space characters but found 3.' }
235
- ]
231
+ options : [ 'first' ] ,
232
+ errors : [ { message : 'Expected indentation of 6 space characters but found 3.' } ]
236
233
} , {
237
234
code : [
238
235
'<App' ,
239
236
' a' ,
240
- ' b' ,
237
+ ' b' ,
238
+ ' c' ,
241
239
'/>'
242
240
] . join ( '\n' ) ,
243
241
output : [
244
242
'<App' ,
245
- ' a' ,
246
- ' b' ,
243
+ ' a' ,
244
+ ' b' ,
245
+ ' c' ,
247
246
'/>'
248
247
] . join ( '\n' ) ,
249
- options : [ 'aligned ' ] ,
248
+ options : [ 'first ' ] ,
250
249
errors : [
251
- { message : 'Expected indentation of 5 space characters but found 2 .' } ,
252
- { message : 'Expected indentation of 5 space characters but found 2 .' }
250
+ { message : 'Expected indentation of 2 space characters but found 1 .' } ,
251
+ { message : 'Expected indentation of 2 space characters but found 3 .' }
253
252
]
254
253
} ]
255
254
} ) ;
0 commit comments