Open lpy opened 7 years ago
@benshayden @eakuefner @fmeawad @tdresser @zeptonaut @anniesullie
From: dashboard/dashboard/elements/alert-remove-box.html, with that rule applied:
/usr/local/google/home/tdresser/chromium/src/third_party/catapult/dashboard/dashboard/elements/alert-remove-box.html
48:7 error Missing JSDoc for parameter 'event' valid-jsdoc
48:7 error Missing JSDoc for parameter 'detail' valid-jsdoc
Aren't we trying to not require that every parameter be annotated?
"requireParamDescription": false,
only makes it so you don't need a description as part of your @param annotation. You still need the annotation itself...
As one data point, in tracing/tracing/metrics, we have
mmmm, I thought we were saying we wouldn't require description for every param but still need you to annotate it. @eakuefner could you clarify it? I didn't find a configuration that would allow us to skip params.
I agree that there's no config option that would let us skip params.
What we came to in the meeting was that people shouldn't be required to specify params, but yes, as folks are saying, there does not seem to be an option for disable param checking entirely. We have two options here:
requireParams
option that, if false, disables param checking.Let the first option becomes our workaround, and the second option should be the right way, I will file a bug on eslint.
It turns out there's already a feature request that got closed because they claimed they couldn't reach consensus. I am trying to see if we can reopen it.
@lpy I'm pretty sure that the comment that alberto made on the thread you linked to was automatically added after a long period of no discussion on the thread: I've seen the same message posted on other bug threads. I think it's very likely that, if we were to open a bug describing exactly the feature that we'd like to support, link to the old bug that didn't reach consensus, and make it clear that we were willing to write the pull request required to add the feature, the eslint folks would probably be receptive.
feature request submitted.
@lpy, it's probably worth mentioning in the feature request not just what we'd like changed but also why we feel that it's a valid way to use jsdoc.
I think one thing that's important to convey is for a function like:
/**
We don't think that it adds anything to the jsdoc by adding an @param for
iterable
. Especially given the fact that we're not parsing the jsdocs to
build documentation online, but rather using them to help increase
readability int he code, we feel that adding parameter descriptions where
they're not necessary actually hurts readability.
Tl;dr JSDoc check in eslint will be turnt on by default.
Rules Summary
Explicitly require that
Explicitly not require that
eslint rule
There is a bunch of violation in catapult codebase right now, I put them in a spreasheet
How you can help as an owner/reviewer
What you should do as a contributor
./common/eslint/bin/run_eslint --path YOUR_CODE_PATH