File tree 3 files changed +28
-21
lines changed
3 files changed +28
-21
lines changed Original file line number Diff line number Diff line change @@ -12209,6 +12209,14 @@ class quux {
12209
12209
}
12210
12210
// Options: [{"contexts":["any"],"forceRequireReturn":true}]
12211
12211
// Message: Missing JSDoc @returns declaration.
12212
+
12213
+ /**
12214
+ * @param {array} a
12215
+ */
12216
+ async function foo(a) {
12217
+ return Promise.all(a);
12218
+ }
12219
+ // Message: Missing JSDoc @returns declaration.
12212
12220
````
12213
12221
12214
12222
The following patterns are not considered problems:
@@ -12487,13 +12495,6 @@ function quux () {
12487
12495
}
12488
12496
// Options: [{"exemptedBy":["type"]}]
12489
12497
12490
- /**
12491
- * @param {array} a
12492
- */
12493
- async function foo(a) {
12494
- return Promise.all(a);
12495
- }
12496
-
12497
12498
/**
12498
12499
* @param {array} a
12499
12500
*/
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ export default iterateJsdoc(({
88
88
return true ;
89
89
}
90
90
91
- return ! isAsync && iteratingFunction && utils . hasReturnValue ( ) ;
91
+ return iteratingFunction && utils . hasReturnValue ( ) ;
92
92
} ;
93
93
94
94
if ( shouldReport ( ) ) {
Original file line number Diff line number Diff line change @@ -529,6 +529,25 @@ export default {
529
529
forceRequireReturn : true ,
530
530
} ] ,
531
531
} ,
532
+ {
533
+ code : `
534
+ /**
535
+ * @param {array} a
536
+ */
537
+ async function foo(a) {
538
+ return Promise.all(a);
539
+ }
540
+ ` ,
541
+ errors : [
542
+ {
543
+ line : 2 ,
544
+ message : 'Missing JSDoc @returns declaration.' ,
545
+ } ,
546
+ ] ,
547
+ parserOptions : {
548
+ ecmaVersion : 8 ,
549
+ } ,
550
+ } ,
532
551
] ,
533
552
valid : [
534
553
{
@@ -963,19 +982,6 @@ export default {
963
982
} ,
964
983
] ,
965
984
} ,
966
- {
967
- code : `
968
- /**
969
- * @param {array} a
970
- */
971
- async function foo(a) {
972
- return Promise.all(a);
973
- }
974
- ` ,
975
- parserOptions : {
976
- ecmaVersion : 8 ,
977
- } ,
978
- } ,
979
985
{
980
986
code : `
981
987
/**
You can’t perform that action at this time.
0 commit comments