src/content/docs/linter/rules/use-single-js-doc-asterisk.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JavaScript (and super languages)" icon="seti:javascript"> ## Summary - Rule available since: `v2.0.0` - Diagnostic Category: [`lint/correctness/useSingleJsDocAsterisk`](/reference/diagnostics#diagnostic-category) - This rule isn't recommended, so you need to enable it. - This rule has an [**unsafe**](/linter/#unsafe-fixes) fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: - Same as [`jsdoc/no-multi-asterisks`](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-multi-asterisks.md){
"linter": {
"rules": {
"correctness": {
"useSingleJsDocAsterisk": "error"
}
}
}
}
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
*/
/**
* Description
* */
/** @ts-ignore **/
/**
* Description
* @public
*/
/** @ts-ignore */
/**
* **Bold** text
*/