Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsdoc/require-jsdoc - publicOnly not working with private methods (using #) #1212

Closed
aws-sde opened this issue Mar 7, 2024 · 1 comment · Fixed by #1213
Closed

jsdoc/require-jsdoc - publicOnly not working with private methods (using #) #1212

aws-sde opened this issue Mar 7, 2024 · 1 comment · Fixed by #1213

Comments

@aws-sde
Copy link

aws-sde commented Mar 7, 2024

This is similar to #1124 but it's using # instead of TypeScript's private

Expected behavior

When jsdoc/require-jsdoc is configured with publicOnly: true for method definitions, there should be no error for private methods that lack docs.

Actual behavior

When jsdoc/require-jsdoc is configured with publicOnly: true for method definitions, it gives an error for private methods (prefixed with #) that lack docs.

ESLint Config

    "jsdoc/require-jsdoc": [
      'error',
      {
        publicOnly: true,
        require: {
          'MethodDefinition': true
        }
      }
    ],

ESLint sample

export class MyClass {
  #myPrivateMethod(): void { }
}

Environment

  • Node version: 18.19.1
  • ESLint version 8.56.0
  • eslint-plugin-jsdoc version: 48.2.0
Copy link

github-actions bot commented Mar 7, 2024

🎉 This issue has been resolved in version 48.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant