|
2 | 2 |
|
3 | 3 | Requires that all functions have a description.
|
4 | 4 |
|
5 |
| -* All functions must have a `@description` tag. |
6 |
| -* Every description tag must have a non-empty description that explains the purpose of the method. |
| 5 | +* All functions must have an implicit description or have the option |
| 6 | + `descriptionStyle` set to `tag`. |
| 7 | +* Every jsdoc block description (or description tag if `descriptionStyle` is |
| 8 | + `"tag"`) must have a non-empty description that explains the purpose of the |
| 9 | + method. |
7 | 10 |
|
8 | 11 | #### Options
|
9 | 12 |
|
10 | 13 | An options object may have any of the following properties:
|
11 | 14 |
|
12 | 15 | - `contexts` - Set to an array of strings representing the AST context
|
13 |
| - where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes). |
14 |
| - Overrides the default contexts (see below). |
15 |
| -- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document |
16 |
| - block avoids the need for a `@description`. Defaults to an empty array. |
| 16 | + where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 |
| 17 | + classes). Overrides the default contexts (see below). |
| 18 | +- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the |
| 19 | + document block avoids the need for a `@description`. Defaults to an |
| 20 | + empty array. |
| 21 | +- `descriptionStyle` - Whether to accept implicit descriptions (`"body"`) or |
| 22 | + `@description` tags (`"tag"`) as satisfying the rule. Set to `"any"` to |
| 23 | + accept either style. Defaults to `"body"`. |
17 | 24 |
|
18 | 25 | |||
|
19 | 26 | |---|---|
|
20 | 27 | |Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|
21 |
| -|Tags|`description`| |
| 28 | +|Tags|`description` or jsdoc block| |
22 | 29 | |Aliases|`desc`|
|
23 |
| -|Options|`contexts`, `exemptedBy`| |
| 30 | +|Options|`contexts`, `exemptedBy`, `descriptionStyle`| |
24 | 31 | |Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
|
25 | 32 |
|
26 | 33 | <!-- assertions requireDescription -->
|
0 commit comments