Skip to content

useSingleJsDocAsterisk

Enforce JSDoc comment lines to start with a single asterisk, except for the first one.

This rule ensures that every line in a JSDoc block, except the opening one, starts with exactly one asterisk (*). Extra asterisks are unnecessary in JSDoc comments and are often introduced by mistake.

Double asterisks (**) are still allowed, because they mark the start of bold text.

/**
** Description
*/
code-block.js:2:1 lint/nursery/useSingleJsDocAsterisk  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

JSDoc comment line should start with a single asterisk.

1 │ /**
> 2 │ ** Description
^^^^^^^^^^^^^^
3 │ */
4 │

In JSDoc comments, extra asterisks beyond the first are unnecessary and are often added by mistake.

Unsafe fix: Remove additional asterisks.

2 │ **·Description
-
/**
* Description
* */
code-block.js:3:1 lint/nursery/useSingleJsDocAsterisk  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

JSDoc comment line should end with a single asterisk.

1 │ /**
2 │ * Description
> 3 │ * */
^^^^
4 │

In JSDoc comments, extra asterisks beyond the first are unnecessary and are often added by mistake.

Unsafe fix: Remove additional asterisks.

3 │ *·*/
--
/** @ts-ignore **/
code-block.js:1:1 lint/nursery/useSingleJsDocAsterisk  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

JSDoc comment line should end with a single asterisk.

> 1 │ /** @ts-ignore **/
^^^^^^^^^^^^^^^^^^
2 │

In JSDoc comments, extra asterisks beyond the first are unnecessary and are often added by mistake.

Unsafe fix: Remove additional asterisks.

1 │ /**·@ts-ignore·**/
-
/**
* Description
* @public
*/
/** @ts-ignore */
/**
* **Bold** text
*/
biome.json
{
"linter": {
"rules": {
"nursery": {
"useSingleJsDocAsterisk": "error"
}
}
}
}