import-js/eslint-plugin-import

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

Open

#2.007 geöffnet am 14. März 2021

Auf GitHub ansehen
 (2 Kommentare) (2 Reaktionen) (0 zugewiesene Personen)JavaScript (1.540 Forks)batch import
bughelp wantedtypescript

Repository-Metriken

Stars
 (4.946 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 138T 22h) (3 gemergte PRs in 30 T)

Beschreibung

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'

Contributor Guide