Skip to content

Commit b64431f

Browse files
committed
- Reflect in docs that check-examples now supports ClassDeclaration context
1 parent 52a8c0e commit b64431f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.README/rules/check-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ command.
2222

2323
|||
2424
|---|---|
25-
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
25+
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `FunctionDeclaration`, `FunctionExpression`|
2626
|Tags|`example`|
2727
|Settings| *See above* |
2828

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ command.
466466

467467
|||
468468
|---|---|
469-
|Context|`ArrowFunctionExpression`, `FunctionDeclaration`, `FunctionExpression`|
469+
|Context|`ArrowFunctionExpression`, `ClassDeclaration`, `FunctionDeclaration`, `FunctionExpression`|
470470
|Tags|`example`|
471471
|Settings| *See above* |
472472

@@ -482,6 +482,15 @@ function quux () {
482482
// Settings: {"jsdoc":{"baseConfig":{"rules":{"no-alert":2,"semi":["error","always"]}},"eslintrcForExamples":false}}
483483
// Message: @example error (no-alert): Unexpected alert.
484484

485+
/**
486+
* @example alert('hello')
487+
*/
488+
class quux {
489+
490+
}
491+
// Settings: {"jsdoc":{"baseConfig":{"rules":{"no-alert":2,"semi":["error","always"]}},"eslintrcForExamples":false}}
492+
// Message: @example error (no-alert): Unexpected alert.
493+
485494
/**
486495
* @example ```js
487496
alert('hello');

0 commit comments

Comments
 (0)