Skip to content

Commit 63e573b

Browse files
brettz9golopot
authored andcommitted
docs: generate docs
1 parent 7e4a106 commit 63e573b

File tree

1 file changed

+22
-28
lines changed

1 file changed

+22
-28
lines changed

README.md

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,20 +2323,14 @@ it by setting it to `false`.
23232323

23242324
Set this to a string or array of strings representing the AST context
23252325
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes).
2326-
2327-
<a name="eslint-plugin-jsdoc-rules-match-description-options-1-nodefaults"></a>
2328-
##### <code>noDefaults</code>
2329-
2330-
By default, `contexts` will permit `ArrowFunctionExpression`,
2331-
`FunctionDeclaration`, and `FunctionExpression`. Set this instead to `true` to
2332-
have `contexts` override these.
2326+
Overrides the defaults.
23332327

23342328
|||
23352329
|---|---|
23362330
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
23372331
|Tags|N/A by default but see `tags` options|
23382332
|Settings||
2339-
|Options|`contexts`, `noDefaults`, `tags` (allows for 'param', 'arg', 'argument', 'returns', 'return'), `matchDescription`|
2333+
|Options|`contexts`, `tags` (allows for 'param', 'arg', 'argument', 'returns', 'return'), `matchDescription`|
23402334

23412335
The following patterns are considered problems:
23422336

@@ -2347,7 +2341,7 @@ The following patterns are considered problems:
23472341
const q = class {
23482342

23492343
}
2350-
// Options: [{"contexts":["ClassExpression"],"noDefaults":true}]
2344+
// Options: [{"contexts":["ClassExpression"]}]
23512345
// Message: JSDoc description does not satisfy the regex pattern.
23522346

23532347
/**
@@ -2356,7 +2350,7 @@ const q = class {
23562350
const q = {
23572351

23582352
};
2359-
// Options: [{"contexts":["ObjectExpression"],"noDefaults":true}]
2353+
// Options: [{"contexts":["ObjectExpression"]}]
23602354
// Message: JSDoc description does not satisfy the regex pattern.
23612355

23622356
/**
@@ -2551,8 +2545,12 @@ function quux () {
25512545
class quux {
25522546

25532547
}
2548+
<<<<<<< HEAD
25542549
// Options: [{"contexts":["ClassDeclaration"],"noDefaults":true}]
25552550
>>>>>>> feat(match-description): allow `main description: string|boolean` to override or disable main description separate from default
2551+
=======
2552+
// Options: [{"contexts":["ClassDeclaration"]}]
2553+
>>>>>>> docs: generate docs
25562554
// Message: JSDoc description does not satisfy the regex pattern.
25572555

25582556
class MyClass {
@@ -2561,7 +2559,7 @@ class MyClass {
25612559
*/
25622560
myClassField = 1
25632561
}
2564-
// Options: [{"contexts":["ClassProperty"],"noDefaults":true}]
2562+
// Options: [{"contexts":["ClassProperty"]}]
25652563
// Message: JSDoc description does not satisfy the regex pattern.
25662564

25672565
/**
@@ -2570,7 +2568,7 @@ class MyClass {
25702568
interface quux {
25712569

25722570
}
2573-
// Options: [{"contexts":["TSInterfaceDeclaration"],"noDefaults":true}]
2571+
// Options: [{"contexts":["TSInterfaceDeclaration"]}]
25742572
// Message: JSDoc description does not satisfy the regex pattern.
25752573

25762574
const myObject = {
@@ -2579,7 +2577,7 @@ const myObject = {
25792577
*/
25802578
myProp: true
25812579
};
2582-
// Options: [{"contexts":["Property"],"noDefaults":true}]
2580+
// Options: [{"contexts":["Property"]}]
25832581
// Message: JSDoc description does not satisfy the regex pattern.
25842582
````
25852583

@@ -2740,39 +2738,39 @@ class MyClass {
27402738
*/
27412739
myClassField = 1
27422740
}
2743-
// Options: [{"contexts":["ClassProperty"],"noDefaults":true}]
2741+
// Options: [{"contexts":["ClassProperty"]}]
27442742

