Skip to content

Commit 5c8ef9f

Browse files
committed
Revert "feat: add a global option for checking constructors, getters or setters and remove avoidExampleOnConstructors option."
This reverts commit 49f106c.
1 parent 49f106c commit 5c8ef9f

14 files changed

+86
-909
lines changed

.README/rules/require-description.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ An options object may have any of the following properties:
2424
- `descriptionStyle` - Whether to accept implicit descriptions (`"body"`) or
2525
`@description` tags (`"tag"`) as satisfying the rule. Set to `"any"` to
2626
accept either style. Defaults to `"body"`.
27-
- `checkConstructors` - A value indicating whether `constructor`s should be checked. Defaults to `true`.
28-
- `checkGetters` - A value indicating whether getters should be checked. Defaults to `true`.
29-
- `checkSetters` - A value indicating whether getters should be checked. Defaults to `true`.
3027

31-
| | |
32-
| -------- | ------------------------------------------------------------------------------------------------------------- |
33-
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
34-
| Tags | `description` or jsdoc block |
35-
| Aliases | `desc` |
36-
| Options | `contexts`, `exemptedBy`, `descriptionStyle`, `checkConstructors`, `checkGetters`, `checkSetters` |
37-
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
28+
|||
29+
|---|---|
30+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
31+
|Tags|`description` or jsdoc block|
32+
|Aliases|`desc`|
33+
|Options|`contexts`, `exemptedBy`, `descriptionStyle`|
34+
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
3835

3936
<!-- assertions requireDescription -->

.README/rules/require-example.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,19 @@ block avoids the need for an `@example`. Defaults to an array with
1717
so be sure to add back `inheritdoc` if you wish its presence to cause
1818
exemption of the rule.
1919

20+
##### `avoidExampleOnConstructors`
21+
22+
Set to `true` to avoid the need for an example on a constructor (whether
23+
indicated as such by a jsdoc tag or by being within an ES6 `class`).
24+
Defaults to `false`.
25+
2026
##### `contexts`
2127

2228
Set this to an array of strings representing the AST context
2329
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes).
2430
Overrides the default contexts (see below). Set to `"any"` if you want
2531
the rule to apply to any jsdoc block throughout your files.
2632

27-
##### `checkConstructors`
28-
29-
A value indicating whether `constructor`s should be checked. Defaults to `true`.
30-
31-
##### `checkGetters`
32-
33-
A value indicating whether getters should be checked. Defaults to `false`.
34-
35-
##### `checkSetters`
36-
37-
A value indicating whether getters should be checked. Defaults to `false`.
38-
3933
#### Fixer
4034

4135
The fixer for `require-example` will add an empty `@example`, but it will still

.README/rules/require-param.md

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,12 @@ contexts (see below). May be useful for adding such as
2222
`TSMethodSignature` in TypeScript or restricting the contexts
2323
which are checked.
2424

25-
##### `checkConstructors`
26-
27-
A value indicating whether `constructor`s should be checked. Defaults to `true`.
28-
29-
##### `checkGetters`
30-
31-
A value indicating whether getters should be checked. Defaults to `false`.
32-
33-
##### `checkSetters`
34-
35-
A value indicating whether getters should be checked. Defaults to `false`.
36-
37-
| | |
38-
| -------- | ------------------------------------------------------------------------------------------------------------- |
39-
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
40-
| Tags | `param` |
41-
| Aliases | `arg`, `argument` |
42-
| Options | `contexts`, `exemptedBy`, `checkConstructors`, `checkGetters`, `checkSetters` |
43-
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
25+
|||
26+
|---|---|
27+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
28+
|Tags|`param`|
29+
|Aliases|`arg`, `argument`|
30+
|Options|`contexts`, `exemptedBy`|
31+
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
4432

4533
<!-- assertions requireParam -->

.README/rules/require-returns.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Will also report if multiple `@returns` tags are present.
66

77
#### Options
88

9-
- `checkConstructors` - A value indicating whether `constructor`s should
10-
be checked for `@returns` tags. Defaults to `false`.
119
- `checkGetters` - Boolean to determine whether getter methods should
1210
be checked for `@returns` tags. Defaults to `true`.
1311
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document
@@ -42,12 +40,12 @@ Will also report if multiple `@returns` tags are present.
4240
'jsdoc/require-returns': ['error', {forceReturnsWithAsync: true}]
4341
```
4442

45-
| | |
46-
| -------- | ------------------------------------------------------------------------------------------------------------- |
47-
| Context | `ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled |
48-
| Tags | `returns` |
49-
| Aliases | `return` |
50-
| Options | `checkConstructors`, `checkGetters`, `contexts`, `exemptedBy`, `forceRequireReturn`, `forceReturnsWithAsync` |
51-
| Settings | `overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs` |
43+
|||
44+
|---|---|
45+
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
46+
|Tags|`returns`|
47+
|Aliases|`return`|
48+
|Options|`checkGetters`, `contexts`, `exemptedBy`, `forceRequireReturn`, `forceReturnsWithAsync`|
49+
|Settings|`overrideReplacesDocs`, `augmentsExtendsReplacesDocs`, `implementsReplacesDocs`|
5250

5351
<!-- assertions requireReturns -->

0 commit comments

Comments
 (0)