Skip to content

import type {X} and import {type X} are treated the same (they should not be) #445

@nemosmithasf

Description

@nemosmithasf

With skipTypeImports :true, the statement import {type X}... will be skipped. This is incorrect behaviour, because unlike import type { X }, the former will still import the file and load any side-effect which may exist.

In other words, when the statement is import {type X}, Madge must follow the path- which it currently does not.

Workaround: You can use no-import-type-side-effects in ESLint for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions