@@ -84,15 +84,15 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
84
84
{
85
85
code : `
86
86
<button
87
- title="Some button"
87
+ title="Some button 8 "
88
88
type="button"
89
89
/>
90
90
` ,
91
91
} ,
92
92
{
93
93
code : `
94
94
<button
95
- title="Some button"
95
+ title="Some button 8 "
96
96
onClick={(value) => {
97
97
console.log(value);
98
98
}}
@@ -104,7 +104,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
104
104
{
105
105
code : `
106
106
<button
107
- title="Some button"
107
+ title="Some button 2 "
108
108
// this is a comment
109
109
onClick={(value) => {
110
110
console.log(value);
@@ -116,7 +116,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
116
116
{
117
117
code : `
118
118
<button
119
- title="Some button"
119
+ title="Some button 2 "
120
120
// this is a comment
121
121
// this is a second comment
122
122
onClick={(value) => {
@@ -129,7 +129,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
129
129
{
130
130
code : `
131
131
<App
132
- foo="Some button" // comment
132
+ foo="Some button 3 " // comment
133
133
// comment
134
134
bar=""
135
135
/>
@@ -138,7 +138,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
138
138
{
139
139
code : `
140
140
<button
141
- title="Some button"
141
+ title="Some button 3 "
142
142
/* this is a multiline comment
143
143
...
144
144
... */
@@ -263,6 +263,12 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
263
263
type="button"
264
264
/>
265
265
` ,
266
+ output : `
267
+ <button
268
+ title='Some button'${ semver . satisfies ( eslintPkg . version , '> 3' ) ? '' : '\n' }
269
+ type="button"
270
+ />
271
+ ` ,
266
272
errors : [
267
273
{
268
274
messageId : 'noLineGap' ,
@@ -273,7 +279,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
273
279
{
274
280
code : `
275
281
<button
276
- title="Some button"
282
+ title="Some button 4 "
277
283
278
284
onClick={(value) => {
279
285
console.log(value);
@@ -282,6 +288,15 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
282
288
type="button"
283
289
/>
284
290
` ,
291
+ output : `
292
+ <button
293
+ title="Some button 4"${ semver . satisfies ( eslintPkg . version , '> 3' ) ? '' : '\n' }
294
+ onClick={(value) => {
295
+ console.log(value);
296
+ }}${ semver . satisfies ( eslintPkg . version , '> 3' ) ? '' : '\n' }
297
+ type="button"
298
+ />
299
+ ` ,
285
300
errors : [
286
301
{
287
302
messageId : 'noLineGap' ,
@@ -297,7 +312,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
297
312
{
298
313
code : `
299
314
<button
300
- title="Some button"
315
+ title="Some button 5 "
301
316
// this is a comment
302
317
onClick={(value) => {
303
318
console.log(value);
@@ -306,6 +321,16 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
306
321
type="button"
307
322
/>
308
323
` ,
324
+ output : `
325
+ <button
326
+ title="Some button 5"
327
+ // this is a comment
328
+ onClick={(value) => {
329
+ console.log(value);
330
+ }}
331
+ type="button"
332
+ />
333
+ ` ,
309
334
errors : [
310
335
{
311
336
messageId : 'noLineGap' ,
@@ -316,7 +341,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
316
341
{
317
342
code : `
318
343
<button
319
- title="Some button"
344
+ title="Some button 6 "
320
345
// this is a comment
321
346
// second comment
322
347
@@ -327,6 +352,17 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
327
352
type="button"
328
353
/>
329
354
` ,
355
+ output : `
356
+ <button
357
+ title="Some button 6"
358
+ // this is a comment
359
+ // second comment
360
+ onClick={(value) => {
361
+ console.log(value);
362
+ }}
363
+ type="button"
364
+ />
365
+ ` ,
330
366
errors : [
331
367
{
332
368
messageId : 'noLineGap' ,
@@ -341,7 +377,7 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
341
377
{
342
378
code : `
343
379
<button
344
- title="Some button"
380
+ title="Some button 7 "
345
381
/*this is a
346
382
multiline
347
383
comment
@@ -354,6 +390,19 @@ ruleTester.run('jsx-props-no-multi-spaces', rule, {
354
390
type="button"
355
391
/>
356
392
` ,
393
+ output : `
394
+ <button
395
+ title="Some button 7"
396
+ /*this is a
397
+ multiline
398
+ comment
399
+ */
400
+ onClick={(value) => {
401
+ console.log(value);
402
+ }}
403
+ type="button"
404
+ />
405
+ ` ,
357
406
errors : [
358
407
{
359
408
messageId : 'noLineGap' ,
0 commit comments