@@ -59,9 +59,9 @@ ruleTester.run('jsx-curly-spacing', rule, {
5959 '</App>;'
6060 ] . join ( '\n' )
6161 } , {
62- code : '<App>{ foo /* comment */ }</App>'
62+ code : '<App>{ foo /* comment 1 */ }</App>'
6363 } , {
64- code : '<App>{ /* comment */ foo }</App>'
64+ code : '<App>{ /* comment 1 */ foo }</App>'
6565 } , {
6666 code : '<App foo={bar} />;' ,
6767 options : [ { attributes : true } ]
@@ -264,7 +264,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
264264 ] . join ( '\n' ) ,
265265 options : [ { attributes : { when : 'never' , allowMultiline : true } } ]
266266 } , {
267- code : '<App foo={bar/* comment */} />;' ,
267+ code : '<App foo={bar/* comment 2 */} />;' ,
268268 options : [ { attributes : { when : 'never' } } ]
269269 } , {
270270 code : '<App foo={ bar } />;' ,
@@ -345,11 +345,11 @@ ruleTester.run('jsx-curly-spacing', rule, {
345345 options : [ { children : { when : 'never' , allowMultiline : true } } ]
346346 } , {
347347 code : [
348- '<App>{/* comment */}</App>;'
348+ '<App>{/* comment 3 */}</App>;'
349349 ] . join ( '\n' ) ,
350350 options : [ { children : { when : 'never' } } ]
351351 } , {
352- code : '<App>{bar/* comment */}</App>;' ,
352+ code : '<App>{bar/* comment 4 */}</App>;' ,
353353 options : [ { children : { when : 'never' } } ]
354354 } , {
355355 code : '<App>{ bar }</App>;' ,
@@ -411,7 +411,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
411411 ] . join ( '\n' ) ,
412412 options : [ { attributes : { when : 'never' , allowMultiline : true } } ]
413413 } , {
414- code : '<App {...bar/* comment */} />;' ,
414+ code : '<App {...bar/* comment 5 */} />;' ,
415415 options : [ { attributes : { when : 'never' } } ]
416416 } , {
417417 code : '<App foo={bar} {...baz} />;'
@@ -440,13 +440,13 @@ ruleTester.run('jsx-curly-spacing', rule, {
440440 ] . join ( '\n' ) ,
441441 options : [ { attributes : { when : 'always' } } ]
442442 } , {
443- code : '<App foo={bar/* comment */} {...baz/* comment */} />;' ,
443+ code : '<App foo={bar/* comment 6 */} {...baz/* comment 7 */} />;' ,
444444 options : [ { attributes : { when : 'never' } } ]
445445 } , {
446446 code : '<App foo={3} bar={ {a: 2} } />' ,
447447 options : [ { attributes : { when : 'never' , spacing : { objectLiterals : 'always' } } } ]
448448 } , {
449- code : '<App>{bar/* comment */}</App>;' ,
449+ code : '<App>{bar/* comment 8 */}</App>;' ,
450450 options : [ { children : { when : 'never' } } ]
451451 } , {
452452 code : '<App>{bar} {baz}</App>;'
@@ -475,7 +475,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
475475 ] . join ( '\n' ) ,
476476 options : [ { children : { when : 'always' } } ]
477477 } , {
478- code : '<App>{bar/* comment */} {baz/* comment */}</App>;' ,
478+ code : '<App>{bar/* comment 9 */} {baz/* comment 10 */}</App>;' ,
479479 options : [ { children : { when : 'never' } } ]
480480 } , {
481481 code : '<App>{3} { {a: 2} }</App>' ,
@@ -572,11 +572,11 @@ ruleTester.run('jsx-curly-spacing', rule, {
572572 options : [ 'never' ]
573573 } , {
574574 code : [
575- '<App>{/* comment */}</App>;'
575+ '<App>{/* comment 11 */}</App>;'
576576 ] . join ( '\n' ) ,
577577 options : [ 'never' ]
578578 } , {
579- code : '<App foo={bar/* comment */} />;' ,
579+ code : '<App foo={bar/* comment 12 */} />;' ,
580580 options : [ 'never' ]
581581 } , {
582582 code : '<App foo={ bar } />;' ,
@@ -636,7 +636,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
636636 ] . join ( '\n' ) ,
637637 options : [ 'never' ]
638638 } , {
639- code : '<App {...bar/* comment */} />;' ,
639+ code : '<App {...bar/* comment 13 */} />;' ,
640640 options : [ 'never' ]
641641 } , {
642642 code : '<App foo={bar} {...baz} />;' ,
@@ -663,7 +663,7 @@ ruleTester.run('jsx-curly-spacing', rule, {
663663 ] . join ( '\n' ) ,
664664 options : [ 'always' ]
665665 } , {
666- code : '<App foo={bar/* comment */} {...baz/* comment */} />;' ,
666+ code : '<App foo={bar/* comment 14 */} {...baz/* comment 15 */} />;' ,
667667 options : [ 'never' ]
668668 } , {
669669 code : '<App foo={3} bar={ {a: 2} } />' ,
@@ -1514,33 +1514,33 @@ ruleTester.run('jsx-curly-spacing', rule, {
15141514 message : 'A space is required before \'}\''
15151515 } ]
15161516 } , {
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 */} />' ,
15191519 errors : [ {
15201520 message : 'There should be no space after \'{\''
15211521 } , {
15221522 message : 'There should be no space before \'}\''
15231523 } ]
15241524 } , {
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 */ } />' ,
15271527 options : [ { attributes : { when : 'always' } } ] ,
15281528 errors : [ {
15291529 message : 'A space is required after \'{\''
15301530 } , {
15311531 message : 'A space is required before \'}\''
15321532 } ]
15331533 } , {
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} />' ,
15361536 errors : [ {
15371537 message : 'There should be no space after \'{\''
15381538 } , {
15391539 message : 'There should be no space before \'}\''
15401540 } ]
15411541 } , {
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 } />' ,
15441544 options : [ { attributes : { when : 'always' } } ] ,
15451545 errors : [ {
15461546 message : 'A space is required after \'{\''
@@ -1687,17 +1687,17 @@ ruleTester.run('jsx-curly-spacing', rule, {
16871687 message : 'A space is required before \'}\''
16881688 } ]
16891689 } , {
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>' ,
16921692 options : [ { children : { when : 'always' } } ] ,
16931693 errors : [ {
16941694 message : 'A space is required after \'{\''
16951695 } , {
16961696 message : 'A space is required before \'}\''
16971697 } ]
16981698 } , {
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>' ,
17011701 options : [ { children : { when : 'always' } } ] ,
17021702 errors : [ {
17031703 message : 'A space is required after \'{\''
@@ -2108,40 +2108,40 @@ ruleTester.run('jsx-curly-spacing', rule, {
21082108 message : 'A space is required before \'}\''
21092109 } ]
21102110 } , {
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 */ } />' ,
21132113 options : [ 'always' ] ,
21142114 errors : [ {
21152115 message : 'A space is required after \'{\''
21162116 } , {
21172117 message : 'A space is required before \'}\''
21182118 } ]
21192119 } , {
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 } />' ,
21222122 options : [ 'always' ] ,
21232123 errors : [ {
21242124 message : 'A space is required after \'{\''
21252125 } , {
21262126 message : 'A space is required before \'}\''
21272127 } ]
21282128 } , {
2129- code : '<App>{/*comment */ }</App>' ,
2130- output : '<App>{/*comment */}</App>' ,
2129+ code : '<App>{/*comment24 */ }</App>' ,
2130+ output : '<App>{/*comment24 */}</App>' ,
21312131 options : [ { children : { when : 'never' } } ] ,
21322132 errors : [ {
21332133 message : 'There should be no space before \'}\''
21342134 } ]
21352135 } , {
2136- code : '<App>{ /*comment */}</App>' ,
2137- output : '<App>{/*comment */}</App>' ,
2136+ code : '<App>{ /*comment25 */}</App>' ,
2137+ output : '<App>{/*comment25 */}</App>' ,
21382138 options : [ { children : { when : 'never' } } ] ,
21392139 errors : [ {
21402140 message : 'There should be no space after \'{\''
21412141 } ]
21422142 } , {
2143- code : '<App>{/*comment */}</App>' ,
2144- output : '<App>{ /*comment */ }</App>' ,
2143+ code : '<App>{/*comment26 */}</App>' ,
2144+ output : '<App>{ /*comment26 */ }</App>' ,
21452145 options : [ { children : { when : 'always' } } ] ,
21462146 errors : [ {
21472147 message : 'A space is required after \'{\''
@@ -2151,12 +2151,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
21512151 } , {
21522152 code : [
21532153 '<App>' ,
2154- '{ /* comment */ }' ,
2154+ '{ /* comment 27 */ }' ,
21552155 '</App>;'
21562156 ] . join ( '\n' ) ,
21572157 output : [
21582158 '<App>' ,
2159- '{/* comment */}' ,
2159+ '{/* comment 27 */}' ,
21602160 '</App>;'
21612161 ] . join ( '\n' ) ,
21622162 options : [ { when : 'never' , children : true } ] ,
@@ -2168,12 +2168,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
21682168 } , {
21692169 code : [
21702170 '<App>' ,
2171- '{/* comment */}' ,
2171+ '{/* comment 28 */}' ,
21722172 '</App>;'
21732173 ] . join ( '\n' ) ,
21742174 output : [
21752175 '<App>' ,
2176- '{ /* comment */ }' ,
2176+ '{ /* comment 28 */ }' ,
21772177 '</App>;'
21782178 ] . join ( '\n' ) ,
21792179 options : [ { when : 'always' , children : true } ] ,
@@ -2185,13 +2185,13 @@ ruleTester.run('jsx-curly-spacing', rule, {
21852185 } , {
21862186 code : [
21872187 '<App>' ,
2188- '{/*comment */' ,
2188+ '{/*comment29 */' ,
21892189 '}' ,
21902190 '</App>'
21912191 ] . join ( '\n' ) ,
21922192 output : [
21932193 '<App>' ,
2194- '{/*comment */}' ,
2194+ '{/*comment29 */}' ,
21952195 '</App>'
21962196 ] . join ( '\n' ) ,
21972197 options : [ { children : { when : 'never' , allowMultiline : false } } ] ,
@@ -2202,12 +2202,12 @@ ruleTester.run('jsx-curly-spacing', rule, {
22022202 code : [
22032203 '<App>' ,
22042204 '{' ,
2205- '/*comment */}' ,
2205+ '/*comment30 */}' ,
22062206 '</App>'
22072207 ] . join ( '\n' ) ,
22082208 output : [
22092209 '<App>' ,
2210- '{/*comment */}' ,
2210+ '{/*comment30 */}' ,
22112211 '</App>'
22122212 ] . join ( '\n' ) ,
22132213 options : [ { children : { when : 'never' , allowMultiline : false } } ] ,
@@ -2216,18 +2216,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
22162216 } ]
22172217 } , {
22182218 code : [
2219- '<App>{ /* comment */' ,
2219+ '<App>{ /* comment 31 */' ,
22202220 'bar' ,
22212221 '} {' ,
22222222 'baz' ,
2223- '/* comment */ }</App>;'
2223+ '/* comment 32 */ }</App>;'
22242224 ] . join ( '\n' ) ,
22252225 output : [
2226- '<App>{/* comment */' ,
2226+ '<App>{/* comment 31 */' ,
22272227 'bar' ,
22282228 '} {' ,
22292229 'baz' ,
2230- '/* comment */}</App>;'
2230+ '/* comment 32 */}</App>;'
22312231 ] . join ( '\n' ) ,
22322232 options : [ { when : 'never' , children : true } ] ,
22332233 errors : [ {
@@ -2237,18 +2237,18 @@ ruleTester.run('jsx-curly-spacing', rule, {
22372237 } ]
22382238 } , {
22392239 code : [
2240- '<App>{/* comment */' ,
2240+ '<App>{/* comment 33 */' ,
22412241 'bar' ,
22422242 '} {' ,
22432243 'baz' ,
2244- '/* comment */}</App>;'
2244+ '/* comment 33 */}</App>;'
22452245 ] . join ( '\n' ) ,
22462246 output : [
2247- '<App>{ /* comment */' ,
2247+ '<App>{ /* comment 33 */' ,
22482248 'bar' ,
22492249 '} {' ,
22502250 'baz' ,
2251- '/* comment */ }</App>;'
2251+ '/* comment 33 */ }</App>;'
22522252 ] . join ( '\n' ) ,
22532253 options : [ { when : 'always' , children : true } ] ,
22542254 errors : [ {
0 commit comments