Skip to content

Commit

Permalink
feat: add public exports only option to require-jsdoc rule
Browse files Browse the repository at this point in the history
* When enabled, require all exported function bodies to have JSDoc block
* Fixes gajus#192
  • Loading branch information
Extersky authored and brettz9 committed May 28, 2019
1 parent 7883e44 commit 56dccbb
Show file tree
Hide file tree
Showing 7 changed files with 1,443 additions and 144 deletions.
11 changes: 11 additions & 0 deletions .README/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ Finally, enable all of the rules that you would like to use.
above functions/methods with no parameters or return values (intended where
variable names are sufficient for themselves as documentation).

### Requiring JSDoc comments for exported functions in <code>require-jsdoc</code>

- `settings.jsdoc.publicFunctionsOnly` - Missing jsdoc blocks
are only reported for function bodies that are exported from the module.

This setting object supports the following keys:

- `exports`
- `modules`
- `browserEnv`

### Alias Preference

Use `settings.jsdoc.tagNamePreference` to configure a preferred alias name for a JSDoc tag. The format of the configuration is: `<primary tag name>: <preferred alias name>`, e.g.
Expand Down
2 changes: 1 addition & 1 deletion .README/rules/require-jsdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ functions.
|---|---|
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `FunctionDeclaration`, `FunctionExpression`|
|Tags|N/A|
|Settings|`exemptEmptyFunctions`|
|Settings|`exemptEmptyFunctions`, `publicFunctionsOnly`|

<!-- assertions requireJsdoc -->

0 comments on commit 56dccbb

Please sign in to comment.