-
Notifications
You must be signed in to change notification settings - Fork 577
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
[chore] add require-jsdoc #459
Conversation
function arrayStart(line: string): boolean { | ||
const reg = /.*=\s*\[/g; | ||
return reg.test(line) && !(line[line.length - 1] === "]"); | ||
} | ||
|
||
/** @private */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these @Private comments are superfluous. Either the method is public and exported or it's private. How can we adding these superfluous comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with you and i've not found any workaround (for now) for this problem. There is only this in the doc: https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-settings-allow-private-to-disable-rules-for-that-comment-block
Problem is this is the reference plugin from eslint : https://eslint.org/blog/2018/11/jsdoc-end-of-life and it seems a bit incomplete for the private part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here’s the issue: gajus/eslint-plugin-jsdoc#192 and the PR: gajus/eslint-plugin-jsdoc#262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GREAT
i'll delete the @private
so and wait for the PR to be landed
@ry is it still revelant to add to the CI? I've seen the PR has been merged for eslint-plugin-jsdoc. I have a local branch working with it. Do you want me to push it? |
It seems unreasonable to require jsdoc for everything. Can it be enforced for only exported functions? |
Now with the merged PR it throws errors only on missing jsdoc on exported funcs. Using this argument:
|
Closing as a new one as been created. |
As we want to make a robust API, we also need to have a robust documentation. Adding JsDoc check in the pipeline is necessary i think. We sometimes (me the first) forget about adding JsDoc. Then it would help for the PR review process.
I've added another eslint line for the pipeline because i don't want to flood the main one with all the warnings. Once the repo will be cleaned i think we can merge the two commands in one. Also there is some warning about
_test
files ignored because we don't need documentation for it. Note: only wait to disable those warns is to--quiet
the eslint command.To ignore private methods you have to do like this:
https://github.com/denoland/deno_std/compare/master...zekth:jsdo_proposal?expand=1#diff-3dabb7bf52bbca9c45474fe23c1d029bR122
For the moment only the rule of missing jsdoc is applied. Feel free to give you thoughts about adding rules.
Here is the doc: https://eslint.org/docs/rules/require-jsdoc