You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ESlint plugin: The TSDoc tag "@notExported" is not recognized #298
I have installed TypeDoc and its plugin typedoc-plugin-not-exported that adds a new tag @notExported.
Running ESlint with eslint-plugin-tsdoc rightly complains that @notExported tag is not defined: tsdoc-undefined-tag: The TSDoc tag "@notExported" is not defined in this configuration (tsdoc/syntax)
Is there any mechanism to make the eslint-plugin-tsdoc ignore this or generally a set of tags?
Thanks!
mario
You should add tsdoc.json file to the directory that contains tsconfig.json file.
Inside tsdoc.json file you should add the following json document with corresponding tag name @notExported:
Yes, this solved the problem of not recognized tags, but now eslint-plugin-tsdoc complains that tsdoc-unsupported-tag: The TSDoc tag "@param" is not supported by this tool (tsdoc/syntax) at ... idem for tsdoc-unsupported-tag: The TSDoc tag "@returns" is not supported by this tool (tsdoc/syntax). But if I add @returns to tsdoc.json it complains that the tag is already defined.
The only difference in eslint.yaml is the absence of the sourceType: "module" option because this is a legacy project.
So really don't know how to use effectively this plugin.
Thanks for looking!
mario
Activity
AlexRogalskiy commentedon Nov 15, 2021
You should add tsdoc.json file to the directory that contains tsconfig.json file.
Inside tsdoc.json file you should add the following json document with corresponding tag name @notExported:
{ "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", "tagDefinitions": [ { "tagName": "@author", "syntaxKind": "block" }, { "tagName": "@description", "syntaxKind": "block" }, { "tagName": "@implements", "syntaxKind": "modifier" } ], "supportForTags": { "@author": true, "@description": true, "@implements": true } }more information can be found at
https://api-extractor.com/pages/configs/tsdoc_json/
crystalfp commentedon Nov 18, 2021
Yes, this solved the problem of not recognized tags, but now
eslint-plugin-tsdoccomplains thattsdoc-unsupported-tag: The TSDoc tag "@param" is not supported by this tool (tsdoc/syntax) at ...idem fortsdoc-unsupported-tag: The TSDoc tag "@returns" is not supported by this tool (tsdoc/syntax). But if I add@returnstotsdoc.jsonit complains that the tag is already defined.The only difference in
eslint.yamlis the absence of thesourceType: "module"option because this is a legacy project.So really don't know how to use effectively this plugin.
Thanks for looking!
mario
crystalfp commentedon Nov 18, 2021
Solved.
You need to add
"@param": true, "@returns": trueto the"supportForTags"section of the configuration filetsdoc.json.Anyway, this sounds like a bug to me. The tsdoc file should supplement the standard behavior, not interfere.
Thanks!