Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

@author tag not allowed at all by no-redundant-jsdoc #4849

Closed
petersandor opened this issue Sep 6, 2019 · 1 comment · Fixed by #4854
Closed

@author tag not allowed at all by no-redundant-jsdoc #4849

petersandor opened this issue Sep 6, 2019 · 1 comment · Fixed by #4854

Comments

@petersandor
Copy link
Contributor

Bug Report

  • TSLint version: 5.13.1
  • TypeScript version: 3.6.2
  • Running TSLint via: VSCode

Reproduction using TSLint Playground

  • cannot be reproduced at TSLint Playground since it uses older TS version which doesn't support JSDocAuthorTag

TypeScript code being linted

/**
 * @author John Doe <j.doe@example.com>
 */
class TestClass {

}

with tslint.json configuration:

"rules": {
  "no-redundant-jsdoc": true
}

Actual behavior

Error thrown:

The 'no-redundant-jsdoc' rule threw an error in 'x.ts':
Error: Unexpected tag kind: JSDocAuthorTag
    at checkTag (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:105:23)
    at cb (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:62:25)
    at Array.forEach (<anonymous>)
    at walk (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:55:34)
    at Rule.AbstractRule.applyWithFunction (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/language/rule/abstractRule.js:39:9)
    at Rule.apply (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/rules/noRedundantJsdocRule.js:35:21)
    at Linter.applyRule (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/linter.js:214:29)
    at /Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/linter.js:155:85
    at Object.flatMap (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/utils.js:160:29)
    at Linter.getAllFailures (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/linter.js:155:32)
    at Linter.lint (/Users/xxxxxx/Projects/test/angular/node_modules/tslint/lib/linter.js:110:33)
    at TsLintRunner.doRun (/Users/xxxxxx/.vscode/extensions/ms-vscode.vscode-typescript-tslint-plugin-1.2.2/node_modules/typescript-tslint-plugin/out/runner/index.js:224:20)
    at TsLintRunner.runTsLint (/Users/xxxxxx/.vscode/extensions/ms-vscode.vscode-typescript-tslint-plugin-1.2.2/node_modules/typescript-tslint-plugin/out/runner/index.js:80:21)
    at TSLintPlugin.getSemanticDiagnostics (/Users/xxxxxx/.vscode/extensions/ms-vscode.vscode-typescript-tslint-plugin-1.2.2/node_modules/typescript-tslint-plugin/out/plugin.js:108:38)
    at Proxy.intercept.getSemanticDiagnostics.args (/Users/xxxxxx/.vscode/extensions/ms-vscode.vscode-typescript-tslint-plugin-1.2.2/node_modules/typescript-tslint-plugin/out/plugin.js:73:25)
    at IOSession.Session.semanticCheck (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:134027:52)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:134068:31
    at MultistepOperation.executeAction (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:133247:25)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:133228:100
    at IOSession.Session.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:135169:28)
    at Object.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:133836:87)
    at Immediate._onImmediate (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:133228:41)
    at runCallback (timers.js:694:18)
    at tryOnImmediate (timers.js:665:5)
    at processImmediate (timers.js:647:5)tslint(1)

Expected behavior

No error should be thrown. JSDocAuthorTag support was added just recently in TypeScript in microsoft/TypeScript#29717, it should be recognized by TSLint

@JoshuaKGoldberg
Copy link
Contributor

🤖 Beep boop! 👉 TSLint is deprecated 👈 and you should switch to typescript-eslint! 🤖

🔒 This issue is being locked to prevent further unnecessary discussions. Thank you! 👋

@palantir palantir locked and limited conversation to collaborators Sep 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants