import-js/eslint-plugin-import

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

Open

#2.007 aberto em 14 de mar. de 2021

Ver no GitHub
 (2 comments) (2 reactions) (0 assignees)JavaScript (1.540 forks)batch import
bughelp wantedtypescript

Métricas do repositório

Stars
 (4.946 stars)
Métricas de merge de PR
 (Mesclagem média 138d 22h) (3 fundiu PRs em 30d)

Description

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'

Guia do colaborador