File tree Expand file tree Collapse file tree 1 file changed +129
-0
lines changed Expand file tree Collapse file tree 1 file changed +129
-0
lines changed Original file line number Diff line number Diff line change @@ -395,6 +395,80 @@ export default {
395
395
noDefaults : true
396
396
}
397
397
]
398
+ } ,
399
+ {
400
+ code : `
401
+ class MyClass {
402
+ /**
403
+ * Abc
404
+ */
405
+ myClassField = 1
406
+ }
407
+ ` ,
408
+ errors : [
409
+ {
410
+ line : 4 ,
411
+ message : 'JSDoc description does not satisfy the regex pattern.'
412
+ }
413
+ ] ,
414
+ options : [
415
+ {
416
+ contexts : [
417
+ 'ClassProperty'
418
+ ] ,
419
+ noDefaults : true
420
+ }
421
+ ] ,
422
+ parser : require . resolve ( '@typescript-eslint/parser' )
423
+ } ,
424
+ {
425
+ code : `
426
+ /**
427
+ * foo.
428
+ */
429
+ interface quux {
430
+
431
+ }
432
+ ` ,
433
+ errors : [
434
+ {
435
+ line : 3 ,
436
+ message : 'JSDoc description does not satisfy the regex pattern.'
437
+ }
438
+ ] ,
439
+ options : [
440
+ {
441
+ contexts : [
442
+ 'TSInterfaceDeclaration'
443
+ ] ,
444
+ noDefaults : true
445
+ }
446
+ ] ,
447
+ parser : require . resolve ( '@typescript-eslint/parser' )
448
+ } ,
449
+ {
450
+ code : `
451
+ const myObject = {
452
+ /**
453
+ * Bad description
454
+ */
455
+ myProp: true
456
+ };
457
+ ` ,
458
+ errors : [
459
+ {
460
+ line : 4 ,
461
+ message : 'JSDoc description does not satisfy the regex pattern.'
462
+ }
463
+ ] ,
464
+ options : [
465
+ {
466
+ contexts : [
467
+ 'Property'
468
+ ] ,
469
+ noDefaults : true
470
+ }
471
+ ]
398
472
}
399
473
] ,
400
474
valid : [
@@ -624,6 +698,61 @@ export default {
624
698
'main description' : true
625
699
} }
626
700
]
701
+ } ,
702
+ {
703
+ code : `
704
+ class MyClass {
705
+ /**
706
+ * Abc.
707
+ */
708
+ myClassField = 1
709
+ }
710
+ ` ,
711
+ options : [
712
+ {
713
+ contexts : [
714
+ 'ClassProperty'
715
+ ] ,
716
+ noDefaults : true
717
+ }
718
+ ] ,
719
+ parser : require . resolve ( '@typescript-eslint/parser' )
720
+ } ,
721
+ {
722
+ code : `
723
+ /**
724
+ * Foo.
725
+ */
726
+ interface quux {
727
+
728
+ }
729
+ ` ,
730
+ options : [
731
+ {
732
+ contexts : [
733
+ 'TSInterfaceDeclaration'
734
+ ] ,
735
+ noDefaults : true
736
+ }
737
+ ] ,
738
+ parser : require . resolve ( '@typescript-eslint/parser' )
739
+ } ,
740
+ {
741
+ code : `
742
+ const myObject = {
743
+ /**
744
+ * Bad description
745
+ */
746
+ myProp: true
747
+ };
748
+ ` ,
749
+ options : [
750
+ {
751
+ contexts : [
752
+ ] ,
753
+ noDefaults : true
754
+ }
755
+ ]
627
756
}
628
757
]
629
758
} ;
You can’t perform that action at this time.
0 commit comments