Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: [no-unused-vars] Type-only imports reported as unused despite being referenced by JSDocs #11208

Closed as duplicate of#8902
Labels
bugSomething isn't workingduplicateThis issue or pull request already existslocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-plugin
@Andarist

Description

@Andarist

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

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

conststuff={foo:''}/** This accepts something like {@link stuff} */exportfunctionacceptStuff(a:{foo:string}){returna}

ESLint Config

{"extends":["plugin:@typescript-eslint/recommended"]}

tsconfig

{"compilerOptions": {"strictNullChecks":true  }}

Expected Result

I'd expect herestuff to be counted as used

Actual Result

An error is reported:

'stuff' is assigned a value but never used. 1:7 - 1:12

Additional Info

I'd like to make thosecross-file@links 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 andimport type { fromObservable } from "./actors/observable" etc would work here. But I get a lint error when using that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existslocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp