Closed martiensk closed 5 months ago
I am not able to replicate getting any errors for this.
@brettz9 I managed to fix my problem - it is not a bug with eslint. It is a bug with my knowledge.
Below is what caused the problem, I fixed it by changing my contexts string to :not(CallExpression):not(Property) > ArrowFunctionExpression
"jsdoc/require-jsdoc": [
"warn",
{
"contexts": [
":not(CallExpression) > ArrowFunctionExpression",
":not(Property) > ArrowFunctionExpression"
],
"require": {
"ArrowFunctionExpression":false,
"FunctionDeclaration": true,
"MethodDefinition": true,
"FunctionExpression": true
}
}
]
Expected behavior
When using the rule jsdoc/require-jsdoc with contexts with :not(CallExpression) > ArrowFunctionExpression, the plugin should not trigger an error on Vue lifecycle hooks (or setTimeout).
Actual behavior
An error is triggered.
ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 48.0.4