Skip to content

Enforce newline after description but NOT when there is no description #1033

@yvele

Description

@yvele

I want to update eslint-plugin-jsdoc from v41 to v43.
But jsdoc/newline-after-description has been removed.
I cannot reproduce the same behaviour with jsdoc/tag-lines as recommanded in the changelog.

Expected behavior

/**
 * Description.
 * 
 * @param {string} input
 */
function processSass (input) {
}
// "jsdoc/newline-after-description": "error"

And when there is NO DESCRIPTION I don't want an extra useless empty line (of course).
(Many time we don't have description as the function name is self explanatory)

/**
 * @param {string} input
 */
function processSass (input) {
}
// "jsdoc/newline-after-description": "error"

Actual behavior

How to avoid this useless extra empty line when there is no description?
(Many time we don't have description as the function name is self explanatory)

/**
 *
 * @param {string} input
 */
function processSass (input) {
}
// "jsdoc/tag-lines": ["error", "never",{"startLines":1}]

ESLint Config

jsdoc/tag-lines

Environment

  • Node version: v18
  • ESLint version v8.38.0
  • eslint-plugin-jsdoc version: 43.0.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions