Skip to content

Bug: v6 typeMatchesSpecifier PackageSpecifier should match custom type roots #6868

@RebeccaStevens

Description

@RebeccaStevens

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

utils

Playground Link

No response

Repro Code

typeMatchesSpecifier(
  type,
  {
    from: "package",
    package: "foo"
    name: "Foo",
  },
  parserServices.program)

ESLint Config

No response

tsconfig

{
  "compilerOptions": {
    "typeRoots": ["./typings"],
    "baseUrl": "./",
    "paths": {
      "*": ["typings/*"]
    }
  }
}

Expected Result

Type declarations in typings should be treated as external.

Actual Result

Type declarations in typings are treated as local files.

Additional Info

No response

Versions

package version
@typescript-eslint/eslint-plugin 6.0.0-alpha.121
@typescript-eslint/parser 6.0.0-alpha.121
@typescript-eslint/scope-manager 6.0.0-alpha.121
@typescript-eslint/typescript-estree 6.0.0-alpha.121
@typescript-eslint/type-utils 6.0.0-alpha.121
@typescript-eslint/utils 6.0.0-alpha.121
TypeScript 5.0.3
ESLint 8.36.0
node 18.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions