Skip to content

Commit

Permalink
docs(match-description): indicate application by default to `descript…
Browse files Browse the repository at this point in the history
…ion`/`desc` and allowance for `property`/`prop`; clarify
  • Loading branch information
brettz9 committed Jul 14, 2019
1 parent 71f35e2 commit 4d5400f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
13 changes: 9 additions & 4 deletions .README/rules/match-description.md
Expand Up @@ -8,6 +8,9 @@ by our supported Node versions):

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

Applies to the jsdoc block description and `@description` (or `@desc`)
by default but the `tags` option (see below) may be used to match other tags.

#### Options

##### `matchDescription`
Expand Down Expand Up @@ -50,8 +53,10 @@ tag should be linted with the `matchDescription` value (or the default).
}
```

The tags `@param`/`@arg`/`@argument` will be properly parsed to ensure that
the matched "description" text includes only the text after the name.
The tags `@param`/`@arg`/`@argument` and `@property`/`@prop` will be properly
parsed to ensure that the matched "description" text includes only the text
after the name.

All other tags will treat the text following the tag name, a space, and
an optional curly-bracketed type expression (and another space) as part of
its "description" (e.g., for `@returns {someType} some description`, the
Expand Down Expand Up @@ -88,8 +93,8 @@ Overrides the default contexts (see below).
|||
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|N/A by default but see `tags` options|
|Tags|docblock and `@description` (or `@desc`) by default but more with `tags`|
|Settings||
|Options|`contexts`, `tags` (allows for 'param', 'arg', 'argument', 'description', 'desc', and any added to `tags` option, e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|
|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`|

<!-- assertions matchDescription -->
13 changes: 9 additions & 4 deletions README.md
Expand Up @@ -2492,6 +2492,9 @@ by our supported Node versions):

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

Applies to the jsdoc block description and `@description` (or `@desc`)
by default but the `tags` option (see below) may be used to match other tags.

<a name="eslint-plugin-jsdoc-rules-match-description-options-3"></a>
#### Options

Expand Down Expand Up @@ -2537,8 +2540,10 @@ tag should be linted with the `matchDescription` value (or the default).
}
```

The tags `@param`/`@arg`/`@argument` will be properly parsed to ensure that
the matched "description" text includes only the text after the name.
The tags `@param`/`@arg`/`@argument` and `@property`/`@prop` will be properly
parsed to ensure that the matched "description" text includes only the text
after the name.

All other tags will treat the text following the tag name, a space, and
an optional curly-bracketed type expression (and another space) as part of
its "description" (e.g., for `@returns {someType} some description`, the
Expand Down Expand Up @@ -2577,9 +2582,9 @@ Overrides the default contexts (see below).
|||
|---|---|
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
|Tags|N/A by default but see `tags` options|
|Tags|docblock and `@description` (or `@desc`) by default but more with `tags`|
|Settings||
|Options|`contexts`, `tags` (allows for 'param', 'arg', 'argument', 'description', 'desc', and any added to `tags` option, e.g., 'returns', 'return'), `mainDescription`, `matchDescription`|
|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`|

The following patterns are considered problems:

Expand Down

0 comments on commit 4d5400f

Please sign in to comment.