27452743
/**
27462744
* Foo.
27472745
*/
27482746
interface quux {
27492747

27502748
}
2751-
// Options: [{"contexts":["TSInterfaceDeclaration"],"noDefaults":true}]
2749+
// Options: [{"contexts":["TSInterfaceDeclaration"]}]
27522750

27532751
const myObject = {
27542752
/**
27552753
* Bad description
27562754
*/
27572755
myProp: true
27582756
};
2759-
// Options: [{"contexts":[],"noDefaults":true}]
2757+
// Options: [{"contexts":[]}]
27602758

27612759
/**
27622760
* foo.
27632761
*/
27642762
const q = class {
27652763

27662764
}
2767-
// Options: [{"contexts":[],"noDefaults":true}]
2765+
// Options: [{"contexts":[]}]
27682766

27692767
/**
27702768
* foo.
27712769
*/
27722770
const q = {
27732771

27742772
};
2775-
// Options: [{"contexts":[],"noDefaults":true}]
2773+
// Options: [{"contexts":[]}]
27762774
````
27772775

27782776

@@ -3514,18 +3512,16 @@ An options object may have any of the following properties:
35143512

35153513
- `contexts` - Set to a string or array of strings representing the AST context
35163514
where you wish the rule to be applied (e.g., `ClassDeclaration` for ES6 classes).
3515+
Overrides the defaults.
35173516
- `exemptedBy` - Array of tags (e.g., `['type']`) whose presence on the document
35183517
block avoids the need for a `@description`.
3519-
- `noDefaults` - By default, `contexts` will permit `ArrowFunctionExpression`,
3520-
`FunctionDeclaration`, and `FunctionExpression`. Set this instead to `true` to
3521-
have `contexts` override these.
35223518

35233519
|||
35243520
|---|---|
35253521
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`; others when `contexts` option enabled|
35263522
|Tags|`description`|
35273523
|Aliases|`desc`|
3528-
|Options|`contexts`, `exemptedBy`, `noDefaults`|
3524+
|Options|`contexts`, `exemptedBy`|
35293525

35303526
The following patterns are considered problems:
35313527

@@ -3544,7 +3540,7 @@ function quux () {
35443540
class quux {
35453541

35463542
}
3547-
// Options: [{"contexts":"ClassDeclaration"}]
3543+
// Options: [{"contexts":["ClassDeclaration"]}]
35483544
// Message: Missing JSDoc @description declaration.
35493545

35503546
/**
@@ -3553,7 +3549,7 @@ class quux {
35533549
class quux {
35543550

35553551
}
3556-
// Options: [{"contexts":"ClassDeclaration","noDefaults":true}]
3552+
// Options: [{"contexts":["ClassDeclaration"]}]
35573553
// Message: Missing JSDoc @description declaration.
35583554

35593555
/**
@@ -3579,7 +3575,7 @@ function quux () {
35793575
interface quux {
35803576

35813577
}
3582-
// Options: [{"contexts":["TSInterfaceDeclaration"],"noDefaults":true}]
3578+
// Options: [{"contexts":["TSInterfaceDeclaration"]}]
35833579
// Message: Missing JSDoc @description declaration.
35843580
<<<<<<< HEAD
35853581

@@ -3647,7 +3643,7 @@ class quux {
36473643
function quux () {
36483644

36493645
}
3650-
// Options: [{"noDefaults":true}]
3646+
// Options: [{"contexts":["ClassDeclaration"]}]
36513647

36523648
/**
36533649
* @type {MyCallback}
@@ -3947,8 +3943,6 @@ be checked by the rule.
39473943

39483944
- `contexts` - Set this to a string or array of strings representing the additional
39493945
AST context where you wish the rule to be applied (e.g., `Property` for properties).
3950-
Note that unlike `require-description` and `match-description`, this rule has no
3951-
`noDefaults` option because its defaults are instead set up by `require`.
39523946

39533947
|||
39543948
|---|---|

0 commit comments

Comments
 (0)