🌐 AI搜索 & 代理 主页
Skip to content

Bug: [no-deprecated] import = marked as deprecated at definition #11586

@LukeAbby

Description

@LukeAbby

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=5.8.2&fileType=.tsx&code=HYQwtgpgzgDiDGEAEAxA9mpBvAvgWAChCB6AKlMKVKQAEATCGAJwnhABcI7LTjCIAHjDRN2SAJZhhopACEQTJAF5UGANxA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1oBNFjpEZAIb5E3dFETRoHaJHBgAviEVA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false

Repro Code

namespace Foo {}

/**
 * @deprecated
 */
export import Bar = Foo;

ESLint Config

{
  "rules": {
    "@typescript-eslint/no-deprecated": "error"
  }
}

tsconfig

{}

Expected Result

No error, this is the definition site at which Bar is marked deprecated.

Actual Result

Got the error "Bar is deprecated." despite this being the definition.

Additional Info

This regressed between 8.42.0 and 8.43.0. If I had to guess it broke in #11359. There did seem to be a number of good updates that caught other no-deprecated violations but the re-export isn't of a deprecated symbol so it doesn't seem like this case should be a violation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: 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