sindresorhus/eslint-plugin-unicorn

`require-module-attributes`: Support `TSImportType`

Chiusa

#2726 aperta il 1 set 2025

 (1 commento) (0 reazioni) (0 assegnatari)JavaScript (468 fork)user submission
change requestgood for beginnerhelp wanted

Metriche repository

Star
 (5022 stelle)
Metriche merge PR
 (Merge medio 4h 30m) (26 PR mergiate in 30 g)

Descrizione

Description

It seems typescript doesn't allow

type A = import("foo", {})

But allows

type A = import("foo", {with: {}})

I didn't add support for it in #2725, if someone need it, it can reuse the same logic as ImportExpression

Examples

// ❌
type A = import("foo", {with: {}})

// ✅
type A = import("foo")

Additional Info

No response

Guida contributor