-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Expected behavior
@returns is allowed when a function has multiple type signatures, but the implementation has a return statement.
Actual behavior
jsdoc/require-returns-check disallows the @returns
ESLint Config
module.exports = {
rules: {
'jsdoc/require-returns-check': 'error'
}
}ESLint sample
/**
* Read a test fixture.
*
* @param path The path to resolve relative to the fixture base. It will be normalized for the
* operating system.
* @param encoding The text encoding of the file.
* @returns The file contents as a string or buffer.
*/
export function readFixture(path: string): Promise<Buffer>;
export function readFixture(path: string, encoding: BufferEncoding): Promise<string>;
export function readFixture(path: string, encoding?: BufferEncoding): Promise<Buffer | string> {
return readFile(resolveFixture(path), encoding);
}This also affects jsdoc/check-param-names.
Environment
- Node version: 18.7.0
- ESLint version: 8.22.0
eslint-plugin-jsdocversion: 39.3.6 (It worked fine in version 39.3.5)
alejandroclaro