Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug: type-utils > TypeOrValueSpecifier doesn't account for org-scoped packages #6698

Closed
Labels
accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: type-utilsIssues related to the @typescript-eslint/type-utils package
Milestone
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

ast-spec

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

From#4436 (comment): when checking whether a'package' matches inTypeOrValueSpecifier.ts, we check whether the declaration file name includesspecifier.package directly:

returndeclarationFiles.some(
declaration=>
declaration.fileName.includes(`node_modules/${specifier.package}/`)||
declaration.fileName.includes(
`node_modules/@types/${specifier.package}/`,
),
);

This is a potential issue because package names with@ in them have a__ replacing the@. And there might be other replacements I'm not remembering - haven't looked deeply into it.

https://github.com/DefinitelyTyped/DefinitelyTyped/tree/cc222f340546ff85b7c9271f4ecbd07b9d661c94/types/11ty__eleventy-img

We should handle any name substitutions in npm packages well, and add unit tests for it inTypeOrValueSpecifier.test.ts.

Fail

n/a

Pass

n/a

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: type-utilsIssues related to the @typescript-eslint/type-utils package

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp