Bug: [no-unused-vars] Type-only imports reported as unused despite being referenced by JSDocs #11208
Closed
4 tasks done
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.1.3&fileType=.tsx&code=MYewdgzgLgBNCuAzRMC8MDeAoGNEhAC4YByErAXyywHoAqOmAFQAsBLCGAQ2GAFMADlE4QQAWz5R2YAOYwANmwDWfTAAFFYJXChJEFGHRpY%2BADwEgATrETwwwKG3DdegqAGVdyABRdiGPAJiaEs2WRgKAEpMHBhLSXhLMG5KIA&eslintrc=N4KABGBECmAeAu0B2ATAzpAXGA2pADgDYCuA5gJZKYAC8AnvtGgMYBO5%2B8AtE4ZfAHpW0ZgHsAtuOQpoKSAF0wIAL5A&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
I'd expect here
stuff
to be counted as usedActual Result
An error is reported:
Additional Info
I'd like to make those cross-file
@link
s to work without having to suppress the lint rule:https://github.com/statelyai/xstate/blob/42bfd0a30d74e1c5820728220a00db692023f1f8/packages/core/src/createActor.ts#L815-L821
I want to avoid introducing runtime imports and
import type { fromObservable } from "./actors/observable"
etc would work here. But I get a lint error when using that.The text was updated successfully, but these errors were encountered: