@typescript-eslint/no-unused-vars
Complains when import is only used in jsdoc
#9435
Closed
4 tasks done
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Repro Code
Hi there!
I have the following code:
I want my jsdoc to include a reference to the class in question, which means I have to import it:
This works, meaning the link is now properly resolved. Also, tsc understands that I'm using the import and doesn't complain. If I remove the link but keep the import, I get the following error (as expected):
So everything's fine on the tsc front. However,
no-unused-vars
doesn't realize I'm using the import in a jsdoc comment, and complains:ESLint Config
Expected Result
I would expect
no-unused-vars
to realize that I'm using the import - albeit only in a jsdoc comment - like tsc does.Actual Result
no-unused-vars
sees that I'm not using the import in the code and complains.The text was updated successfully, but these errors were encountered: