Search code examples
javascriptangulartypescriptjsdoctslint

@property of an object, tslint gives error - no-redundant-jsdoc


I am using tslint for my typescript code. I want to document a property of an interface. tsLint gives an error JSDoc tag '@property' is redundant in TypeScript code. (no-redundant-jsdoc)tslint(1)

The following is my comment

/**
 * @property value - number with a unit as string
 */

Disabling the tslint for next line also does not work.

jsDoc @property and tslint disable does not work


Solution

  • This is the fix for no-redundant-jsdoc issue in tslint that worked for me (basically I disabled lint from throwing that error/issue):

    1. Open tslint.json file in your project root.

    2. Replace the line "no-redundant-jsdoc": true with "no-redundant-jsdoc": false

    Go back and check the errors/files in question. That should be fixed now.