Skip to content

Commit 072737e

Browse files
author
Alexej Yaroshevich
committed
readme: checkAnnotation rule section
1 parent 41f1dbb commit 072737e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,51 @@ To use plugin you should add these lines to configuration file `.jscsrc`:
6262

6363
## Rules
6464

65+
### checkAnnotations
66+
67+
Ensures tag names are valid
68+
69+
There are 3 presets for `Closure Compiler`, `JSDoc3` and `JSDuck5`.
70+
71+
By default it allows any tag of mixed set.
72+
73+
Type: `Boolean` or `String`
74+
75+
Values: `true`, `"closurecompiler"`, `"jsdoc3"`, `"jsduck5"`
76+
77+
Context: `file`
78+
79+
Tags: `*`
80+
81+
#### Example
82+
83+
```js
84+
"checkAnnotations": true
85+
```
86+
87+
##### Valid
88+
89+
```js
90+
/**
91+
* @chainable
92+
* @param {string} message
93+
* @return {string}
94+
*/
95+
function _f() {}
96+
```
97+
98+
##### Invalid
99+
100+
```js
101+
/**
102+
* @pororo
103+
* @lalala
104+
*/
105+
function _f() {}
106+
```
107+
108+
####
109+
65110
### checkParamNames
66111

67112
Ensures param names in jsdoc and in function declaration are equal

0 commit comments

Comments
 (0)