@@ -82,6 +82,14 @@ ruleTester.run('require-valid-default-prop', rule, {
82
82
propK: {
83
83
type: Array,
84
84
default () { }
85
+ },
86
+ propI: {
87
+ type: Symbol,
88
+ default: Symbol('a')
89
+ },
90
+ propJ: {
91
+ type: String,
92
+ default: \`Foo\`
85
93
}
86
94
}
87
95
})` ,
@@ -102,7 +110,7 @@ ruleTester.run('require-valid-default-prop', rule, {
102
110
}` ,
103
111
parserOptions,
104
112
errors : [ {
105
- message : "Prop 'foo' has invalid default value ." ,
113
+ message : "Type of default value prop 'foo' is a 'String' but should be a 'Number' ." ,
106
114
type : 'Property' ,
107
115
line : 5
108
116
} ]
@@ -119,7 +127,7 @@ ruleTester.run('require-valid-default-prop', rule, {
119
127
}` ,
120
128
parserOptions,
121
129
errors : [ {
122
- message : "Prop 'foo' has invalid default value ." ,
130
+ message : "Type of default value prop 'foo' is a 'Boolean' but should be a 'Number' ." ,
123
131
type : 'Property' ,
124
132
line : 5
125
133
} ]
@@ -136,7 +144,7 @@ ruleTester.run('require-valid-default-prop', rule, {
136
144
}` ,
137
145
parserOptions,
138
146
errors : [ {
139
- message : "Prop 'foo' has invalid default value ." ,
147
+ message : "Type of default value prop 'foo' is a 'Object' but should be a 'Number' ." ,
140
148
type : 'Property' ,
141
149
line : 5
142
150
} ]
@@ -153,7 +161,7 @@ ruleTester.run('require-valid-default-prop', rule, {
153
161
}` ,
154
162
parserOptions,
155
163
errors : [ {
156
- message : "Prop 'foo' has invalid default value ." ,
164
+ message : "Type of default value prop 'foo' is a 'Array' but should be a 'Number' ." ,
157
165
type : 'Property' ,
158
166
line : 5
159
167
} ]
@@ -170,7 +178,7 @@ ruleTester.run('require-valid-default-prop', rule, {
170
178
}` ,
171
179
parserOptions,
172
180
errors : [ {
173
- message : "Prop 'foo' has invalid default value ." ,
181
+ message : "Type of default value prop 'foo' is a 'Number' but should be a 'String' ." ,
174
182
type : 'Property' ,
175
183
line : 5
176
184
} ]
@@ -187,7 +195,7 @@ ruleTester.run('require-valid-default-prop', rule, {
187
195
}` ,
188
196
parserOptions,
189
197
errors : [ {
190
- message : "Prop 'foo' has invalid default value ." ,
198
+ message : "Type of default value prop 'foo' is a 'Object' but should be a 'String' ." ,
191
199
type : 'Property' ,
192
200
line : 5
193
201
} ]
@@ -204,7 +212,7 @@ ruleTester.run('require-valid-default-prop', rule, {
204
212
}` ,
205
213
parserOptions,
206
214
errors : [ {
207
- message : "Prop 'foo' has invalid default value ." ,
215
+ message : "Type of default value prop 'foo' is a 'Array' but should be a 'String' ." ,
208
216
type : 'Property' ,
209
217
line : 5
210
218
} ]
@@ -221,7 +229,7 @@ ruleTester.run('require-valid-default-prop', rule, {
221
229
}` ,
222
230
parserOptions,
223
231
errors : [ {
224
- message : "Prop 'foo' has invalid default value ." ,
232
+ message : "Type of default value prop 'foo' is a 'String' but should be a 'Boolean' ." ,
225
233
type : 'Property' ,
226
234
line : 5
227
235
} ]
@@ -238,7 +246,7 @@ ruleTester.run('require-valid-default-prop', rule, {
238
246
}` ,
239
247
parserOptions,
240
248
errors : [ {
241
- message : "Prop 'foo' has invalid default value ." ,
249
+ message : "Type of default value prop 'foo' is a 'Number' but should be a 'Boolean' ." ,
242
250
type : 'Property' ,
243
251
line : 5
244
252
} ]
@@ -255,7 +263,7 @@ ruleTester.run('require-valid-default-prop', rule, {
255
263
}` ,
256
264
parserOptions,
257
265
errors : [ {
258
- message : "Prop 'foo' has invalid default value ." ,
266
+ message : "Type of default value prop 'foo' is a 'Object' but should be a 'Boolean' ." ,
259
267
type : 'Property' ,
260
268
line : 5
261
269
} ]
@@ -272,7 +280,7 @@ ruleTester.run('require-valid-default-prop', rule, {
272
280
}` ,
273
281
parserOptions,
274
282
errors : [ {
275
- message : "Prop 'foo' has invalid default value ." ,
283
+ message : "Type of default value prop 'foo' is a 'Array' but should be a 'Boolean' ." ,
276
284
type : 'Property' ,
277
285
line : 5
278
286
} ]
@@ -289,7 +297,7 @@ ruleTester.run('require-valid-default-prop', rule, {
289
297
}` ,
290
298
parserOptions,
291
299
errors : [ {
292
- message : "Prop 'foo' has invalid default value ." ,
300
+ message : "Type of default value prop 'foo' is a 'String' but should be a 'Function' ." ,
293
301
type : 'Property' ,
294
302
line : 5
295
303
} ]
@@ -306,7 +314,7 @@ ruleTester.run('require-valid-default-prop', rule, {
306
314
}` ,
307
315
parserOptions,
308
316
errors : [ {
309
- message : "Prop 'foo' has invalid default value ." ,
317
+ message : "Type of default value prop 'foo' is a 'Number' but should be a 'Function' ." ,
310
318
type : 'Property' ,
311
319
line : 5
312
320
} ]
@@ -323,7 +331,7 @@ ruleTester.run('require-valid-default-prop', rule, {
323
331
}` ,
324
332
parserOptions,
325
333
errors : [ {
326
- message : "Prop 'foo' has invalid default value ." ,
334
+ message : "Type of default value prop 'foo' is a 'Boolean' but should be a 'Function' ." ,
327
335
type : 'Property' ,
328
336
line : 5
329
337
} ]
@@ -340,7 +348,7 @@ ruleTester.run('require-valid-default-prop', rule, {
340
348
}` ,
341
349
parserOptions,
342
350
errors : [ {
343
- message : "Prop 'foo' has invalid default value ." ,
351
+ message : "Type of default value prop 'foo' is a 'Object' but should be a 'Function' ." ,
344
352
type : 'Property' ,
345
353
line : 5
346
354
} ]
@@ -351,13 +359,13 @@ ruleTester.run('require-valid-default-prop', rule, {
351
359
props: {
352
360
foo: {
353
361
type: Object,
354
- default: []
355
- }
362
+ default: []
363
+ }
356
364
}
357
365
}` ,
358
366
parserOptions,
359
367
errors : [ {
360
- message : "Prop 'foo' has invalid default value ." ,
368
+ message : "Type of default value prop 'foo' is a 'Array' but should be a 'Function' ." ,
361
369
type : 'Property' ,
362
370
line : 5
363
371
} ]
@@ -374,7 +382,7 @@ ruleTester.run('require-valid-default-prop', rule, {
374
382
}` ,
375
383
parserOptions,
376
384
errors : [ {
377
- message : "Prop 'foo' has invalid default value ." ,
385
+ message : "Type of default value prop 'foo' is a 'String' but should be a 'Function' ." ,
378
386
type : 'Property' ,
379
387
line : 5
380
388
} ]
@@ -391,7 +399,7 @@ ruleTester.run('require-valid-default-prop', rule, {
391
399
}` ,
392
400
parserOptions,
393
401
errors : [ {
394
- message : "Prop 'foo' has invalid default value ." ,
402
+ message : "Type of default value prop 'foo' is a 'Number' but should be a 'Function' ." ,
395
403
type : 'Property' ,
396
404
line : 5
397
405
} ]
@@ -408,7 +416,7 @@ ruleTester.run('require-valid-default-prop', rule, {
408
416
}` ,
409
417
parserOptions,
410
418
errors : [ {
411
- message : "Prop 'foo' has invalid default value ." ,
419
+ message : "Type of default value prop 'foo' is a 'Boolean' but should be a 'Function' ." ,
412
420
type : 'Property' ,
413
421
line : 5
414
422
} ]
@@ -425,7 +433,7 @@ ruleTester.run('require-valid-default-prop', rule, {
425
433
}` ,
426
434
parserOptions,
427
435
errors : [ {
428
- message : "Prop 'foo' has invalid default value ." ,
436
+ message : "Type of default value prop 'foo' is a 'Object' but should be a 'Function' ." ,
429
437
type : 'Property' ,
430
438
line : 5
431
439
} ]
@@ -442,7 +450,7 @@ ruleTester.run('require-valid-default-prop', rule, {
442
450
}` ,
443
451
parserOptions,
444
452
errors : [ {
445
- message : "Prop 'foo' has invalid default value ." ,
453
+ message : "Type of default value prop 'foo' is a 'Array' but should be a 'Function' ." ,
446
454
type : 'Property' ,
447
455
line : 5
448
456
} ]
0 commit comments