Closed reececomo closed 1 year ago
Split from https://github.com/gajus/eslint-plugin-jsdoc/issues/1122.
When using jsdoc/require-jsdoc I would expect publicOnly and require.MethodDefinition together to mean that public methods required docs.
jsdoc/require-jsdoc
publicOnly
require.MethodDefinition
Private/protected methods are also failing the lint check too (unexpectedly).
I imagine this issue unexpectedly would apply to other require. properties or context. options too.
require.
context.
"jsdoc/require-jsdoc": [ 'error', { checkConstructors: false, publicOnly: true, require: { 'MethodDefinition': true } } ],
export class MyClass { public myPublicMethod(): void { } /* ^ Missing JSDoc comment. eslint(jsdoc/require-jsdoc) - expected ✅ */ private myPrivateMethod(): void { } /* ^ Missing JSDoc comment. eslint(jsdoc/require-jsdoc) - unexpected ❌ */ // ... }
eslint-plugin-jsdoc
:tada: This issue has been resolved in version 46.4.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thank you @brettz9!
Split from https://github.com/gajus/eslint-plugin-jsdoc/issues/1122.
Expected behavior
When using
jsdoc/require-jsdoc
I would expectpublicOnly
andrequire.MethodDefinition
together to mean that public methods required docs.Actual behavior
Private/protected methods are also failing the lint check too (unexpectedly).
I imagine this issue unexpectedly would apply to other
require.
properties orcontext.
options too.ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 46.4.1