import-js/eslint-plugin-import

[no-duplicates] incorrect report on two non-combinable ts type import statements

Open

#2,007 建立於 2021年3月14日

在 GitHub 查看
 (2 留言) (2 反應) (0 負責人)JavaScript (4,946 star) (1,540 fork)batch import
bughelp wantedtypescript

描述

import type ESLint from 'eslint'
import type { Linter, SourceCode } from 'eslint'

If I merge them into one statement:

import type ESLint, { Linter, SourceCode } from 'eslint'

TS will fail to compile

packages/eslint-plugin-mdx/src/processors/options.ts:5:8 - error TS1363: A type-only import can specify a default import or named bindings, but not both.

5 import type ESLint, { Linter, SourceCode } from 'eslint'

貢獻者指南