Skip to content

Bug: [rule name here] <short description of the issue> #5650

Closed as not planned
@gerardolima

Description

@gerardolima

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 have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Playground Link

https://typescript-eslint.io/play/#ts=4.8.3&sourceType=module&code=C4TwDgpgBACg9sAhsOUC8UDOwBOBLAOwHMAoEgegCpKoSoaAVACz0ylakQPYIDM4cAW2R4AbtABSAZQAicAMZR5cQYIgFgAGigB3PMCacoOCLwgmC86CigBvAAIAbQgGtYCZHAC+2xLXpQoJCBTMjsbIjywACuiI6OIFAECFDRmBAAJlAARokM4BBS8vhgwEpwGRAAdHSU5CQQAB5gAmXKBNhQ-KgYABQAlABcWLiEROgAfFAA5NmIONMkQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQHYHsBaWXWZRAE0IDcBDaVDSfAMxcgBpxtIABAFwCeABxQBjaAEth-QiniTc-APQFipclToN0YANqRE0aPmiQAutwC+IK0A&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA

Repro Code

type Potato = string

/** 
 * This is an informative JSDoc comment, with a reference to {@link Potato}, a 
 * type that is actually not used by TypeScript code.
 */
export const foo = (): string => 'bar'

ESLint Config

module.exports = {
  "rules": {
    "no-unused-vars": "off",
    "@typescript-eslint/no-unused-vars": ["error"]
  }
}

tsconfig

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

Expected Result

The type Potato is used in JSDoc. I wouldn't expect eslint rules to consider it "unused".

Actual Result

'Potato' is defined but never used. 1:6 - 1:12

Additional Info

No response

Versions

package version
@typescript-eslint/eslint-plugin 5.37.0
@typescript-eslint/parser 5.37.0
TypeScript 4.8.3
ESLint 8.15.0
node web

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginworking as intendedIssues that are closed as they are working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy