Related #982
Expected behavior
Remove leading empty line appearing before description content
Actual behavior
Empty line stays
ESLint Config
import jsdoc from 'eslint-plugin-jsdoc';
{
plugins: {
jsdoc,
},
rules: {
'jsdoc/no-blank-block-descriptions': 2,
}
}
ESLint sample
/**
*
* Seniority levels that participate in distribution, in display
* order. `custom` is never a real distribution key. Every test shown in this
* modal can recruit each of these levels, so all three are always editable.
*/
const SENIORITY_ORDER = ['senior', 'middle', 'specialist'];
For some reason I don't see this case tested at https://github.com/gajus/eslint-plugin-jsdoc/blob/v64.2.1/docs/rules/no-blank-block-descriptions.md
Side quest: this is a result of convert-to-jsdoc-comments auto-fix, if there's bandwidth to look at that.
The fixer unconditionally prepends /\n${indent}* to the raw, unmodified comment.value.
comment.value is literally "\n * Seniority levels...\n */" (i.e. it already starts with \n * ). So the fixer glues /\n * + \n * Seniority levels... together — producing two newline+* sequences back to back, which is exactly the empty \n *\n line you're seeing. It never strips/dedupes the original leading \n * before re-prefixing its own.
Environment
- Node version: 24.19
- ESLint version: 9.39.4
eslint-plugin-jsdoc version: 64.2.1
Related #982
Expected behavior
Remove leading empty line appearing before description content
Actual behavior
Empty line stays
ESLint Config
ESLint sample
For some reason I don't see this case tested at https://github.com/gajus/eslint-plugin-jsdoc/blob/v64.2.1/docs/rules/no-blank-block-descriptions.md
Side quest: this is a result of
convert-to-jsdoc-commentsauto-fix, if there's bandwidth to look at that.Environment
eslint-plugin-jsdocversion: 64.2.1