This appears to be a regression in version 31. I upgraded from 30.3.0 to 31.0.4 and this problem appeared.
Expected behavior
A Javascript module like the following should pass without error:
/**
* @param foo
*
* @returns {void}
*/
export default (foo) => {
foo()
}
Actual behavior
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.
ESLint Config
module.exports = {
parser: 'babel-eslint',
plugins: ['jsdoc'],
rules: { 'jsdoc/require-description-complete-sentence': 'error' },
}
Environment
- Node version: v12.18.3
- ESLint version: v7.17.0
eslint-plugin-jsdoc version: 31.0.4