This rule checks the values for a handful of tags:
@version
- Checks that there is a present and valid semver version value.@since
- As with@version
@license
- Checks that there is a present and valid SPDX identifier or is present within anallowedLicenses
option.@author
- Checks that there is a value present, and if the optionallowedAuthors
is present, ensure that the author value is one of these array items.@variation
- IfnumericOnlyVariation
is set, will checks that there is a value present, and that it is an integer (otherwise, jsdoc allows any value).
An array of allowable author values. If absent, only non-whitespace will be checked for.
An array of allowable license values or true
to allow any license text.
If present as an array, will be used in place of SPDX identifiers.
A string to be converted into a RegExp
(with u
flag) and whose first
parenthetical grouping, if present, will match the portion of the license
description to check (if no grouping is present, then the whole portion
matched will be used). Defaults to /([^\n\r]*)/gu
, i.e., the SPDX expression
is expected before any line breaks.
Note that the /
delimiters are optional, but necessary to add flags.
Defaults to using the u
flag, so to add your own flags, encapsulate
your expression as a string, but like a literal, e.g., /^mit$/ui
.
Whether to enable validation that @variation
must be a number. Defaults to
false
.
Context | everywhere |
Tags | @version , @since , @license , @author , @variation |
Recommended | true |
Options | allowedAuthors , allowedLicenses , licensePattern |
Settings | tagNamePreference |