sindresorhus/eslint-plugin-unicorn

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

Fechada

#2.726 aberto em 1 de set. de 2025

 (1 comentário) (0 reação) (0 responsável)JavaScript (468 forks)user submission
change requestgood for beginnerhelp wanted

Métricas do repositório

Stars
 (5.022 estrelas)
Métricas de merge de PR
 (Mesclagem média 4h 30m) (26 fundiu PRs em 30d)

Description

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

Guia do colaborador