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:
/** Determines if the value is a number. */
export function isNumber(value: unknown): value is number { return typeof value === 'number' }
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.
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.