Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nemosmithasf opened this issue Jan 10, 2025 · 0 comments

Comments

@nemosmithasf
Copy link

nemosmithasf commented Jan 10, 2025

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

@nemosmithasf nemosmithasf changed the title import type {X} and import {type X} are treated the same (they should not) import type {X} and import {type X} are treated the same (they should not be) Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant