@@ -187,14 +187,14 @@ ruleTester.run('component-definition-name-casing', rule, {
187
187
name: 'FooBar'
188
188
}
189
189
` ,
190
+ languageOptions,
190
191
errors : [
191
192
{
192
193
message : 'Property name "foo-bar" is not PascalCase.' ,
193
194
type : 'Literal' ,
194
195
line : 3
195
196
}
196
- ] ,
197
- languageOptions
197
+ ]
198
198
} ,
199
199
{
200
200
filename : 'test.vue' ,
@@ -204,14 +204,14 @@ ruleTester.run('component-definition-name-casing', rule, {
204
204
}
205
205
` ,
206
206
output : null ,
207
+ languageOptions,
207
208
errors : [
208
209
{
209
210
message : 'Property name "foo bar" is not PascalCase.' ,
210
211
type : 'Literal' ,
211
212
line : 3
212
213
}
213
- ] ,
214
- languageOptions
214
+ ]
215
215
} ,
216
216
{
217
217
filename : 'test.vue' ,
@@ -221,14 +221,14 @@ ruleTester.run('component-definition-name-casing', rule, {
221
221
}
222
222
` ,
223
223
output : null ,
224
+ languageOptions,
224
225
errors : [
225
226
{
226
227
message : 'Property name "foo!bar" is not PascalCase.' ,
227
228
type : 'Literal' ,
228
229
line : 3
229
230
}
230
- ] ,
231
- languageOptions
231
+ ]
232
232
} ,
233
233
{
234
234
filename : 'test.js' ,
@@ -238,14 +238,14 @@ ruleTester.run('component-definition-name-casing', rule, {
238
238
})
239
239
` ,
240
240
output : null ,
241
+ languageOptions : { ecmaVersion : 6 } ,
241
242
errors : [
242
243
{
243
244
message : 'Property name "foo!bar" is not PascalCase.' ,
244
245
type : 'Literal' ,
245
246
line : 3
246
247
}
247
- ] ,
248
- languageOptions : { ecmaVersion : 6 }
248
+ ]
249
249
} ,
250
250
{
251
251
filename : 'test.vue' ,
@@ -259,14 +259,14 @@ ruleTester.run('component-definition-name-casing', rule, {
259
259
name: 'FooBar'
260
260
}
261
261
` ,
262
+ languageOptions,
262
263
errors : [
263
264
{
264
265
message : 'Property name "foo_bar" is not PascalCase.' ,
265
266
type : 'Literal' ,
266
267
line : 3
267
268
}
268
- ] ,
269
- languageOptions
269
+ ]
270
270
} ,
271
271
{
272
272
filename : 'test.vue' ,
@@ -281,14 +281,14 @@ ruleTester.run('component-definition-name-casing', rule, {
281
281
}
282
282
` ,
283
283
options : [ 'PascalCase' ] ,
284
+ languageOptions,
284
285
errors : [
285
286
{
286
287
message : 'Property name "foo_bar" is not PascalCase.' ,
287
288
type : 'Literal' ,
288
289
line : 3
289
290
}
290
- ] ,
291
- languageOptions
291
+ ]
292
292
} ,
293
293
{
294
294
filename : 'test.vue' ,
@@ -303,156 +303,156 @@ ruleTester.run('component-definition-name-casing', rule, {
303
303
}
304
304
` ,
305
305
options : [ 'kebab-case' ] ,
306
+ languageOptions,
306
307
errors : [
307
308
{
308
309
message : 'Property name "foo_bar" is not kebab-case.' ,
309
310
type : 'Literal' ,
310
311
line : 3
311
312
}
312
- ] ,
313
- languageOptions
313
+ ]
314
314
} ,
315
315
{
316
316
filename : 'test.vue' ,
317
317
code : `Vue.component('foo-bar', component)` ,
318
318
output : `Vue.component('FooBar', component)` ,
319
+ languageOptions,
319
320
errors : [
320
321
{
321
322
message : 'Property name "foo-bar" is not PascalCase.' ,
322
323
type : 'Literal' ,
323
324
line : 1
324
325
}
325
- ] ,
326
- languageOptions
326
+ ]
327
327
} ,
328
328
{
329
329
filename : 'test.vue' ,
330
330
code : `app.component('foo-bar', component)` ,
331
331
output : `app.component('FooBar', component)` ,
332
+ languageOptions,
332
333
errors : [
333
334
{
334
335
message : 'Property name "foo-bar" is not PascalCase.' ,
335
336
type : 'Literal' ,
336
337
line : 1
337
338
}
338
- ] ,
339
- languageOptions
339
+ ]
340
340
} ,
341
341
{
342
342
filename : 'test.vue' ,
343
343
code : `(Vue as VueConstructor<Vue>).component('foo-bar', component)` ,
344
344
output : `(Vue as VueConstructor<Vue>).component('FooBar', component)` ,
345
+ languageOptions : {
346
+ parser : require ( '@typescript-eslint/parser' ) ,
347
+ ...languageOptions
348
+ } ,
345
349
errors : [
346
350
{
347
351
message : 'Property name "foo-bar" is not PascalCase.' ,
348
352
type : 'Literal' ,
349
353
line : 1
350
354
}
351
- ] ,
352
- languageOptions : {
353
- parser : require ( '@typescript-eslint/parser' ) ,
354
- ...languageOptions
355
- }
355
+ ]
356
356
} ,
357
357
{
358
358
filename : 'test.vue' ,
359
359
code : `Vue.component('foo-bar', {})` ,
360
360
output : `Vue.component('FooBar', {})` ,
361
+ languageOptions,
361
362
errors : [
362
363
{
363
364
message : 'Property name "foo-bar" is not PascalCase.' ,
364
365
type : 'Literal' ,
365
366
line : 1
366
367
}
367
- ] ,
368
- languageOptions
368
+ ]
369
369
} ,
370
370
{
371
371
filename : 'test.vue' ,
372
372
code : `app.component('foo-bar', {})` ,
373
373
output : `app.component('FooBar', {})` ,
374
+ languageOptions,
374
375
errors : [
375
376
{
376
377
message : 'Property name "foo-bar" is not PascalCase.' ,
377
378
type : 'Literal' ,
378
379
line : 1
379
380
}
380
- ] ,
381
- languageOptions
381
+ ]
382
382
} ,
383
383
{
384
384
filename : 'test.js' ,
385
385
code : `Vue.component('foo_bar', {})` ,
386
386
output : `Vue.component('FooBar', {})` ,
387
387
options : [ 'PascalCase' ] ,
388
+ languageOptions,
388
389
errors : [
389
390
{
390
391
message : 'Property name "foo_bar" is not PascalCase.' ,
391
392
type : 'Literal' ,
392
393
line : 1
393
394
}
394
- ] ,
395
- languageOptions
395
+ ]
396
396
} ,
397
397
{
398
398
filename : 'test.vue' ,
399
399
code : `Vue.component('foo_bar', {})` ,
400
400
output : `Vue.component('foo-bar', {})` ,
401
401
options : [ 'kebab-case' ] ,
402
+ languageOptions,
402
403
errors : [
403
404
{
404
405
message : 'Property name "foo_bar" is not kebab-case.' ,
405
406
type : 'Literal' ,
406
407
line : 1
407
408
}
408
- ] ,
409
- languageOptions
409
+ ]
410
410
} ,
411
411
{
412
412
filename : 'test.vue' ,
413
413
code : `Vue.component(\`foo_bar\`, {})` ,
414
414
output : `Vue.component(\`foo-bar\`, {})` ,
415
415
options : [ 'kebab-case' ] ,
416
+ languageOptions,
416
417
errors : [
417
418
{
418
419
message : 'Property name "foo_bar" is not kebab-case.' ,
419
420
type : 'TemplateLiteral' ,
420
421
line : 1
421
422
}
422
- ] ,
423
- languageOptions
423
+ ]
424
424
} ,
425
425
{
426
426
filename : 'test.vue' ,
427
427
code : `<script setup> defineOptions({name: 'foo-bar'}) </script>` ,
428
428
output : `<script setup> defineOptions({name: 'FooBar'}) </script>` ,
429
429
options : [ 'PascalCase' ] ,
430
+ languageOptions : {
431
+ parser : require ( 'vue-eslint-parser' ) ,
432
+ ...languageOptions
433
+ } ,
430
434
errors : [
431
435
{
432
436
message : 'Property name "foo-bar" is not PascalCase.' ,
433
437
line : 1
434
438
}
435
- ] ,
436
- languageOptions : {
437
- parser : require ( 'vue-eslint-parser' ) ,
438
- ...languageOptions
439
- }
439
+ ]
440
440
} ,
441
441
{
442
442
filename : 'test.vue' ,
443
443
code : `<script setup> defineOptions({name: 'FooBar'}) </script>` ,
444
444
output : `<script setup> defineOptions({name: 'foo-bar'}) </script>` ,
445
445
options : [ 'kebab-case' ] ,
446
+ languageOptions : {
447
+ parser : require ( 'vue-eslint-parser' ) ,
448
+ ...languageOptions
449
+ } ,
446
450
errors : [
447
451
{
448
452
message : 'Property name "FooBar" is not kebab-case.' ,
449
453
line : 1
450
454
}
451
- ] ,
452
- languageOptions : {
453
- parser : require ( 'vue-eslint-parser' ) ,
454
- ...languageOptions
455
- }
455
+ ]
456
456
}
457
457
]
458
458
} )
0 commit comments