{"gitdown": "contents", "rootId": "informative-docs"}
Reports on JSDoc texts that serve only to restart their attached name.
Devs sometimes write JSDoc descriptions that add no additional information just to fill out the doc:
/** The user id. */
let userId;
Those "uninformative" docs comments take up space without being helpful. This rule requires all docs comments contain at least one word not already in the code.
The aliases
option allows indicating words as synonyms (aliases) of each other.
For example, with { aliases: { emoji: ["smiley", "winkey"] } }
, the following comment would be considered uninformative:
/** A smiley/winkey. */
let emoji;
The default aliases
option is:
{
"a": ["an", "our"]
}
Words that are ignored when searching for one that adds meaning.
For example, with { uselessWords: ["our"] }
, the following comment would be considered uninformative:
/** Our text. */
let text;
The default uselessWords
option is:
["a", "an", "i", "in", "of", "s", "the"]
Context | everywhere |
Tags | any |
Recommended | false |
Settings | |
Options | aliases , excludedTags , uselessWords |