From c102450af3eaf8489fd054b6130d92daab0acc98 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Tue, 31 Oct 2017 20:50:14 +0100 Subject: [PATCH] no-redundant-jsdoc: handle class tag (#3414) --- src/rules/noRedundantJsdocRule.ts | 1 + test/rules/no-redundant-jsdoc/test.ts.lint | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/rules/noRedundantJsdocRule.ts b/src/rules/noRedundantJsdocRule.ts index f80f1ce4494..9ecde8ef1e2 100644 --- a/src/rules/noRedundantJsdocRule.ts +++ b/src/rules/noRedundantJsdocRule.ts @@ -75,6 +75,7 @@ function walk(ctx: Lint.WalkContext): void { // OK break; + case ts.SyntaxKind.JSDocClassTag: case ts.SyntaxKind.JSDocTemplateTag: case ts.SyntaxKind.JSDocTypeTag: case ts.SyntaxKind.JSDocTypedefTag: diff --git a/test/rules/no-redundant-jsdoc/test.ts.lint b/test/rules/no-redundant-jsdoc/test.ts.lint index c5669b39332..f386a149240 100644 --- a/test/rules/no-redundant-jsdoc/test.ts.lint +++ b/test/rules/no-redundant-jsdoc/test.ts.lint @@ -10,6 +10,8 @@ function f() {} const x = 0; /** + * @class + ~~~~~ [tag % ('class')] * @param {number} x Is a number ~~~~~~~~ [type] * @param y