Angularjs tslint错误:jsdoc中的星号必须对齐
我一直收到这个tslint错误,不知道代码出了什么问题。是否有人发现以下jsdoc星号未正确对齐的问题:Angularjs tslint错误:jsdoc中的星号必须对齐,angularjs,typescript,jsdoc,tslint,Angularjs,Typescript,Jsdoc,Tslint,我一直收到这个tslint错误,不知道代码出了什么问题。是否有人发现以下jsdoc星号未正确对齐的问题: /** * @ngdoc directive * @module ers.components.button * @scope * @transclude * @data * @binding * @name ersButton * @restrict E * @constructor * * @description * * A button performs
/**
* @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>
*/
/**
*@ngdoc指令
*@module ers.components.button
*@范围
*@transclude
*@数据
*@装订
*@name-ersButton
*@E
*@constructor
*
*@说明
*
*当用户单击按钮时,它将执行定义的操作。
*
*-按钮只能由文本和/或图标组成。
*-按钮必须包含单击事件、href、ui sref或类型(用于表单操作)。
*-按钮标签应清晰。限制按钮文本(越少越好)。
*
*用法
*
*-使用主要按钮执行主要操作(例如,“提交”、“登录”或“保存”)。
*避免在同一屏幕上有多个主按钮。
*-使用辅助按钮执行与主操作调用相关的辅助操作(例如,“重置”或“取消”)。
*-仅在标准标签按钮太大而无法使用的特殊情况下使用图标按钮(例如,工具栏)。
*
*####示例
*
*#####标准按钮
*
*主按钮和辅助按钮。
*
*
*/
下面的每一行都给了我同样的错误。规则描述:
以下规则适用于JSDoc注释(注释开始
随附/**):
- 每行包含一个星号,星号必须对齐
- 每个星号后面必须有空格或换行符(第一个和最后一个除外)
- 每行星号前的唯一字符必须是空白字符
- 单行注释必须以/**开头,以结尾*/
正如我从你的照片中看到的,你有间距问题。尽管看起来星星对齐不是你的问题,但我只是制作了一个小脚本来修复你所有的打字脚本文件:
希望有些人会觉得它有帮助……在我的Angular 9项目中,我能够得到lint错误
filename.ts:13:1-jsdoc中的星号必须对齐
从
固定的
不确定原因,因为for multiline comments说它需要两个星号。您的标记混合了制表符和空格,并且星号在标记中没有对齐。描述了
jsdoc格式
规则所强制执行的内容,是的,一定是一些间距问题导致了它。我只是把它全部删掉,然后再打一遍,结果它通过了筛选。谢谢,有什么问题吗?
/**
*
*/
/*
*
*/