Option to only enforce jsdoc/require-param
if any parameters are documented, but allow no parameters to be documented
#1317
Labels
Motivation
Some functions are so simple, such as type-guard function in TypeScript, that they don't really need their parameters to be typed. For example:
These functions would look cleaner with a single line comment. This would also not be limited to just type-guard functions, but many kinds of simple single argument functions.
Current behavior
Currently the rule requires all parameters to be documented.
Desired behavior
An option that would enable a sort of
all-or-nothing
mode; if any parameter is document, then they all must be. Otherwise, none need be.Alternatives considered
While pattern exclusions may work fine for some project, likely not all.
The text was updated successfully, but these errors were encountered: