-
-
Notifications
You must be signed in to change notification settings - Fork 170
Closed
Description
Expected behavior
jsdoc/require-returns-check should not produce a warning or error for functions with a return statement in a try-finally statement.
Actual behavior
The following warning is produced:
1:1 warning JSDoc @returns declaration present but return expression not available in function jsdoc/require-returns-check
ESLint Config
{
"extends": [
"plugin:jsdoc/recommended"
]
}ESLint sample
/** Returns true.
*
* @returns {boolean} true
*/
function getTrue() {
try {
return true;
} finally {
console.log('returning...');
}
}Environment
- Node version: v18.10.0
- ESLint version v8.26.0
eslint-plugin-jsdocversion: 39.3.22