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

After adding babel-plugin-import, prettier cannot parse "type modifiers on import(TS4.5 feature)". #600

Open
mori5321 opened this issue Feb 14, 2022 · 0 comments

Comments

@mori5321
Copy link

mori5321 commented Feb 14, 2022

After I installed babel-plugin-import into my project, prettier(on pre-commit hook) starts to raise an parse error about type modifiers on import, which was implemented in TypeScript 4.5 & babel 7.16.0(babel/babel#13802).

The Error Logs

✖ prettier --write:
[error] packages/components/src/XXX.tsx: SyntaxError: ',' expected. (20:8)
[error]   19 | import {
[error] > 20 |   type XXXXType,

Does anyone have some clue to fix this?

@mori5321 mori5321 changed the title After adding babel-plugin-import, prettier cannot parse type-only import. After adding babel-plugin-import, prettier cannot parse "type modifiers on import(TS4.5 feature)". Feb 14, 2022
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