jscs-dev / jscs-jsdoc

JsDoc validation rules for jscs
MIT License
99 stars 35 forks source link

New Rule: require summary description. #108

Open dtracers opened 9 years ago

dtracers commented 9 years ago

this is an extension of #106 and #99

Which is that a summary description is required with a new line and a complete sentence.

This actually a stricter version of requiring a new line. But the complete description still can follow under the new line rule. Basically there must be a period at the end of the first line. Which is then followed by a new line.

NOTE This does not require the summary to start with an upper case letter.

examples:

/**
 * Valid summary.
 *
 * Deeper description information
 */
function foo() {
}

/**
 * Invalid summary.  Summary can only be a single sentence
 */
function bar() {
}

/**
 * Invalid summary
 * on two lines.
 */
function foobar() {
}

/**
 * lowercase summary is valid with this rule.
 */
function barfoo() {
}