-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/no-duplicate-imports": "error"
}
}
I've run into some false positives with this new rule when used with import type
. The following code triggers this rule:
import type Foo from "my-module";
import type { Bar } from "my-module";
But it is not actually possible to write
import type Foo, { Bar } from "my-module";
because that results in the TypeScript error
A type-only import can specify a default import or named bindings, but not both. ts(1363)
This rule may need some additional logic to handle this case.
Expected Result
No errors reported by this rule for the given code.
Actual Result
The no-duplicate-imports
rule reports a linting error.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.4.0 |
@typescript-eslint/parser |
4.4.0 |
TypeScript |
4.0.3 |
ESLint |
7.10.0 |
node |
12.18.4 |
glen-84 and yeonjuan
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomerspackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin