Skip to content

Enhancement: Detect declared modules for TypeOrValueSpecifier #6861

@marekdedic

Description

@marekdedic

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

Relevant Package

type-utils

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

The PackageSpecifier check currently checks the declaration file path for the string node_modules and the name of the package:

https://github.com/typescript-eslint/typescript-eslint/blob/v6/packages/type-utils/src/TypeOrValueSpecifier.ts#L173-L179

I propose to use TypeScript's sourceFileToPackageName map defined here.

Only problem is that it is currently marked as internal - but maybe we could get TS maintainers to open it up?

Fail

-

Pass

-

Additional Info

No response

Metadata

Metadata

Labels

enhancementNew feature or requestlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: type-utilsIssues related to the @typescript-eslint/type-utils packageteam assignedA member of the typescript-eslint team should work on this.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy