aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tslint/lib/rules/noRedundantJsdocRule.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/tslint/lib/rules/noRedundantJsdocRule.js
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/tslint/lib/rules/noRedundantJsdocRule.js')
-rw-r--r--node_modules/tslint/lib/rules/noRedundantJsdocRule.js9
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));
}