tslint error: Asterik in jsdoc must be aligned

bsc*_*tty 5 jsdoc angularjs typescript tslint

I keep getting this tslint error and don't see what's wrong with the code. Does anybody see an issues with the jsdoc asteriks below not being aligned correctly:

/**
 * @ngdoc directive
 * @module ers.components.button
 * @scope
 * @transclude
 * @data
 * @binding
 * @name ersButton
 * @restrict E
 * @constructor
 * 
 * @description
 * 
 * A button performs the defined action when the user clicks it.
 * 
 * - Buttons can only consist of text and/or an icon.
 * - Buttons must contain either a click event, an href, an ui-sref, or a type (for form actions).
 * - Buttons labels should be clear. Limit the button text (less is more).
 * 
 * ### Usage
 * 
 * - Use <b>Primary Buttons</b> for primary actions (for example, "Submit", "Login", or "Save"). 
 * Avoid having multiple primary buttons on the same screen.
 * - Use <b>Secondary Buttons</b> for secondary actions that accompany the primary call-to-action (for example, "Reset" or "Cancel").
 * - Use <b>Icon Buttons</b> only for special use cases where standard label buttons are too large to use (for example, Tool Bars).
 *   
 * ### Examples
 * 
 * #### Standard Buttons
 * 
 * Primary and secondary buttons.
 *
 * <code-editor identifier="example1" data-title="Basic Buttons" html-content-url="demos/ersButton/basic/index.html" 
 * js-content-url="demos/ersButton/basic/script.js" css-content-url="demos/ersButton/basic/styles.css" 
 * content-mode="html"></code-editor>
 */
Run Code Online (Sandbox Code Playgroud)

Just about every line below is giving me that same error.

Ben*_*cot 7

在我的 Angular 9 项目中,我遇到了 lint 错误

filename.ts:13:1 - asterisks in jsdoc must be aligned

/**
 *
 */
Run Code Online (Sandbox Code Playgroud)

固定的

/*
*
*/
Run Code Online (Sandbox Code Playgroud)

不知道为什么,因为多行注释的js-doc 规则说它需要两个星号。


mix*_*xel 4

来自jsdoc-format规则描述:

JSDoc 注释(以 /** 开头的注释)强制执行以下规则:

  • 每行包含一个星号,并且星号必须对齐
  • 每个星号后面必须跟一个空格或换行符(第一个和最后一个星号除外)
  • 每行星号之前的唯一字符必须是空白字符
  • 一行注释必须以 /** 开头并以 */ 结尾

正如我从您的评论中看到的,您遇到了间距问题。

  • 那么问题出在哪里呢? (4认同)