Skip to content

require-jsdoc: exempt functions with no arguments and a return value #807

@briandipalma

Description

@briandipalma

Motivation

To stop adding empty JSDoc blocks when fixing files.

Current behavior

Using this config:

`"jsdoc/require-jsdoc": ["warn", { exemptEmptyFunctions: true }],`

ESLint fixing is adding empty JSDoc blocks to functions that have no parameters but return a value. I'd rather not have an empty JSDoc block added if possible so a more general option around that would be perfect but if not a new, more specific option like exemptNoParameterFunctions would also fix this issue. I mostly document to provide TS type information as the majority of the code I work isn't public API.

Desired behavior

No empty JSDoc blocks being added

Alternatives considered

I disabled the fixer but that means useful JSDoc blocks aren't added.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions