-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Labels
Description
Expected behavior
ESLint should report a "Missing JSDoc comment" rule violation for the first function as well as for the static class function.
Actual behavior
It only reports the the first missing JSDoc, but not the undocumented static class function.
ESLint Config
Pretty much the standard configuration with the AirBnB style:
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'airbnb-base',
'plugin:jsdoc/recommended-error',
],
overrides: [
{
env: {
node: true,
},
files: [
'.eslintrc.{js,cjs}',
],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'jsdoc',
],
rules: {
},
};ESLint sample
function undocumentedFunction() {
// This undocumented function will be reported.
return 42;
}
class MyClass {
static undocumentedStaticClassFunction() {
// This one won't.
return 'What does this function do? No one knows.';
}
}
export { undocumentedFunction, MyClass };Environment
- Node version: v18.18.2
- ESLint version v8.56.0
eslint-plugin-jsdocversion: 48.1.0eslint-config-airbnb-baseversion: 15.0.0