Skip to content

Commit 85e0b89

Browse files
committed
docs(require-example): add exemptNoArguments
1 parent 9eaaab1 commit 85e0b89

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.README/rules/require-example.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ block avoids the need for an `@example`. Defaults to an array with
1818
so be sure to add back `inheritdoc` if you wish its presence to cause
1919
exemption of the rule.
2020

21+
##### `exemptNoArguments`
22+
23+
Boolean to indicate that no-argument functions should not be reported for
24+
missing `@example` declarations.
25+
2126
##### `contexts`
2227

2328
Set this to an array of strings representing the AST context
@@ -50,7 +55,7 @@ report a missing example description after this is added.
5055
|---|---|
5156
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
5257
|Tags|`example`|
53-
|Options|`exemptedBy`, `avoidExampleOnConstructors`, `contexts`|
58+
|Options|`exemptedBy`, `exemptNoArguments`, `avoidExampleOnConstructors`, `contexts`|
5459
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
5560

5661
<!-- assertions requireExample -->

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8162,6 +8162,12 @@ block avoids the need for an `@example`. Defaults to an array with
81628162
so be sure to add back `inheritdoc` if you wish its presence to cause
81638163
exemption of the rule.
81648164
8165+
<a name="eslint-plugin-jsdoc-rules-require-example-options-18-exemptnoarguments"></a>
8166+
##### <code>exemptNoArguments</code>
8167+
8168+
Boolean to indicate that no-argument functions should not be reported for
8169+
missing `@example` declarations.
8170+
81658171
<a name="eslint-plugin-jsdoc-rules-require-example-options-18-contexts-4"></a>
81668172
##### <code>contexts</code>
81678173
@@ -8199,7 +8205,7 @@ report a missing example description after this is added.
81998205
|---|---|
82008206
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
82018207
|Tags|`example`|
8202-
|Options|`exemptedBy`, `avoidExampleOnConstructors`, `contexts`|
8208+
|Options|`exemptedBy`, `exemptNoArguments`, `avoidExampleOnConstructors`, `contexts`|
82038209
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
82048210
82058211
The following patterns are considered problems:

0 commit comments

Comments
 (0)