-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eslint-plugin-tsdoc
: Rule to mark types referenced through {@link}
and {@inheritDoc}
as used
#348
Comments
For what it's worth, I'm also constantly tripping across this issue. @octogonz can we have your blessing for @kraenhansen to submit a PR? |
Sure, sounds good to me. 🙂 I am on vacation this week but will have more time to investigate this next week. |
Just to clarify, the PR would probably be for the |
I'm on vacation these days too and probably won't be looking into this for the next two weeks.
I'm not deeply familiar with the architecture of this project, but when I did similar work for the jsdoc plugin, it was valuable to implement this as a rule as it was responsible for parsing docs comments. It also seemed to make it easier for end-users to enable / disable and configure. |
@kraenhansen any progress on this issue? |
@cowwoc some .. I spent a bit of time on this today. I think I initially got stuck understanding where the fix actually belonged.
Reading this thread on the I did a POC of an implementation here: #423 and I've later realized the architecture I choose needs to be revisited. I'll need to add a dependency on |
When writing tsdoc strings, it's powerful to be able to reference types from an inline link tag.
It would however be great if the eslint plugin would mark these as used and avoid the @typescript-eslint/no-unused-vars rule reporting types that are only referenced from tsdoc comments as unused.
As an example, the following code
yields
and I would love for that first line to go away.
This is already supported for plain (non inline tags) by the jsdoc plugin, through the use of the eslint SourceCode#markVariableAsUsed API, but it doesn't yet support inline tags and it would be great to have this supported in the
eslint-plugin-tsdoc
directly.I'd be interested in submitting a PR for this, if this is interesting for the maintainers.
The text was updated successfully, but these errors were encountered: