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 JSDoc on exported methods #192
Comments
I have an ongoing implementation of this here: Extersky@55fa30b This version supports ES6 exports and CommonJS exports. Should CommonJS be supported for inclusion in this plugin? In the original proposal, only the ES6 exports were planned to be supported. |
This is a great feature, I'm surprised it doesn't exist. The rule "document all PUBLIC interfaces" is one I've always lived by and conversely, documenting private function feels unnecessary to me. I think that since node.js LTS is still using CommonJS modules there's definitely a good reason to support it. I wish more node.js modules had quality documentation. To really make this work, I think all of the "jsdoc/require-" configurations would require an additional option like "always", "public", "never". |
Sounds quite useful, @Extersky . Could you prepare a PR? I'd think config to choose between which type of modules were supported would be ideal, but even if it is automatically for both, I think it would be a very handy to have. Regarding, always/public/never, @ericrini , this is more or less what is requested by #78 (though to selectively exclude private functions, thereby effectively enabling a public option in addition to the default "always" behavior). |
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
* When enabled, require all exported function bodies to have JSDoc block * Fixes gajus#192
🎉 This issue has been resolved in version 8.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Support rule that requires JSDoc comment on publicly exported functions. This was originally proposed for now deprecated ESLint rule https://eslint.org/docs/rules/require-jsdoc.
Original enhancement suggestion:
eslint/eslint#7812
The rule could support ES6 exports and possibly other interfaces such as CommonJS exports.
The text was updated successfully, but these errors were encountered: