Skip to content

check-alignment has false-positive when not using star prefixes #1351

Open
@sindresorhus

Description

@sindresorhus

Expected behavior

I expected this to be allowed:

/**
@param {string} text
*/
const a = x => x;

When not using star prefix, the proper alignment means that the start and end of the comment don't have any indentation.

For example, this should be caught:

/**
@param {string} text
 */
const a = x => x;

Actual behavior

It complains.

ESLint Config

{
  'jsdoc/check-alignment': 'error'
}

ESLint sample

Already shared.

Environment

  • Node version: 22.12.0
  • ESLint version 9.18
  • eslint-plugin-jsdoc version: 50.6.2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions