-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
This is similar to #924 but doesn't seem to be fixed.
Expected behavior
There should be no jsdoc/require-returns-check errors reported for the functions below. This was working for eslint-plugin-jsdoc v39.3.6.
/**
* @return {number}
*/
function foo() {
while (true) {
const n = Math.random();
if (n < 0.5) {
return n;
}
}
}Actual behavior
58:1 error JSDoc @return declaration present but return expression not available in function jsdoc/require-returns-check
Environment
- Node version: v16.13.0
- ESLint version: 8.26.0
eslint-plugin-jsdocversion: 39.6.2
maribethb, blephy, bhsd-harry and Shinigami92