@@ -1289,6 +1289,13 @@ function quux (foo) {
1289
1289
* @version
1290
1290
*/
1291
1291
function quux (foo ) {}
1292
+
1293
+ /**
1294
+ *
1295
+ */
1296
+ function quux (foo ) {
1297
+
1298
+ }
1292
1299
````
1293
1300
1294
1301
@@ -2083,6 +2090,13 @@ function quux (foo) {
2083
2090
2084
2091
}
2085
2092
// Settings: {"jsdoc":{"preferredTypes":{"object<>":"GenericObject"}}}
2093
+
2094
+ /**
2095
+ * @param {Number<} Ignore the error as not a validating rule
2096
+ */
2097
+ function quux (foo ) {
2098
+
2099
+ }
2086
2100
````
2087
2101
2088
2102
@@ -2142,6 +2156,18 @@ class quux {
2142
2156
}
2143
2157
}
2144
2158
2159
+ /**
2160
+ *
2161
+ */
2162
+ const quux = class {
2163
+ /**
2164
+ * @implements {SomeClass}
2165
+ */
2166
+ constructor () {
2167
+
2168
+ }
2169
+ }
2170
+
2145
2171
/**
2146
2172
*
2147
2173
*/
@@ -2511,6 +2537,17 @@ function quux () {
2511
2537
// Options: ["always"]
2512
2538
// Message: There must be a newline after the description of the JSDoc block.
2513
2539
2540
+ /**
2541
+ * Foo.
2542
+ *
2543
+ * Foo.
2544
+ * @foo
2545
+ */
2546
+ function quux () {
2547
+
2548
+ }
2549
+ // Message: There must be a newline after the description of the JSDoc block.
2550
+
2514
2551
/**
2515
2552
* Bar.
2516
2553
*
@@ -3345,6 +3382,16 @@ function quux () {
3345
3382
}
3346
3383
// Settings: {"jsdoc":{"avoidExampleOnConstructors":true}}
3347
3384
3385
+ class Foo {
3386
+ /**
3387
+ *
3388
+ */
3389
+ constructor () {
3390
+
3391
+ }
3392
+ }
3393
+ // Settings: {"jsdoc":{"avoidExampleOnConstructors":true}}
3394
+
3348
3395
/**
3349
3396
* @inheritdoc
3350
3397
*/
@@ -3387,6 +3434,14 @@ function quux () {
3387
3434
// Options: ["always"]
3388
3435
// Message: There must be a hyphen before @param description.
3389
3436
3437
+ /**
3438
+ * @param foo Foo.
3439
+ */
3440
+ function quux () {
3441
+
3442
+ }
3443
+ // Message: There must be a hyphen before @param description.
3444
+
3390
3445
/**
3391
3446
* @param foo - Foo.
3392
3447
*/
@@ -3436,6 +3491,13 @@ function quux () {
3436
3491
3437
3492
}
3438
3493
// Options: ["never"]
3494
+
3495
+ /**
3496
+ * @param foo
3497
+ */
3498
+ function quux () {
3499
+
3500
+ }
3439
3501
````
3440
3502
3441
3503
@@ -3491,6 +3553,12 @@ function quux (foo) {
3491
3553
}
3492
3554
// Message: Missing JSDoc comment.
3493
3555
3556
+ function quux (foo ) {
3557
+
3558
+ }
3559
+ // Settings: {"jsdoc":{"exemptEmptyFunctions":true}}
3560
+ // Message: Missing JSDoc comment.
3561
+
3494
3562
function myFunction () {}
3495
3563
// Message: Missing JSDoc comment.
3496
3564
@@ -3923,11 +3991,23 @@ class A {
3923
3991
// Options: [{"require":{"ClassDeclaration":false,"MethodDefinition":false}}]
3924
3992
3925
3993
/**
3926
- Function doing something
3994
+ * Function doing something
3927
3995
*/
3928
3996
var myFunction = () => {}
3929
3997
// Options: [{"require":{"ArrowFunctionExpression":true}}]
3930
3998
3999
+ /**
4000
+ * Function doing something
4001
+ */
4002
+ var myFunction = function () {}
4003
+ // Options: [{"require":{"ArrowFunctionExpression":true}}]
4004
+
4005
+ /**
4006
+ * Function doing something
4007
+ */
4008
+ var myFunction = () => {}
4009
+ // Options: [{"require":{"ArrowFunctionExpression":false}}]
4010
+
3931
4011
/**
3932
4012
Function doing something
3933
4013
*/
@@ -5177,6 +5257,16 @@ async function quux () {
5177
5257
}
5178
5258
// Options: [{"forceReturnsWithAsync":true}]
5179
5259
// Message: Missing JSDoc @returns declaration.
5260
+
5261
+ /**
5262
+ * @returns {undefined}
5263
+ * @returns {void}
5264
+ */
5265
+ function quux (foo ) {
5266
+
5267
+ return foo;
5268
+ }
5269
+ // Message: Found more than one @returns declaration.
5180
5270
````
5181
5271
5182
5272
The following patterns are not considered problems:
@@ -5501,6 +5591,22 @@ function quux() {
5501
5591
}
5502
5592
// Message: Syntax error in type: Array<string
5503
5593
5594
+ /**
5595
+ * @memberof module:namespace.SomeClass<~
5596
+ */
5597
+ function quux () {
5598
+
5599
+ }
5600
+ // Message: Syntax error in type: module:namespace.SomeClass<~
5601
+
5602
+ /**
5603
+ * @memberof module:namespace.SomeClass~<
5604
+ */
5605
+ function quux () {
5606
+
5607
+ }
5608
+ // Message: Syntax error in type: module:namespace.SomeClass~<
5609
+
5504
5610
/**
5505
5611
* @borrows foo% as bar
5506
5612
*/
@@ -5646,6 +5752,13 @@ function quux() {
5646
5752
*/
5647
5753
function quux () {
5648
5754
5755
+ }
5756
+
5757
+ /**
5758
+ *
5759
+ */
5760
+ function quux () {
5761
+
5649
5762
}
5650
5763
````
5651
5764
0 commit comments