Skip to content

Commit 7af3f3c

Browse files
committed
docs(require-example): add exemptNoArguments
1 parent 5102ca4 commit 7af3f3c

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
@@ -8114,6 +8114,12 @@ block avoids the need for an `@example`. Defaults to an array with
81148114
so be sure to add back `inheritdoc` if you wish its presence to cause
81158115
exemption of the rule.
81168116
8117+
<a name="eslint-plugin-jsdoc-rules-require-example-options-18-exemptnoarguments"></a>
8118+
##### <code>exemptNoArguments</code>
8119+
8120+
Boolean to indicate that no-argument functions should not be reported for
8121+
missing `@example` declarations.
8122+
81178123
<a name="eslint-plugin-jsdoc-rules-require-example-options-18-contexts-4"></a>
81188124
##### <code>contexts</code>
81198125
@@ -8151,7 +8157,7 @@ report a missing example description after this is added.
81518157
|---|---|
81528158
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
81538159
|Tags|`example`|
8154-
|Options|`exemptedBy`, `avoidExampleOnConstructors`, `contexts`|
8160+
|Options|`exemptedBy`, `exemptNoArguments`, `avoidExampleOnConstructors`, `contexts`|
81558161
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
81568162
81578163
The following patterns are considered problems:

0 commit comments

Comments
 (0)