Multiline comments
thomasttvo opened this issue · comments
Thomas Vo commented
The multiline comment section says all multiline comments need to use the jsdoc syntax /** */
. Is this right? Does the author mean "All jsdoc comments" instead of "multiline"?
Otherwise, it doesn't really make sense if we use jsdoc where we're not documenting a variable, class, or function
/**
* This function does XYZ
*/
function xyz() {
/**
* This chunk of code does this because we don't like to do it the other way.
* Otherwise, zombie apocalypse.
*/
const a = b + 1;
doSomething(a);
/**
* Here we're just having fun if nothing happens
* Busines continues as usual
*/
doSomething(b)
}
Jordan Harband commented
It refers to all multiline comments, and the guide assumes you are not using jsdoc at all.
Thomas Vo commented
that's quite strange, would you say my above code is correct? Shouldn't it be like below?
/**
* This function does XYZ
*/
function xyz() {
// This chunk of code does this because we don't like to do it the other way.
// Otherwise, zombie apocalypse.
const a = b + 1;
doSomething(a);
// Here we're just having fun if nothing happens
// Busines continues as usual
doSomething(b)
}
Jordan Harband commented
No, I’d say both are fine.