@@ -201,7 +201,7 @@ ruleTester.run('jsx-no-literals', rule, {
201
201
}
202
202
` ,
203
203
parser : 'babel-eslint' ,
204
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
204
+ errors : [ { message : 'Missing JSX expression container around literal string:test ' } ]
205
205
} , {
206
206
code : `
207
207
class Comp1 extends Component {
@@ -211,7 +211,7 @@ ruleTester.run('jsx-no-literals', rule, {
211
211
}
212
212
` ,
213
213
parser : 'babel-eslint' ,
214
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
214
+ errors : [ { message : 'Missing JSX expression container around literal string:test ' } ]
215
215
} , {
216
216
code : `
217
217
class Comp1 extends Component {
@@ -222,7 +222,7 @@ ruleTester.run('jsx-no-literals', rule, {
222
222
}
223
223
` ,
224
224
parser : 'babel-eslint' ,
225
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
225
+ errors : [ { message : 'Missing JSX expression container around literal string:test ' } ]
226
226
} , {
227
227
code : `
228
228
class Comp1 extends Component {
@@ -233,7 +233,7 @@ ruleTester.run('jsx-no-literals', rule, {
233
233
}
234
234
` ,
235
235
parser : 'babel-eslint' ,
236
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
236
+ errors : [ { message : 'Missing JSX expression container around literal string:test ' } ]
237
237
} , {
238
238
code : `
239
239
var Hello = createReactClass({
@@ -244,7 +244,7 @@ ruleTester.run('jsx-no-literals', rule, {
244
244
});
245
245
` ,
246
246
parser : 'babel-eslint' ,
247
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
247
+ errors : [ { message : 'Missing JSX expression container around literal string:hello ' } ]
248
248
} , {
249
249
code : `
250
250
class Comp1 extends Component {
@@ -258,7 +258,7 @@ ruleTester.run('jsx-no-literals', rule, {
258
258
}
259
259
` ,
260
260
parser : 'babel-eslint' ,
261
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
261
+ errors : [ { message : 'Missing JSX expression container around literal string:asdjfl ' } ]
262
262
} , {
263
263
code : `
264
264
class Comp1 extends Component {
@@ -274,7 +274,7 @@ ruleTester.run('jsx-no-literals', rule, {
274
274
}
275
275
` ,
276
276
parser : 'babel-eslint' ,
277
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
277
+ errors : [ { message : 'Missing JSX expression container around literal string:asdjfl\n test\n foo ' } ]
278
278
} , {
279
279
code : `
280
280
class Comp1 extends Component {
@@ -290,7 +290,7 @@ ruleTester.run('jsx-no-literals', rule, {
290
290
}
291
291
` ,
292
292
parser : 'babel-eslint' ,
293
- errors : [ { message : 'Missing JSX expression container around literal string' } ]
293
+ errors : [ { message : 'Missing JSX expression container around literal string:test ' } ]
294
294
} , {
295
295
code : `
296
296
<Foo bar="test">
@@ -299,23 +299,23 @@ ruleTester.run('jsx-no-literals', rule, {
299
299
` ,
300
300
parser : 'babel-eslint' ,
301
301
options : [ { noStrings : true } ] ,
302
- errors : [ { message : 'Strings not allowed in JSX files' } ]
302
+ errors : [ { message : 'Strings not allowed in JSX files:\'Test\' ' } ]
303
303
} , {
304
304
code : `
305
305
<Foo bar="test">
306
306
{'Test'}
307
307
</Foo>
308
308
` ,
309
309
options : [ { noStrings : true } ] ,
310
- errors : [ { message : 'Strings not allowed in JSX files' } ]
310
+ errors : [ { message : 'Strings not allowed in JSX files:\'Test\' ' } ]
311
311
} , {
312
312
code : `
313
313
<Foo bar="test">
314
314
{'Test' + name}
315
315
</Foo>
316
316
` ,
317
317
options : [ { noStrings : true } ] ,
318
- errors : [ { message : 'Strings not allowed in JSX files' } ]
318
+ errors : [ { message : 'Strings not allowed in JSX files:\'Test\' ' } ]
319
319
} , {
320
320
code : `
321
321
<Foo bar="test">
@@ -324,55 +324,55 @@ ruleTester.run('jsx-no-literals', rule, {
324
324
` ,
325
325
parser : 'babel-eslint' ,
326
326
options : [ { noStrings : true } ] ,
327
- errors : [ { message : 'Strings not allowed in JSX files' } ]
327
+ errors : [ { message : 'Strings not allowed in JSX files:Test ' } ]
328
328
} , {
329
329
code : `
330
330
<Foo bar="test">
331
331
Test
332
332
</Foo>
333
333
` ,
334
334
options : [ { noStrings : true } ] ,
335
- errors : [ { message : 'Strings not allowed in JSX files' } ]
335
+ errors : [ { message : 'Strings not allowed in JSX files:Test ' } ]
336
336
} , {
337
337
code : `
338
338
<Foo>
339
339
{\`Test\`}
340
340
</Foo>
341
341
` ,
342
342
options : [ { noStrings : true } ] ,
343
- errors : [ { message : 'Strings not allowed in JSX files' } ]
343
+ errors : [ { message : 'Strings not allowed in JSX files:`Test` ' } ]
344
344
} , {
345
345
code : '<Foo bar={`Test`} />' ,
346
346
options : [ { noStrings : true } ] ,
347
- errors : [ { message : 'Strings not allowed in JSX files' } ]
347
+ errors : [ { message : 'Strings not allowed in JSX files:`Test` ' } ]
348
348
} , {
349
349
code : '<Foo bar={`${baz}`} />' ,
350
350
options : [ { noStrings : true } ] ,
351
- errors : [ { message : 'Strings not allowed in JSX files' } ]
351
+ errors : [ { message : 'Strings not allowed in JSX files:`${baz}` ' } ]
352
352
} , {
353
353
code : '<Foo bar={`Test ${baz}`} />' ,
354
354
options : [ { noStrings : true } ] ,
355
- errors : [ { message : 'Strings not allowed in JSX files' } ]
355
+ errors : [ { message : 'Strings not allowed in JSX files:`Test ${baz}` ' } ]
356
356
} , {
357
357
code : '<Foo bar={`foo` + \'bar\'} />' ,
358
358
options : [ { noStrings : true } ] ,
359
359
errors : [
360
- { message : 'Strings not allowed in JSX files' } ,
361
- { message : 'Strings not allowed in JSX files' }
360
+ { message : 'Strings not allowed in JSX files:`foo` ' } ,
361
+ { message : 'Strings not allowed in JSX files:\'bar\' ' }
362
362
]
363
363
} , {
364
364
code : '<Foo bar={`foo` + `bar`} />' ,
365
365
options : [ { noStrings : true } ] ,
366
366
errors : [
367
- { message : 'Strings not allowed in JSX files' } ,
368
- { message : 'Strings not allowed in JSX files' }
367
+ { message : 'Strings not allowed in JSX files:`foo` ' } ,
368
+ { message : 'Strings not allowed in JSX files:`bar` ' }
369
369
]
370
370
} , {
371
371
code : '<Foo bar={\'foo\' + `bar`} />' ,
372
372
options : [ { noStrings : true } ] ,
373
373
errors : [
374
- { message : 'Strings not allowed in JSX files' } ,
375
- { message : 'Strings not allowed in JSX files' }
374
+ { message : 'Strings not allowed in JSX files:\'foo\' ' } ,
375
+ { message : 'Strings not allowed in JSX files:`bar` ' }
376
376
]
377
377
}
378
378
]
0 commit comments