Closed crystalfp closed 2 years ago
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
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
Solved.
You need to add "@param": true, "@returns": true
to the "supportForTags"
section of the configuration file tsdoc.json
.
Anyway, this sounds like a bug to me. The tsdoc file should supplement the standard behavior, not interfere.
Thanks!
I have installed TypeDoc and its plugin
typedoc-plugin-not-exported
that adds a new tag@notExported
. Running ESlint witheslint-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 theeslint-plugin-tsdoc
ignore this or generally a set of tags? Thanks! mario