Skip to content

Commit

Permalink
docs: document fixerMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Oct 18, 2023
1 parent 081af26 commit a11cde3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .README/rules/require-jsdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ functions.

Adds an empty JSDoc block unless `enableFixer` is set to `false`. See
the `contexts` option for how `inlineCommentBlock` can control the style
of the generated JSDoc block.
of the generated JSDoc block and `fixerMessage` for an optional message
to insert.

## Options

Expand Down Expand Up @@ -107,14 +108,19 @@ An integer to indicate a minimum number of lines expected for a node in order
for it to require documentation. Defaults to `undefined`. This option will
apply to any context; see `contexts` for line counts per context.

### `fixerMessage`

An optional message to add to the inserted JSDoc block. Defaults to the
empty string.

## Context and settings

|||
|---|---|
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `ClassExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|N/A|
|Recommended|true|
|Options|`publicOnly`, `require`, `contexts`, `exemptEmptyConstructors`, `exemptEmptyFunctions`, `enableFixer`, `minLineCount`|
|Options|`publicOnly`, `require`, `contexts`, `exemptEmptyConstructors`, `exemptEmptyFunctions`, `enableFixer`, `minLineCount`, `fixerMessage`|

## Failing examples

Expand Down
13 changes: 11 additions & 2 deletions docs/rules/require-jsdoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* [`checkSetters`](#user-content-require-jsdoc-options-checksetters)
* [`enableFixer`](#user-content-require-jsdoc-options-enablefixer)
* [`minLineCount`](#user-content-require-jsdoc-options-minlinecount)
* [`fixerMessage`](#user-content-require-jsdoc-options-fixermessage)
* [Context and settings](#user-content-require-jsdoc-context-and-settings)
* [Failing examples](#user-content-require-jsdoc-failing-examples)
* [Passing examples](#user-content-require-jsdoc-passing-examples)
Expand All @@ -28,7 +29,8 @@ functions.

Adds an empty JSDoc block unless `enableFixer` is set to `false`. See
the `contexts` option for how `inlineCommentBlock` can control the style
of the generated JSDoc block.
of the generated JSDoc block and `fixerMessage` for an optional message
to insert.

<a name="user-content-require-jsdoc-options"></a>
<a name="require-jsdoc-options"></a>
Expand Down Expand Up @@ -148,6 +150,13 @@ An integer to indicate a minimum number of lines expected for a node in order
for it to require documentation. Defaults to `undefined`. This option will
apply to any context; see `contexts` for line counts per context.

<a name="user-content-require-jsdoc-options-fixermessage"></a>
<a name="require-jsdoc-options-fixermessage"></a>
### <code>fixerMessage</code>

An optional message to add to the inserted JSDoc block. Defaults to the
empty string.

<a name="user-content-require-jsdoc-context-and-settings"></a>
<a name="require-jsdoc-context-and-settings"></a>
## Context and settings
Expand All @@ -157,7 +166,7 @@ apply to any context; see `contexts` for line counts per context.
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `ClassExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|N/A|
|Recommended|true|
|Options|`publicOnly`, `require`, `contexts`, `exemptEmptyConstructors`, `exemptEmptyFunctions`, `enableFixer`, `minLineCount`|
|Options|`publicOnly`, `require`, `contexts`, `exemptEmptyConstructors`, `exemptEmptyFunctions`, `enableFixer`, `minLineCount`, `fixerMessage`|

<a name="user-content-require-jsdoc-failing-examples"></a>
<a name="require-jsdoc-failing-examples"></a>
Expand Down

0 comments on commit a11cde3

Please sign in to comment.