Skip to content

Commit 4d5400f

Browse files
committed
docs(match-description): indicate application by default to description/desc and allowance for property/prop; clarify
1 parent 71f35e2 commit 4d5400f

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.README/rules/match-description.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ by our supported Node versions):
88

99
``^([A-Z]|[`\\d_])[\\s\\S]*[.?!`]$``
1010

11+
Applies to the jsdoc block description and `@description` (or `@desc`)
12+
by default but the `tags` option (see below) may be used to match other tags.
13+
1114
#### Options
1215

1316
##### `matchDescription`
@@ -50,8 +53,10 @@ tag should be linted with the `matchDescription` value (or the default).
5053
}
5154
```
5255

53-
The tags `@param`/`@arg`/`@argument` will be properly parsed to ensure that
54-
the matched "description" text includes only the text after the name.
56+
The tags `@param`/`@arg`/`@argument` and `@property`/`@prop` will be properly
57+
parsed to ensure that the matched "description" text includes only the text
58+
after the name.
59+
5560
All other tags will treat the text following the tag name, a space, and
5661
an optional curly-bracketed type expression (and another space) as part of
5762
its "description" (e.g., for `@returns {someType} some description`, the
@@ -88,8 +93,8 @@ Overrides the default contexts (see below).
8893
|||
8994
|---|---|
9095
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
91-
|Tags|N/A by default but see `tags` options|
96+
|Tags|docblock and `@description` (or `@desc`) by default but more with `tags`|
9297
|Settings||
93-
|Options|`contexts`, `tags` (allows for 'param', 'arg', 'argument', 'description', 'desc', and any added to `tags` option, e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|
98+
|Options|`contexts`, `tags` (accepts tags with names and optional type such as 'param', 'arg', 'argument', 'property', and 'prop', and accepts arbitrary list of other tags with an optional type (but without names), e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|
9499

95100
<!-- assertions matchDescription -->

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,6 +2492,9 @@ by our supported Node versions):
24922492

24932493
``^([A-Z]|[`\\d_])[\\s\\S]*[.?!`]$``
24942494

2495+
Applies to the jsdoc block description and `@description` (or `@desc`)
2496+
by default but the `tags` option (see below) may be used to match other tags.
2497+
24952498
<a name="eslint-plugin-jsdoc-rules-match-description-options-3"></a>
24962499
#### Options
24972500

@@ -2537,8 +2540,10 @@ tag should be linted with the `matchDescription` value (or the default).
25372540
}
25382541
```
25392542

2540-
The tags `@param`/`@arg`/`@argument` will be properly parsed to ensure that
2541-
the matched "description" text includes only the text after the name.
2543+
The tags `@param`/`@arg`/`@argument` and `@property`/`@prop` will be properly
2544+
parsed to ensure that the matched "description" text includes only the text
2545+
after the name.
2546+
25422547
All other tags will treat the text following the tag name, a space, and
25432548
an optional curly-bracketed type expression (and another space) as part of
25442549
its "description" (e.g., for `@returns {someType} some description`, the
@@ -2577,9 +2582,9 @@ Overrides the default contexts (see below).
25772582
|||
25782583
|---|---|
25792584
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
2580-
|Tags|N/A by default but see `tags` options|
2585+
|Tags|docblock and `@description` (or `@desc`) by default but more with `tags`|
25812586
|Settings||
2582-
|Options|`contexts`, `tags` (allows for 'param', 'arg', 'argument', 'description', 'desc', and any added to `tags` option, e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|
2587+
|Options|`contexts`, `tags` (accepts tags with names and optional type such as 'param', 'arg', 'argument', 'property', and 'prop', and accepts arbitrary list of other tags with an optional type (but without names), e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|
25832588

25842589
The following patterns are considered problems:
25852590

0 commit comments

Comments
 (0)