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: possible regression of TypeOrValueSpecifier for scoped packages with restrict-template-expressions #10038

Open
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
@simon-v-swyftx

Description

@simon-v-swyftx

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 havesearched for related issues and found none that matched my issue.
  • I haveread the FAQ and my problem is not listed.

Issue Description

I was using the newallow option forrestrict-template-expressions thatlanded in8.6.0

I expected that:

// packages/flat-config-typed-tsconfig/src/index.tsimport{Uuid}from'@company/core'exportclassService{publiccreatePosition(id:Uuid,):void{// Invalid type "Uuid" of template literal expressionconsta=`someUrl/${id}`;//  ^ specifically not working when specifying package: @company/core}}

doesnot report@typescript-eslint/restrict-template-expressions with the following config:

"@typescript-eslint/restrict-template-expressions":["error",{allow:[// doesn't appear to be working{from:"package",name:"Uuid",package:"@company/core",},],},],

The uuid file in question exports a class with a custom.toString so I don't want it to error 🙂 See reproduction repo

Feels related to this old fix:#6780 but I might be barking up the wrong tree

Reproduction Repository Link

https://github.com/simon-v-swyftx/typescript-eslint-reproducable

Repro Steps

  1. clone the repo
  2. yarn install
  3. viewpackages/flat-config-typed-tsconfig/src/index.ts
  4. observe erroron line 8

Versions

packageversion
@typescript-eslint/eslint-plugin8.6.0
@typescript-eslint/parser8.6.0
@typescript-eslint/scope-manager8.6.0
@typescript-eslint/typescript-estree8.6.0
@typescript-eslint/type-utils8.6.0
@typescript-eslint/utils8.6.0
TypeScript5.6.2
ESLint9.11.0
node20.10.0

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp