Skip to content

Option to support or ban hyphens before other tag descriptions #553

@0xCLARITY

Description

@0xCLARITY

Motivation

We use the require-hyphen-before-param-description rule, and in some cases, people get confused and add hyphens for other JSDoc tags. The most common one I see is adding a hyphen to the @returns tag.

Current behavior

No way to discourage writing something like:

/**
 * ...
 * @returns - description
 */

Desired behavior

Have some way to discourage using hyphens for JSDoc tags that are not @param.

Alternatives considered

I tried using the match-description and setting a regex, but it seemed to ignore the presence/absence of a hyphen.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions