|
3 | 3 | Checks for presence of jsdoc comments, on class declarations as well as
|
4 | 4 | functions.
|
5 | 5 |
|
| 6 | +#### Options |
| 7 | + |
| 8 | +Accepts one optional options object, with two optional keys, `publicOnly` |
| 9 | +for confining JSDoc comments to be checked to exported functions (with "exported" |
| 10 | +allowing for ESM exports, CJS exports, or browser window global export) |
| 11 | +in `require-jsdoc`, and `require` for limiting the contexts which are to |
| 12 | +be checked by the rule. |
| 13 | + |
| 14 | +- `publicOnly` - Missing jsdoc blocks are only reported for function |
| 15 | + bodies / class declarations that are exported from the module. |
| 16 | + May be a boolean or object. If set to `true`, the defaults below will |
| 17 | + be used. |
| 18 | + |
| 19 | + This object supports the following optional boolean keys (`false` unless |
| 20 | + otherwise noted): |
| 21 | + |
| 22 | + - `ancestorsOnly` - Only check node ancestors to check if node is exported |
| 23 | + - `esm` - ESM exports are checked for JSDoc comments (Defaults to `true`) |
| 24 | + - `cjs` - CommonJS exports are checked for JSDoc comments (Defaults to `true`) |
| 25 | + - `window` - Window global exports are checked for JSDoc comments |
| 26 | + |
| 27 | +- `require` - An object with the following optional boolean keys which all |
| 28 | + default to `false` except as noted: |
| 29 | + |
| 30 | + - `ArrowFunctionExpression` |
| 31 | + - `ClassDeclaration` |
| 32 | + - `FunctionDeclaration` (defaults to `true`) |
| 33 | + - `FunctionExpression` |
| 34 | + - `MethodDefinition` |
| 35 | + |
6 | 36 | |||
|
7 | 37 | |---|---|
|
8 | 38 | |Context|`ArrowFunctionExpression`, `ClassDeclaration`, `FunctionDeclaration`, `FunctionExpression`|
|
9 | 39 | |Tags|N/A|
|
| 40 | +|Options|`publicOnly`| |
10 | 41 | |Settings|`exemptEmptyFunctions`|
|
11 | 42 |
|
12 | 43 | <!-- assertions requireJsdoc -->
|
0 commit comments