Skip to content

Bug: Transitive import of @typescript-eslint/types from @typescript-eslint/type-utils #11382

@mrginglymus

Description

@mrginglymus

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.

Relevant Package

type-utils

Playground Link

No response

Repro Code

Error: @typescript-eslint/type-utils tried to access @typescript-eslint/types, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

Required package: @typescript-eslint/types (via "@typescript-eslint\types")

ESLint Config

module.exports = {
  parser: "@typescript-eslint/parser",
  rules: {
    "@typescript-eslint/<rule-name>": ["error", ...<options>],
  },
};

tsconfig

{
  "compilerOptions": {
    // ...
  }
}

Expected Result

No transitive imports

Actual Result

Transitive imports

Additional Info

No response

Versions

Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.triageWaiting for team members to take a look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions