@@ -59,9 +59,9 @@ ruleTester.run('jsx-curly-spacing', rule, {
59
59
'</App>;'
60
60
] . join ( '\n' )
61
61
} , {
62
- code : '<App>{ foo /* comment */ }</App>'
62
+ code : '<App>{ foo /* comment 1 */ }</App>'
63
63
} , {
64
- code : '<App>{ /* comment */ foo }</App>'
64
+ code : '<App>{ /* comment 1 */ foo }</App>'
65
65
} , {
66
66
code : '<App foo={bar} />;' ,
67
67
options : [ { attributes : true } ]
@@ -264,7 +264,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
264
264
] . join ( '\n' ) ,
265
265
options : [ { attributes : { when : 'never' , allowMultiline : true } } ]
266
266
} , {
267
- code : '<App foo={bar/* comment */} />;' ,
267
+ code : '<App foo={bar/* comment 2 */} />;' ,
268
268
options : [ { attributes : { when : 'never' } } ]
269
269
} , {
270
270
code : '<App foo={ bar } />;' ,
@@ -345,11 +345,11 @@ ruleTester.run('jsx-curly-spacing', rule, {
345
345
options : [ { children : { when : 'never' , allowMultiline : true } } ]
346
346
} , {
347
347
code : [
348
- '<App>{/* comment */}</App>;'
348
+ '<App>{/* comment 3 */}</App>;'
349
349
] . join ( '\n' ) ,
350
350
options : [ { children : { when : 'never' } } ]
351
351
} , {
352
- code : '<App>{bar/* comment */}</App>;' ,
352
+ code : '<App>{bar/* comment 4 */}</App>;' ,
353
353
options : [ { children : { when : 'never' } } ]
354
354
} , {
355
355
code : '<App>{ bar }</App>;' ,
@@ -411,7 +411,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
411
411
] . join ( '\n' ) ,
412
412
options : [ { attributes : { when : 'never' , allowMultiline : true } } ]
413
413
} , {
414
- code : '<App {...bar/* comment */} />;' ,
414
+ code : '<App {...bar/* comment 5 */} />;' ,
415
415
options : [ { attributes : { when : 'never' } } ]
416
416
} , {
417
417
code : '<App foo={bar} {...baz} />;'
@@ -440,13 +440,13 @@ ruleTester.run('jsx-curly-spacing', rule, {
440
440
] . join ( '\n' ) ,
441
441
options : [ { attributes : { when : 'always' } } ]
442
442
} , {
443
- code : '<App foo={bar/* comment */} {...baz/* comment */} />;' ,
443
+ code : '<App foo={bar/* comment 6 */} {...baz/* comment 7 */} />;' ,
444
444
options : [ { attributes : { when : 'never' } } ]
445
445
} , {
446
446
code : '<App foo={3} bar={ {a: 2} } />' ,
447
447
options : [ { attributes : { when : 'never' , spacing : { objectLiterals : 'always' } } } ]
448
448
} , {
449
- code : '<App>{bar/* comment */}</App>;' ,
449
+ code : '<App>{bar/* comment 8 */}</App>;' ,
450
450
options : [ { children : { when : 'never' } } ]
451
451
} , {
452
452
code : '<App>{bar} {baz}</App>;'
@@ -475,7 +475,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
475
475
] . join ( '\n' ) ,
476
476
options : [ { children : { when : 'always' } } ]
477
477
} , {
478
- code : '<App>{bar/* comment */} {baz/* comment */}</App>;' ,
478
+ code : '<App>{bar/* comment 9 */} {baz/* comment 10 */}</App>;' ,
479
479
options : [ { children : { when : 'never' } } ]
480
480
} , {
481
481
code : '<App>{3} { {a: 2} }</App>' ,
@@ -572,11 +572,11 @@ ruleTester.run('jsx-curly-spacing', rule, {
572
572
options : [ 'never' ]
573
573
} , {
574
574
code : [
575
- '<App>{/* comment */}</App>;'
575
+ '<App>{/* comment 11 */}</App>;'
576
576
] . join ( '\n' ) ,
577
577
options : [ 'never' ]
578
578
} , {
579
- code : '<App foo={bar/* comment */} />;' ,
579
+ code : '<App foo={bar/* comment 12 */} />;' ,
580
580
options : [ 'never' ]
581
581
} , {
582
582
code : '<App foo={ bar } />;' ,
@@ -636,7 +636,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
636
636
] . join ( '\n' ) ,
637
637
options : [ 'never' ]
638
638
} , {
639
- code : '<App {...bar/* comment */} />;' ,
639
+ code : '<App {...bar/* comment 13 */} />;' ,
640
640
options : [ 'never' ]
641
641
} , {
642
642
code : '<App foo={bar} {...baz} />;' ,
@@ -663,7 +663,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
663
663
] . join ( '\n' ) ,
664
664
options : [ 'always' ]
665
665
} , {
666
- code : '<App foo={bar/* comment */} {...baz/* comment */} />;' ,
666
+ code : '<App foo={bar/* comment 14 */} {...baz/* comment 15 */} />;' ,
667
667
options : [ 'never' ]
668
668
} , {
669
669
code : '<App foo={3} bar={ {a: 2} } />' ,
@@ -1514,33 +1514,33 @@ ruleTester.run('jsx-curly-spacing', rule, {
1514
1514
message : 'A space is required before \'}\''
1515
1515
} ]
1516
1516
} , {
1517
- code : '<App foo={ foo /* comment */ } />' ,
1518
- output : '<App foo={foo /* comment */} />' ,
1517
+ code : '<App foo={ foo /* comment 16 */ } />' ,
1518
+ output : '<App foo={foo /* comment 16 */} />' ,
1519
1519
errors : [ {
1520
1520
message : 'There should be no space after \'{\''
1521
1521
} , {
1522
1522
message : 'There should be no space before \'}\''
1523
1523
} ]
1524
1524
} , {
1525
- code : '<App foo={foo /* comment */} />' ,
1526
- output : '<App foo={ foo /* comment */ } />' ,
1525
+ code : '<App foo={foo /* comment 17 */} />' ,
1526
+ output : '<App foo={ foo /* comment 17 */ } />' ,
1527
1527
options : [ { attributes : { when : 'always' } } ] ,
1528
1528
errors : [ {
1529
1529
message : 'A space is required after \'{\''
1530
1530
} , {
1531
1531
message : 'A space is required before \'}\''
1532
1532
} ]
1533
1533
} , {
1534
- code : '<App foo={ /* comment */ foo } />' ,
1535
- output : '<App foo={/* comment */ foo} />' ,
1534
+ code : '<App foo={ /* comment 18 */ foo } />' ,
1535
+ output : '<App foo={/* comment 18 */ foo} />' ,
1536
1536
errors : [ {
1537
1537
message : 'There should be no space after \'{\''
1538
1538
} , {
1539
1539
message : 'There should be no space before \'}\''
1540
1540
} ]
1541
1541
} , {
1542
- code : '<App foo={/* comment */ foo} />' ,
1543
- output : '<App foo={ /* comment */ foo } />' ,
1542
+ code : '<App foo={/* comment 19 */ foo} />' ,
1543
+ output : '<App foo={ /* comment 19 */ foo } />' ,
1544
1544
options : [ { attributes : { when : 'always' } } ] ,
1545
1545
errors : [ {
1546
1546
message : 'A space is required after \'{\''
@@ -1687,17 +1687,17 @@ ruleTester.run('jsx-curly-spacing', rule, {
1687
1687
message : 'A space is required before \'}\''
1688
1688
} ]
1689
1689
} , {
1690
- code : '<App>{foo /* comment */}</App>' ,
1691
- output : '<App>{ foo /* comment */ }</App>' ,
1690
+ code : '<App>{foo /* comment 20 */}</App>' ,
1691
+ output : '<App>{ foo /* comment 20 */ }</App>' ,
1692
1692
options : [ { children : { when : 'always' } } ] ,
1693
1693
errors : [ {
1694
1694
message : 'A space is required after \'{\''
1695
1695
} , {
1696
1696
message : 'A space is required before \'}\''
1697
1697
} ]
1698
1698
} , {
1699
- code : '<App>{/* comment */ foo}</App>' ,
1700
- output : '<App>{ /* comment */ foo }</App>' ,
1699
+ code : '<App>{/* comment 21 */ foo}</App>' ,
1700
+ output : '<App>{ /* comment 21 */ foo }</App>' ,
1701
1701
options : [ { children : { when : 'always' } } ] ,
1702
1702
errors : [ {
1703
1703
message : 'A space is required after \'{\''
@@ -2108,40 +2108,40 @@ ruleTester.run('jsx-curly-spacing', rule, {
2108
2108
message : 'A space is required before \'}\''
2109
2109
} ]
2110
2110
} , {
2111
- code : '<App foo={foo /* comment */} />' ,
2112
- output : '<App foo={ foo /* comment */ } />' ,
2111
+ code : '<App foo={foo /* comment 22 */} />' ,
2112
+ output : '<App foo={ foo /* comment 22 */ } />' ,
2113
2113
options : [ 'always' ] ,
2114
2114
errors : [ {
2115
2115
message : 'A space is required after \'{\''
2116
2116
} , {
2117
2117
message : 'A space is required before \'}\''
2118
2118
} ]
2119
2119
} , {
2120
- code : '<App foo={/* comment */ foo} />' ,
2121
- output : '<App foo={ /* comment */ foo } />' ,
2120
+ code : '<App foo={/* comment 23 */ foo} />' ,
2121
+ output : '<App foo={ /* comment 23 */ foo } />' ,
2122
2122
options : [ 'always' ] ,
2123
2123
errors : [ {
2124
2124
message : 'A space is required after \'{\''
2125
2125
} , {
2126
2126
message : 'A space is required before \'}\''
2127
2127
} ]
2128
2128
} , {
2129
- code : '<App>{/*comment */ }</App>' ,
2130
- output : '<App>{/*comment */}</App>' ,
2129
+ code : '<App>{/*comment24 */ }</App>' ,
2130
+ output : '<App>{/*comment24 */}</App>' ,
2131
2131
options : [ { children : { when : 'never' } } ] ,
2132
2132
errors : [ {
2133
2133
message : 'There should be no space before \'}\''
2134
2134
} ]
2135
2135
} , {
2136
- code : '<App>{ /*comment */}</App>' ,
2137
- output : '<App>{/*comment */}</App>' ,
2136
+ code : '<App>{ /*comment25 */}</App>' ,
2137
+ output : '<App>{/*comment25 */}</App>' ,
2138
2138
options : [ { children : { when : 'never' } } ] ,
2139
2139
errors : [ {
2140
2140
message : 'There should be no space after \'{\''
2141
2141
} ]
2142
2142
} , {
2143
- code : '<App>{/*comment */}</App>' ,
2144
- output : '<App>{ /*comment */ }</App>' ,
2143
+ code : '<App>{/*comment26 */}</App>' ,
2144
+ output : '<App>{ /*comment26 */ }</App>' ,
2145
2145
options : [ { children : { when : 'always' } } ] ,
2146
2146
errors : [ {
2147
2147
message : 'A space is required after \'{\''
@@ -2151,12 +2151,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
2151
2151
} , {
2152
2152
code : [
2153
2153
'<App>' ,
2154
- '{ /* comment */ }' ,
2154
+ '{ /* comment 27 */ }' ,
2155
2155
'</App>;'
2156
2156
] . join ( '\n' ) ,
2157
2157
output : [
2158
2158
'<App>' ,
2159
- '{/* comment */}' ,
2159
+ '{/* comment 27 */}' ,
2160
2160
'</App>;'
2161
2161
] . join ( '\n' ) ,
2162
2162
options : [ { when : 'never' , children : true } ] ,
@@ -2168,12 +2168,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
2168
2168
} , {
2169
2169
code : [
2170
2170
'<App>' ,
2171
- '{/* comment */}' ,
2171
+ '{/* comment 28 */}' ,
2172
2172
'</App>;'
2173
2173
] . join ( '\n' ) ,
2174
2174
output : [
2175
2175
'<App>' ,
2176
- '{ /* comment */ }' ,
2176
+ '{ /* comment 28 */ }' ,
2177
2177
'</App>;'
2178
2178
] . join ( '\n' ) ,
2179
2179
options : [ { when : 'always' , children : true } ] ,
@@ -2185,13 +2185,13 @@ ruleTester.run('jsx-curly-spacing', rule, {
2185
2185
} , {
2186
2186
code : [
2187
2187
'<App>' ,
2188
- '{/*comment */' ,
2188
+ '{/*comment29 */' ,
2189
2189
'}' ,
2190
2190
'</App>'
2191
2191
] . join ( '\n' ) ,
2192
2192
output : [
2193
2193
'<App>' ,
2194
- '{/*comment */}' ,
2194
+ '{/*comment29 */}' ,
2195
2195
'</App>'
2196
2196
] . join ( '\n' ) ,
2197
2197
options : [ { children : { when : 'never' , allowMultiline : false } } ] ,
@@ -2202,12 +2202,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
2202
2202
code : [
2203
2203
'<App>' ,
2204
2204
'{' ,
2205
- '/*comment */}' ,
2205
+ '/*comment30 */}' ,
2206
2206
'</App>'
2207
2207
] . join ( '\n' ) ,
2208
2208
output : [
2209
2209
'<App>' ,
2210
- '{/*comment */}' ,
2210
+ '{/*comment30 */}' ,
2211
2211
'</App>'
2212
2212
] . join ( '\n' ) ,
2213
2213
options : [ { children : { when : 'never' , allowMultiline : false } } ] ,
@@ -2216,18 +2216,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
2216
2216
} ]
2217
2217
} , {
2218
2218
code : [
2219
- '<App>{ /* comment */' ,
2219
+ '<App>{ /* comment 31 */' ,
2220
2220
'bar' ,
2221
2221
'} {' ,
2222
2222
'baz' ,
2223
- '/* comment */ }</App>;'
2223
+ '/* comment 32 */ }</App>;'
2224
2224
] . join ( '\n' ) ,
2225
2225
output : [
2226
- '<App>{/* comment */' ,
2226
+ '<App>{/* comment 31 */' ,
2227
2227
'bar' ,
2228
2228
'} {' ,
2229
2229
'baz' ,
2230
- '/* comment */}</App>;'
2230
+ '/* comment 32 */}</App>;'
2231
2231
] . join ( '\n' ) ,
2232
2232
options : [ { when : 'never' , children : true } ] ,
2233
2233
errors : [ {
@@ -2237,18 +2237,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
2237
2237
} ]
2238
2238
} , {
2239
2239
code : [
2240
- '<App>{/* comment */' ,
2240
+ '<App>{/* comment 33 */' ,
2241
2241
'bar' ,
2242
2242
'} {' ,
2243
2243
'baz' ,
2244
- '/* comment */}</App>;'
2244
+ '/* comment 33 */}</App>;'
2245
2245
] . join ( '\n' ) ,
2246
2246
output : [
2247
- '<App>{ /* comment */' ,
2247
+ '<App>{ /* comment 33 */' ,
2248
2248
'bar' ,
2249
2249
'} {' ,
2250
2250
'baz' ,
2251
- '/* comment */ }</App>;'
2251
+ '/* comment 33 */ }</App>;'
2252
2252
] . join ( '\n' ) ,
2253
2253
options : [ { when : 'always' , children : true } ] ,
2254
2254
errors : [ {
0 commit comments