【发布时间】:2017-02-20 15:09:11
【问题描述】:
我不断收到此 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>
*/
几乎下面的每一行都给了我同样的错误。
【问题讨论】:
-
您的降价包含制表符和空格的混合,并且星号不会在降价中对齐。
jsdoc-format规则强制执行的内容描述为 here, -
是的,一定有一些间距问题导致它失败。我最终只是删除了所有内容并再次输入它并通过了 linter。谢谢
标签: angularjs typescript jsdoc tslint