useSingleJsDocAsterisk
¥Summary
-
规则生效日期:
v2.0.0¥Rule available since:
v2.0.0 -
诊断类别:
lint/correctness/useSingleJsDocAsterisk¥Diagnostic Category:
lint/correctness/useSingleJsDocAsterisk -
此规则包含 unsafe 修复程序。
¥This rule has an unsafe fix.
-
此规则的默认严重级别为 information。
¥The default severity of this rule is information.
-
来源:
¥Sources:
-
¥Same as
jsdoc/no-multi-asterisks
-
¥How to configure
{ "linter": { "rules": { "correctness": { "useSingleJsDocAsterisk": "error" } } }}¥Description
强制 JSDoc 注释行以单个星号开头,第一个星号除外。
¥Enforce JSDoc comment lines to start with a single asterisk, except for the first one.
此规则确保 JSDoc 代码块中除第一行外的每一行都以一个星号 (*) 开头。JSDoc 注释中不需要额外的星号,而且星号通常是误加的。
¥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.
¥Examples
¥Invalid
/**** Description*/code-block.js:2:1 lint/correctness/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/correctness/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/correctness/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·**/
│ -
¥Valid
/**
* Description
* @public *//** @ts-ignore *//**
* **Bold** text */¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号