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

SyntaxError: Unexpected token throws when using with flow #27

Closed
javaharut opened this issue Jan 21, 2021 · 1 comment · Fixed by #35
Closed

SyntaxError: Unexpected token throws when using with flow #27

javaharut opened this issue Jan 21, 2021 · 1 comment · Fixed by #35

Comments

@javaharut
Copy link

I tried to add on react project which uses flow but it shows several errors on nullable types such as

handleChange = (value: ?string) => {}

or when have such code during import

import { type Something } from './__generated__/;

@byara byara linked a pull request Mar 13, 2021 that will close this issue
@byara
Copy link
Collaborator

byara commented Mar 16, 2021

With the release of v2.0.1, this should be fixed.
Either prettier will figure out the syntax correctly, or you can use experimentalBabelParserPluginsList in your .prettierrc to pass the correct parser name (in your case flow).

If there was still problems, you can of course re-open this issue.

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

Successfully merging a pull request may close this issue.

3 participants