Skip to content

Commit

Permalink
Merge pull request #301 from microsoft/jsdoc-deprecated-support
Browse files Browse the repository at this point in the history
Adds a rough approximation of deprecated support
  • Loading branch information
Orta Therox authored and sandersn committed Nov 29, 2021
1 parent 8e61cda commit 7e59161
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/dtslint/src/rules/noRedundantJsdoc2Rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ function walk(ctx: Lint.WalkContext<void>): void {
});

function checkTag(tag: ts.JSDocTag): void {
// @ts-ignore (until support for 4.0 is added)
const JSDocDeprecatedTag = ts.SyntaxKind["JSDocDeprecatedTag"] || 0
switch (tag.kind) {
case ts.SyntaxKind.JSDocTag: {
const { tagName } = tag;
Expand All @@ -85,6 +87,8 @@ function walk(ctx: Lint.WalkContext<void>): void {
case ts.SyntaxKind.JSDocCallbackTag:
case ts.SyntaxKind.JSDocThisTag:
case ts.SyntaxKind.JSDocEnumTag:
case JSDocDeprecatedTag:

// Always redundant
ctx.addFailureAtNode(
tag.tagName,
Expand Down

0 comments on commit 7e59161

Please sign in to comment.