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
Add jsdoc to linting rules #223
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #223 +/- ##
=======================================
Coverage 66.22% 66.22%
=======================================
Files 18 18
Lines 450 450
Branches 87 87
=======================================
Hits 298 298
Misses 131 131
Partials 21 21
Continue to review full report at Codecov.
|
The production snapshot needs to change because the source map differs.
We talked about this offline. I am pretty against this. We don't need JSDoc level documentation in our application repositories. Flow takes care of parameter definitions and return values. Having a simple "commenting on functions" lint rule sounds ideal until it fails hundreds/thousands of times in our application repos. |
Maybe we can compromise by agreeing to not approve pull requests that don't add or update comments in the affected area of code? |
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.
@evansiroky let's switch it to warnings and then I'll approve 👌
I'm proposing to add this rule to help us better document our javascript code. This PR proposes to add the eslint rule
require-jsdoc
and thus require docstrings in the following places:I could also include arrow functions, but I figured that'd be excessive.
As you'll notice, a lot of the functions in mastarm remain undocumented and pass the linting test because of the this issue with the
require-jsdoc
. It's on their roadmap to fix, but that hasn't happened yet.If we really wanted to go all out on jsdoc, we could also add the
valid-jsdoc
rule which would force us to do things like annote every param in function arguments. I left that out for now and propose this as a first step.