Skip to content

Commit 13ed645

Browse files
author
Alexej Yaroshevich
committed
readme: add additional info about checkAnnotation values
1 parent 072737e commit 13ed645

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ Ensures tag names are valid
6868

6969
There are 3 presets for `Closure Compiler`, `JSDoc3` and `JSDuck5`.
7070

71-
By default it allows any tag of mixed set.
71+
By default it allows any tag of mixed set. You can pass `Object` to select preset with `preset` field and add custom tags with `extra` field.
7272

73-
Type: `Boolean` or `String`
73+
Type: `Boolean` or `String` or `{"preset": String, "extra": Object}` (`extra` field should contains tags in keys and boolean in values. false means no value possible)
7474

75-
Values: `true`, `"closurecompiler"`, `"jsdoc3"`, `"jsduck5"`
75+
Values: `true`, `"closurecompiler"`, `"jsdoc3"`, `"jsduck5"`, `Object`
7676

7777
Context: `file`
7878

@@ -105,6 +105,33 @@ function _f() {}
105105
function _f() {}
106106
```
107107

108+
#### Example 2
109+
110+
```js
111+
"checkAnnotations": {
112+
"preset": "jsdoc3",
113+
"extra": {
114+
"boomer": false
115+
}
116+
}
117+
```
118+
119+
##### Valid
120+
121+
```js
122+
/**
123+
* @boomer
124+
* @argument {String}
125+
*/
126+
function _f() {}
127+
```
128+
129+
##### Invalid
130+
131+
```js
132+
/** @still-invalid */
133+
```
134+
108135
####
109136

110137
### checkParamNames

0 commit comments

Comments
 (0)