All of the official JSDoc examples have naively simple documentation strings, like the following:
/**
* @param {string} author - The author of the book.
*/
The problem is, in real-life documentation you often have longer documentation strings:
/**
* @param {string} author - The author of the book, presumably some person who writes well
*/
But since most companies (for legitimate readability reasons) have line length limits, the above often isn't acceptable. However, what I can't figure out is what the "right" way of breaking up those lines should be.
I could do:
/**
* @param {string} author - The author of the book, presumably some
* person who writes well
*/
But that is difficult to read. I could instead do:
/**
* @param {string} author - The author of the book, presumably some
* person who writes well
*/
That looks better, but it can result in a ton of lines, especially if the parameter has a long name:
/**
* @param {string} personWhoIsTheAuthorOfTheBook - The author of the
* book, presumably
* some person who
* writes well
*/
So my question is, what is the proper/official/canonical way of formatting long @param
lines (in the code, not in the generated JSDoc) ... or really any long annotation lines for that matter.