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

require-param still wants param documentation, even if @ignore is used #780

Closed
paulheising opened this issue Aug 23, 2021 · 2 comments
Closed

Comments

@paulheising
Copy link

I use jsdoc/recommended which includes the require-param rule.

Now I have a typescript library, and I use JSDoc comments to auto-generate an html documentation for lib-users, not for lib-devs. Therefore, I use @ignore on all artifacts that are not part of the public api of my lib, so they won't appear in the generated html documentation.

However, the require-param rule still wants me to document params on functions that I @ignored, for example:

/** @ignore */
export function getNgModuleConfig(
  moduleClass: Record<string, unknown>,
): NgModule {
  // ...
}

When I run eslint, it complains:

64:1   warning  Missing JSDoc @param "moduleClass" declaration  jsdoc/require-param

From my understanding, the @ignore tag should take precedence over all other stuff, and therefore it should be not required to document params in @ignored functions.

brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Aug 23, 2021
@brettz9
Copy link
Collaborator

brettz9 commented Aug 24, 2021

I've filed #781 as a possible solution. It adds a new setting, ignoreReplacesDocs, which will be on by default, that will cause @ignore to replace the need for documentation. (Some might still want to require well-formed docs even if using @ignore, so that's why the setting can be set to false, but I agree it makes sense as a default to be on.)

@brettz9 brettz9 closed this as completed in f8297aa Sep 7, 2021
@gajus
Copy link
Owner

gajus commented Sep 7, 2021

🎉 This issue has been resolved in version 36.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants