sindresorhus/eslint-plugin-unicorn

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

已关闭

#2,726 创建于 2025年9月1日

 (1 条评论) (0 个反应) (0 位负责人)JavaScript (468 个派生)user submission
change requestgood for beginnerhelp wanted

仓库指标

星标
 (5,022 个星标)
PR 合并指标
 (平均合并 4小时 30分钟) (30 天内合并 26 个 PR)

描述

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

贡献者指南