-
-
Notifications
You must be signed in to change notification settings - Fork 169
Description
The newly implemented "jsdoc/require-rejects" rule enforces that functions that have a promise rejection have a @rejects tag.
I added this rule to my codebase for the first time today and it found a few errors. However, as soon as I tried to fix them by adding a @rejects tag, I immediately got another error from "jsdoc/check-tag-names" because @rejects is not a standard JSDoc tag. Annoying!
In order to fix this now unfixable lint error, users must set a custom configuration for "check-tag-names" to explicitly include "rejects" in the definedTags section. But forcing everyone across the ecosystem to do this is super painful. Thus, I propose that the check-tag-names rule include @rejects by default to prevent users from having to deal with this.
Counterargument
I assume the reason that this is not done already is that @rejects is technically a non-standard tag. We should consider users who use "check-tag-names" but do not use "require-rejects". For those users, it would be weird for them if @rejects was allowed, because then, non-standard JSDoc tags could slip into their codebases.
With that said, I don't think this counter-argument is very convincing. Since we have made the decision to go forward and publish the official "require-rejects" rule in this plugin, I think that the ecosystem should standardize around this convention, and that it should be treated as an "official" tag henceforth.
Thoughts?