From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/tslint/lib/rules/noRedundantJsdocRule.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'node_modules/tslint/lib/rules/noRedundantJsdocRule.js') 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)); } -- cgit v1.2.3