diff options
Diffstat (limited to 'node_modules/tslint/lib/rules/noRedundantJsdocRule.js')
-rw-r--r-- | node_modules/tslint/lib/rules/noRedundantJsdocRule.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/node_modules/tslint/lib/rules/noRedundantJsdocRule.js b/node_modules/tslint/lib/rules/noRedundantJsdocRule.js index 398162132..3d6eaae71 100644 --- a/node_modules/tslint/lib/rules/noRedundantJsdocRule.js +++ b/node_modules/tslint/lib/rules/noRedundantJsdocRule.js @@ -76,20 +76,25 @@ function walk(ctx) { case ts.SyntaxKind.JSDocAugmentsTag: // OK break; - case ts.SyntaxKind.JSDocTemplateTag: + case ts.SyntaxKind.JSDocClassTag: case ts.SyntaxKind.JSDocTypeTag: case ts.SyntaxKind.JSDocTypedefTag: case ts.SyntaxKind.JSDocPropertyTag: // Always redundant ctx.addFailureAtNode(tag.tagName, Rule.FAILURE_STRING_REDUNDANT_TAG(tag.tagName.text)); break; + case ts.SyntaxKind.JSDocTemplateTag: + if (tag.comment === undefined || tag.comment === "") { + ctx.addFailureAtNode(tag.tagName, Rule.FAILURE_STRING_NO_COMMENT(tag.tagName.text)); + } + break; case ts.SyntaxKind.JSDocReturnTag: case ts.SyntaxKind.JSDocParameterTag: { var _a = tag, typeExpression = _a.typeExpression, comment = _a.comment; if (typeExpression !== undefined) { ctx.addFailureAtNode(typeExpression, Rule.FAILURE_STRING_REDUNDANT_TYPE); } - if (comment === "") { + if (comment === undefined || comment === "") { // Redundant if no documentation ctx.addFailureAtNode(tag.tagName, Rule.FAILURE_STRING_NO_COMMENT(tag.tagName.text)); } |