Skip to content

Commit 96ac40b

Browse files
committed
- Revert accidental premature push
1 parent 99ce62a commit 96ac40b

12 files changed

+115
-761
lines changed

.README/rules/match-description.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The default is this basic expression to match English sentences (Support
66
for Unicode upper case may be added in a future version when it can be handled
77
by our supported Node versions):
88

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

1111
#### Options
1212

@@ -50,36 +50,14 @@ tag should be linted with the `matchDescription` value (or the default).
5050
}
5151
```
5252

53-
If you wish to override the main function description without changing the
54-
default `match-description`, you may use `mainDescription`:
5553

56-
```js
57-
{
58-
'jsdoc/match-description': ['error', {
59-
mainDescription: '[A-Z].*\\.',
60-
tags: {
61-
param: true,
62-
returns: true
63-
}
64-
}]
65-
}
66-
```
67-
68-
There is no need to add `mainDescription: true`, as by default, the main
69-
function (and only the main function) is linted, though you may disable checking
70-
it by setting it to `false`.
71-
72-
##### `contexts`
73-
74-
Set this to an array of strings representing the AST context
75-
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes).
76-
Overrides the defaults.
54+
By default, only the main function description is linted.
7755

7856
|||
7957
|---|---|
80-
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
58+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
8159
|Tags|N/A by default but see `tags` options|
8260
|Settings||
83-
|Options|`contexts`, `tags` (allows for 'param', 'arg', 'argument', 'returns', 'return'), `matchDescription`|
61+
|Options|`tags` (allows for 'param', 'arg', 'argument', 'returns', 'return'), `matchDescription`|
8462

8563
<!-- assertions matchDescription -->

.README/rules/require-description.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ Requires that all functions have a description.
99

1010
An options object may have any of the following properties:
1111

12-
- `contexts` - Set to an array of strings representing the AST context
12+
- `contexts` - Set to a string or array of strings representing the AST context
1313
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes).
14-
Overrides the defaults.
1514
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document
1615
block avoids the need for a `@description`.
16+
- `noDefaults` - By default, `contexts` will permit `ArrowFunctionExpression`,
17+
`FunctionDeclaration`, and `FunctionExpression`. Set this instead to `true` to
18+
have `contexts` override these.
1719

1820
|||
1921
|---|---|
2022
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
2123
|Tags|`description`|
2224
|Aliases|`desc`|
23-
|Options|`contexts`, `exemptedBy`|
25+
|Options|`contexts`, `exemptedBy`, `noDefaults`|
2426

2527
<!-- assertions requireDescription -->

.README/rules/require-jsdoc.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ be checked by the rule.
3434
- `FunctionExpression`
3535
- `MethodDefinition`
3636

37-
- `contexts` - Set this to an array of strings representing the additional
38-
AST context where you wish the rule to be applied (e.g., `Property` for properties).
39-
4037
|||
4138
|---|---|
4239
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `ClassExpression`, `FunctionDeclaration`, `FunctionExpression`|

0 commit comments

Comments
 (0)