我一直收到这个tslint错误,看不出代码有什么问题。有没有人看到下面的jsdoc星号没有正确对齐的问题:
/**
* @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>
*/几乎下面的每一行都给了我同样的错误。
发布于 2017-06-03 05:05:56
从jsdoc-format规则说明:
对JSDoc注释(以/**开头的注释)强制执行以下规则:
结束
就像我从你的comment上看到的,你有间距问题。
发布于 2021-04-16 02:06:39
在我的Angular 9项目中,我能够得到lint错误
filename.ts:13:1 - asterisks in jsdoc must be aligned
从…
/**
*
*/固定
/*
*
*/不知道为什么,因为多行注释的js-doc rule说明它需要两个星号。
发布于 2020-08-11 12:18:37
尽管看起来对齐星星不是你的问题,但我只是做了这个小脚本来修复你所有的打字文件:https://github.com/Marr11317/starAligner。
希望一些人会发现它是有帮助的。
https://stackoverflow.com/questions/39988028
复制相似问题