Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: v6 typeMatchesSpecifier LibSpecifier should return true for intrinsic types (string, number, boolean, etc) #6867

Closed
4 tasks done
RebeccaStevens opened this issue Apr 8, 2023 · 0 comments
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working
Milestone

Comments

@RebeccaStevens
Copy link
Contributor

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: "lib",
    name: "string",
  },
  parserServices.program)

ESLint Config

No response

tsconfig

No response

Expected Result

Native types should be considered part of "lib"

Actual Result

Native types aren't match my any of the object specifiers.

Additional Info

This works:

typeMatchesSpecifier(
  type,
  "string",
  parserServices.program)

So maybe this change isn't needed.
Though I'd expect every type to able to be specified with one of the object specifiers.

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
@RebeccaStevens RebeccaStevens added bug Something isn't working triage Waiting for maintainers to take a look labels Apr 8, 2023
@RebeccaStevens RebeccaStevens changed the title Bug: v6 typeMatchesSpecifier LibSpecifier should return true for native types (string, number, boolean, etc) Bug: v6 typeMatchesSpecifier LibSpecifier should return true for intrinsic types (string, number, boolean, etc) Apr 8, 2023
@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for maintainers to take a look labels Apr 16, 2023
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0 milestone Jul 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants