You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When given a code block that is not at the beginning or the end of the JSDoc block, the rule require-description-complete-sentence should run and provide feedback.
Actual behavior
The rule is throwing a TypeError when given a code block that is not at the beginning or end of a JSDoc code block.
Oops! Something went wrong! :(
ESLint: 8.56.0
TypeError: Expected a string
Occurred while linting /Users/user/test/test.js:10
Rule: "jsdoc/require-description-complete-sentence"
at module.exports (/Users/user/test/node_modules/escape-string-regexp/index.js:5:9)
at Object.fix (/Users/user/test/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.cjs:112:75)
at normalizeFixes (/Users/user/test/node_modules/eslint/lib/linter/report-translator.js:194:28)
at /Users/user/test/node_modules/eslint/lib/linter/report-translator.js:365:49
at Object.report (/Users/user/test/node_modules/eslint/lib/linter/linter.js:1047:41)
at report (/Users/user/test/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.cjs:1642:13)
at report (/Users/user/test/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.cjs:157:7)
at /Users/user/test/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.cjs:171:7
at Array.some (<anonymous>)
at validateDescription (/Users/user/test/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.cjs:106:21)
Expected behavior
When given a code block that is not at the beginning or the end of the JSDoc block, the rule
require-description-complete-sentence
should run and provide feedback.Actual behavior
The rule is throwing a TypeError when given a code block that is not at the beginning or end of a JSDoc code block.
ESLint Config
ESLint sample
Interestingly, if you rearrange these three elements, it works.
Environment
eslint-plugin-jsdoc
version: ^48.0.3The text was updated successfully, but these errors were encountered: