💅 Unused imports when the import is used inside JSDoc syntax #4677
Labels
A-Analyzer
Area: analyzer
L-JavaScript
Language: JavaScript and super languages
S-Feature
Status: new feature to implement
workaround
Environment information
Rule name
lint/correctness/noUnusedImports
Playground link
https://biomejs.dev/playground/?indentStyle=space&lintRules=all&files.main.js=aQBtAHAAbwByAHQAIAB7AFMAbwBtAGUAQwBsAGEAcwBzAH0AIABmAHIAbwBtACAAIgAuAC8AbwB0AGgAZQByAGYAaQBsAGUALgBqAHMAIgA7AAoACgAvACoAKgAKACAAKgAgAEAAcABhAHIAYQBtACAAewBTAG8AbQBlAEMAbABhAHMAcwB9ACAAYQAKACAAKgAvAAoAZQB4AHAAbwByAHQAIABmAHUAbgBjAHQAaQBvAG4AIAB4ACgAYQApACAAewAKACAAIAByAGUAdAB1AHIAbgAgAGEALgBiACAAKwAgADUAOwAKAH0A
Expected result
As the import is referenced in the JSDoc, it should not be flagged as an unused import.
Removing this import causes
tsc
to complain (rightfully) that it doesn't know what type this is. (tsc
checking JS files). This happens a lot when you are passing a certain type to a function, but never need to create it. You never explicitly reference the typename but access its properties.Code of Conduct
The text was updated successfully, but these errors were encountered: