This appears to be a regression in version 31. I upgraded from 30.3.0 to 31.0.4 and this problem appeared.
A Javascript module like the following should pass without error:
/**
* @param foo
*
* @returns {void}
*/
export default (foo) => {
foo()
}
The above module fails with jsdoc/require-description-complete-sentence:
/path/to/foo.js
2:0 error Sentence must end with a period jsdoc/require-description-complete-sentence
✖ 1 problem (1 error, 0 warnings)
Removing the newline between the @param and @returns removes the error.
module.exports = {
parser: 'babel-eslint',
plugins: ['jsdoc'],
rules: { 'jsdoc/require-description-complete-sentence': 'error' },
}
eslint-plugin-jsdoc version: 31.0.4If I then run eslint --fix foo.js, I'm left with the following:
/**.
* @param foo
*
* @returns {void}
*/
export default (foo) => {
foo()
}
Which is odd because the error is regarding line 2, the @param annoation, not line 1.
:tada: This issue has been resolved in version 31.0.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Most helpful comment
:tada: This issue has been resolved in version 31.0.5 :tada:
The release is available on:
Your semantic-release bot :package::rocket: