Skip to content

Commit 2c34e21

Browse files
committed
Change contexts to always override defaults (match-description, require-jsdoc); docs, schema
1 parent 1fb8bd5 commit 2c34e21

File tree

4 files changed

+10
-24
lines changed

4 files changed

+10
-24
lines changed

.README/rules/match-description.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ it by setting it to `false`.
7171

7272
##### `contexts`
7373

74-
Set this to a string or array of strings representing the AST context
74+
Set this to an array of strings representing the AST context
7575
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes).
7676
Overrides the defaults.
7777

.README/rules/require-jsdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ be checked by the rule.
3434
- `FunctionExpression`
3535
- `MethodDefinition`
3636

37-
- `contexts` - Set this to a string or array of strings representing the additional
37+
- `contexts` - Set this to an array of strings representing the additional
3838
AST context where you wish the rule to be applied (e.g., `Property` for properties).
3939

4040
|||

src/rules/matchDescription.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,10 @@ export default iterateJsdoc(({
7171
additionalProperties: false,
7272
properties: {
7373
contexts: {
74-
oneOf: [
75-
{
76-
items: {
77-
type: 'string'
78-
},
79-
type: 'array'
80-
},
81-
{
82-
type: 'string'
83-
}
84-
]
74+
items: {
75+
type: 'string'
76+
},
77+
type: 'array'
8578
},
8679
mainDescription: {
8780
oneOf: [

src/rules/requireJsdoc.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,10 @@ const OPTIONS_SCHEMA = {
88
additionalProperties: false,
99
properties: {
1010
contexts: {
11-
oneOf: [
12-
{
13-
items: {
14-
type: 'string'
15-
},
16-
type: 'array'
17-
},
18-
{
19-
type: 'string'
20-
}
21-
]
11+
items: {
12+
type: 'string'
13+
},
14+
type: 'array'
2215
},
2316
publicOnly: {
2417
oneOf: [

0 commit comments

Comments
 (0)