Skip to content

Commit d7a9632

Browse files
committed
docs(match-description): indicate default uses 'u' flag and is not case-insensitive; use Markdown headings
1 parent 91bc6fb commit d7a9632

File tree

2 files changed

+31
-10
lines changed

2 files changed

+31
-10
lines changed

.README/rules/match-description.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,24 @@ by our supported Node versions):
88

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

11-
You can supply your own expression passing a `matchDescription` string on
12-
the options object.
11+
#### Options
12+
13+
##### `matchDescription`
14+
15+
You can supply your own expression to override the default, passing a
16+
`matchDescription` string on the options object.
1317

1418
```js
1519
{
1620
'jsdoc/match-description': ['error', {matchDescription: '[A-Z].*\\.'}]
1721
}
1822
```
1923

24+
As with the default, the supplied regular expression will be applied with the
25+
Unicode (`"u"`) flag and is *not* case-insensitive.
26+
27+
##### `tags`
28+
2029
If you want different regular expressions to apply to tags, you may use
2130
the `tags` option object:
2231

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,15 +2254,27 @@ by our supported Node versions):
22542254

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

2257-
You can supply your own expression passing a `matchDescription` string on
2258-
the options object.
2257+
<a name="eslint-plugin-jsdoc-rules-match-description-options-1"></a>
2258+
#### Options
2259+
2260+
<a name="eslint-plugin-jsdoc-rules-match-description-options-1-matchdescription"></a>
2261+
##### <code>matchDescription</code>
2262+
2263+
You can supply your own expression to override the default, passing a
2264+
`matchDescription` string on the options object.
22592265

22602266
```js
22612267
{
22622268
'jsdoc/match-description': ['error', {matchDescription: '[A-Z].*\\.'}]
22632269
}
22642270
```
22652271

2272+
As with the default, the supplied regular expression will be applied with the
2273+
Unicode (`"u"`) flag and is *not* case-insensitive.
2274+
2275+
<a name="eslint-plugin-jsdoc-rules-match-description-options-1-tags"></a>
2276+
##### <code>tags</code>
2277+
22662278
If you want different regular expressions to apply to tags, you may use
22672279
the `tags` option object:
22682280

@@ -2737,7 +2749,7 @@ The following types are always considered defined.
27372749
- `any`, `*`
27382750
- `Array`, `Object`, `RegExp`, `Date`, `Function`
27392751

2740-
<a name="eslint-plugin-jsdoc-rules-no-undefined-types-options-1"></a>
2752+
<a name="eslint-plugin-jsdoc-rules-no-undefined-types-options-2"></a>
27412753
#### Options
27422754

27432755
An option object may have the following keys:
@@ -3307,7 +3319,7 @@ Requires that all functions have a description.
33073319
* All functions must have a `@description` tag.
33083320
* Every description tag must have a non-empty description that explains the purpose of the method.
33093321

3310-
<a name="eslint-plugin-jsdoc-rules-require-description-options-2"></a>
3322+
<a name="eslint-plugin-jsdoc-rules-require-description-options-3"></a>
33113323
#### Options
33123324

33133325
An options object may have any of the following properties:
@@ -3485,7 +3497,7 @@ Requires that all functions have examples.
34853497
* All functions must have one or more `@example` tags.
34863498
* Every example tag must have a non-empty description that explains the method's usage.
34873499

3488-
<a name="eslint-plugin-jsdoc-rules-require-example-options-3"></a>
3500+
<a name="eslint-plugin-jsdoc-rules-require-example-options-4"></a>
34893501
#### Options
34903502

34913503
Has an object option with one optional property:
@@ -3709,7 +3721,7 @@ function quux () {
37093721
Checks for presence of jsdoc comments, on class declarations as well as
37103722
functions.
37113723

3712-
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-4"></a>
3724+
<a name="eslint-plugin-jsdoc-rules-require-jsdoc-options-5"></a>
37133725
#### Options
37143726

37153727
Accepts one optional options object, with two optional keys, `publicOnly`
@@ -4705,7 +4717,7 @@ function quux (foo) {
47054717

47064718
Requires that all function parameters are documented.
47074719

4708-
<a name="eslint-plugin-jsdoc-rules-require-param-options-5"></a>
4720+
<a name="eslint-plugin-jsdoc-rules-require-param-options-6"></a>
47094721
#### Options
47104722

47114723
An options object accepts one optional property:
@@ -5596,7 +5608,7 @@ function quux () {
55965608

55975609
Requires returns are documented.
55985610

5599-
<a name="eslint-plugin-jsdoc-rules-require-returns-options-6"></a>
5611+
<a name="eslint-plugin-jsdoc-rules-require-returns-options-7"></a>
56005612
#### Options
56015613

56025614
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document

0 commit comments

Comments
 (0)