-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Expected behavior
When using the rule jsdoc/require-jsdoc with require with FunctionDeclaration set to true, the plugin should trigger an error on arrow functions declarations.
Actual behavior
Arrow functions declarations are ignored.
ESLint Config
module.exports = {
root: true,
globals: {
'console': false
},
parser: "babel-eslint",
extends: ['eslint:recommended', 'plugin:jsdoc/recommended'],
rules: {
'jsdoc/require-jsdoc': ['error', {
require: {
ArrowFunctionExpression: true,
ClassDeclaration: false,
ClassExpression: true,
FunctionDeclaration: true, // <- should not ignore arrow functions
FunctionExpression: true,
MethodDefinition: true
}
}],
},
};
ESLint sample
class Test {
aFunc = () => {} // not detected
anotherFunc() {} // detected
}CLI sample
eslint myfile.js
Environment
- Node version: 12.16.3
- ESLint version: 6.8.0
eslint-plugin-jsdocversion: 30.0.0