Skip to content

startLines in tag-lines is not a replacement of newline-after-description when there is no description #1022

@stof

Description

@stof

Expected behavior

If there is no description, tag-lines should have a way to allow the tag to be at the beginning of the jsdoc, even though we want a line between the description and the tags when we have both. Otherwise, there is no proper replacement for jsdoc/newline-after-description with always

Actual behavior

startLines: 1 always forces an empty line even if it is the beginning of the jsdoc.

ESLint Config

{
    "plugins": ["jsdoc"],
    "rules": {
        "jsdoc/tag-lines": ["error", "never", {
            "startLines": 1
        }],
    }
}

ESLint sample

/**
 * @param {string} input
 * @param {string|rename.Options} renamingConfig
 * @returns {gulp.TaskFunction}
 */
function processSass (input, renamingConfig) {
    // <redacted>
}

Environment

  • Node version: 18.16.0
  • ESLint version: 8.38.0
  • eslint-plugin-jsdoc version: 43.0.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions