sindresorhus/eslint-plugin-unicorn

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

Open

#2,726 opened on 2025年9月1日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)JavaScript (5,022 stars) (468 forks)user submission
change requestgood for beginnerhelp wanted

説明

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

コントリビューターガイド

`require-module-attributes`: Support `TSImportType` · sindresorhus/eslint-plugin-unicorn#2726 | Good First Issue