When using the rule jsdoc/require-jsdoc with contexts with CallExpression:not(*) and MemberExpression, the plugin should not trigger an error on functions calls.
Errors are triggered on functions calls.
module.exports = {
root: true,
globals: {
'console': false
},
parser: 'babel-eslint',
extends: ['plugin:jsdoc/recommended'],
rules: {
'jsdoc/require-jsdoc': ['error', {
contexts: [
'CallExpression:not(*)', // should prevent the next line (also tried `'CallExpression:not(*) > MemberExpression'` but wasn't sure about this one)
'MemberExpression', // <- false positive
'VariableDeclaration',
],
}],
},
};
class Test {
constructor() {
this.memberExpression = 'member'; // good
this.aFunc(); // wrong: should not be triggered
const aVariable = 'variable'; // good
}
/**
* @returns {void}
*/
aFunc = () => {}
}
eslint myfile.js
It seems you want: *:not(CallExpression) > MemberExpression (and remove CallExpression:not(*) and MemberExpression).
Right @brettz9 thank you !
I'm sorry you can close this issue.