Skip to content

Bug: [@typescript-eslint/no-deprecated] Super call of deprecated constructor is not reported #10390

Closed
@tobbexiv

Description

@tobbexiv

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.6.3&fileType=.tsx&code=MYGwhgzhAECC0G8CwAoa0D0AqL0ACAJgKYAOATkcGAC5EHRYarrAD2AdhNWQK7DWsyACgCUiAL6pJKVKEgwAQtCIAPWuwIx4yNNDadufAcLE706bLggALVjxD0KJQdWgAjHq4KsiMdq1dGZnMIHhIiE2DpaVkOLmgASwMwdmAieABeaHYiAHc4UQBuWINE5NSiJSyc-IUioA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1oBNFjpEZAIb5E3dFETRoHaJHBgAviEVA&tsconfig=&tokens=false

Repro Code

class A {
  /** @deprecated */
  constructor() {}
}

class B extends A {
  constructor() {
    /** should report but does not */
    super()
  }
}

const instanceA = new A();
const instanceB = new B();

ESLint Config

module.exports = {
  parser: "@typescript-eslint/parser",
  rules: {
    "@typescript-eslint/no-deprecated": "error"
  }
};

tsconfig

{}

Expected Result

The super call in class B is being reported by @typescript-eslint/no-deprecated.

Actual Result

The super call is not reported and therefore usage of the deprecated constructor is not found.

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

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