首页 > 解决方案 > 对象的@property,tslint 给出错误 - no-redundant-jsdoc

问题描述

我正在为我的打字稿代码使用 tslint。我想记录接口的属性。tsLint 给出错误JSDoc tag '@property' is redundant in TypeScript code. (no-redundant-jsdoc)tslint(1)

以下是我的评论

/**
 * @property value - number with a unit as string
 */

为下一行禁用 tslint 也不起作用。

jsDoc @property 和 tslint 禁用不起作用

标签: javascriptangulartypescriptjsdoctslint

解决方案


这是对我有用的tslintno-redundant-jsdoc问题的修复(基本上我禁用了 lint 抛出该错误/问题):

  1. 在项目根目录中打开tslint.json文件。

  2. 将行替换"no-redundant-jsdoc": true"no-redundant-jsdoc": false

返回并检查有问题的错误/文件。现在应该解决了。


推荐阅读