Eslint-plugin-jsdoc: [require-jsdoc] False positive for exported overload functions

Created on 2 Oct 2020  路  2Comments  路  Source: gajus/eslint-plugin-jsdoc

Expected behavior

TSDeclareFunctions should report no error even if they have a prepended export.

Actual behavior

An error is reported sayin that the jsdoc-comment is missing.

ESLint Config

{
    rules: {
        "jsdoc/require-jsdoc": [
            "warn",
            {
                require: {
                    FunctionDeclaration: true
                },
                contexts: [
                    "TSDeclareFunction"
                ]
            }
        ]
    }
}

ESLint sample

/**
 * This is a text.
 */
function x(); // works great

/**
 * This is a text.
 */
function x(text: string) { }

/**
 * This is a text.
 */
export function a(); // Reports an error

/**
 * This is a text.
 */
export function a(text: string)
{ }

Environment

  • Node version: v12.18.3
  • ESLint version v7.10.0
  • eslint-plugin-jsdoc version: 30.6.2
bug released

All 2 comments

:tada: This issue has been resolved in version 30.6.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Awesome, thank you so much - that was fast!

Was this page helpful?
0 / 5 - 0 ratings