@@ -945,6 +945,9 @@ function quux (foo) {
945
945
<a name =" eslint-plugin-jsdoc-rules-check-examples " ></a >
946
946
### <code >check-examples</code >
947
947
948
+ > ** NOTE** : This rule currently does not work in ESLint 8 (we are waiting for
949
+ > [ issue 14745] ( https://github.com/eslint/eslint/issues/14745 ) ).
950
+
948
951
Ensures that (JavaScript) examples within JSDoc adhere to ESLint rules. Also
949
952
has options to lint the default values of optional ` @param ` /` @arg ` /` @argument `
950
953
and ` @property ` /` @prop ` tags or the values of ` @default ` /` @defaultvalue ` tags.
@@ -6914,7 +6917,7 @@ class MyClass {
6914
6917
*/
6915
6918
myClassField = 1
6916
6919
}
6917
- // " jsdoc/ match- description" : [" error" |" warn" , {" contexts" :[" ClassProperty " ]}]
6920
+ // " jsdoc/ match- description" : [" error" |" warn" , {" contexts" :[" PropertyDefinition " ]}]
6918
6921
// Message: JSDoc description does not satisfy the regex pattern.
6919
6922
6920
6923
/**
@@ -7182,7 +7185,7 @@ class MyClass {
7182
7185
*/
7183
7186
myClassField = 1
7184
7187
}
7185
- // "jsdoc/match-description": ["error"|"warn", {"contexts":["ClassProperty "]}]
7188
+ // "jsdoc/match-description": ["error"|"warn", {"contexts":["PropertyDefinition "]}]
7186
7189
7187
7190
/**
7188
7191
* Foo.
@@ -12813,7 +12816,7 @@ class Animal {
12813
12816
@SomeAnnotation (' optionalParameter' )
12814
12817
tail: boolean;
12815
12818
}
12816
- // "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["ClassProperty "]}]
12819
+ // "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["PropertyDefinition "]}]
12817
12820
// Message: Missing JSDoc comment.
12818
12821
12819
12822
@Entity (' users' )
@@ -12907,7 +12910,7 @@ export class MyComponentComponent {
12907
12910
@Input ()
12908
12911
public value = new EventEmitter ();
12909
12912
}
12910
- // "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["ClassProperty:has( Decorator[expression.callee.name=\"Input\"]) "]}]
12913
+ // "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["PropertyDefinition > Decorator[expression.callee.name=\"Input\"]"]}]
12911
12914
// Message: Missing JSDoc comment.
12912
12915
12913
12916
requestAnimationFrame (draw)
@@ -12951,6 +12954,12 @@ function comment () {
12951
12954
}
12952
12955
// "jsdoc/require-jsdoc": ["error"|"warn", {"enableFixer":false,"fixerMessage":" TODO: add comment"}]
12953
12956
// Message: Missing JSDoc comment.
12957
+
12958
+ export class InovaAutoCompleteComponent {
12959
+ public disabled = false ;
12960
+ }
12961
+ // "jsdoc/require-jsdoc": ["error"|"warn", {"contexts":["PropertyDefinition"],"publicOnly":true}]
12962
+ // Message: Missing JSDoc comment.
12954
12963
````
12955
12964
12956
12965
The following patterns are not considered problems:
0 commit comments