Skip to content

no-named-default: Should ignore type import #2130

Closed

Description

Sample code:

import type { default as Vue, VueConstructor } from "vue";

Getting error:
Use default import syntax to import 'Vue'

However, this code produces typescript error:

import type Vue, { VueConstructor } from "vue";

And this code triggers import/no-duplicates rule:

import type { VueConstructor } from "vue";
import type Vue from "vue";

So, either:
A) the original code should be ignored because there is no alternative for it.
or
B) import/no-duplicates should allow the last code.

See also:
#2114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions