-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(check-values): add new rule for checking special tag values (wit…
…hin `version`, `since`, `license`, `author`) BREAKING CHANGE: Adds to `recommended`. 1. `@version` - Checks that there is a present and valid [semver](https://semver.org/) version value. 2. `@since` - As with `@version` 3. `@license` - Checks that there is a present and valid SPDX identifier or is present within an `allowedLicenses` option. 4. `@author` - Checks there is a value present, and if the option `allowedAuthors` is present, ensure that the author value is one of these array items.
- Loading branch information
Showing
9 changed files
with
606 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
### `check-values` | ||
|
||
This rule checks the values for a handful of tags: | ||
|
||
1. `@version` - Checks that there is a present and valid | ||
[semver](https://semver.org/) version value. | ||
2. `@since` - As with `@version` | ||
3. `@license` - Checks that there is a present and valid SPDX identifier | ||
or is present within an `allowedLicenses` option. | ||
4. `@author` - Checks there is a value present, and if the option | ||
`allowedAuthors` is present, ensure that the author value is one | ||
of these array items. | ||
|
||
#### Options | ||
|
||
##### `allowedAuthors` | ||
|
||
An array of allowable author values. If absent, only non-whitespace will | ||
be checked for. | ||
|
||
##### `allowedLicenses` | ||
|
||
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. | ||
|
||
||| | ||
|---|---| | ||
|Context|everywhere| | ||
|Tags|`@version`, `@since`, `@license`, `@author`| | ||
|Options|`allowedAuthors`, `allowedLicenses`| | ||
|Settings|`tagNamePreference`| | ||
|
||
<!-- assertions checkValues --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.