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

Invalid files caused by flow type annotations? #353

Closed
jrnail23 opened this issue May 24, 2019 · 8 comments · Fixed by #373
Closed

Invalid files caused by flow type annotations? #353

jrnail23 opened this issue May 24, 2019 · 8 comments · Fixed by #373
Labels

Comments

@jrnail23
Copy link
Contributor

How do I get depcheck to properly handle files with flow type annotations in them?

@rumpl rumpl added the feature label May 27, 2019
@rumpl
Copy link
Member

rumpl commented May 27, 2019

Thanks for reporting this @jrnail23, indeed depcheck doesn't know how to parse flow annotations, we could just add the plugin for babel and make it work, will try to do something for this soon.

@jrnail23
Copy link
Contributor Author

jrnail23 commented Jul 9, 2019

@rumpl, FYI, I tried your suggestion by copying the existing jsx parser and adding flow and flowComments, and it seems to have worked for me. I can create a PR for that if you like (I assume you'd want it in both the jsx and the es7 parsers, right?).

@rumpl
Copy link
Member

rumpl commented Jul 9, 2019

Great! Sure go ahead, I would gladly merge this :)

Thanks!

@jrnail23
Copy link
Contributor Author

jrnail23 commented Jul 9, 2019

@rumpl, the PR is up, ready for your review :-)

@rumpl rumpl closed this as completed in #373 Jul 9, 2019
@rumpl
Copy link
Member

rumpl commented Jul 9, 2019

Aaand merged! :)

Do you want me to publish a new release?

@jrnail23
Copy link
Contributor Author

jrnail23 commented Jul 9, 2019

@rumpl, yes please! sorry, I didn't see this reply before mentioning the new version in my PR comments.
:-D

@rumpl
Copy link
Member

rumpl commented Jul 9, 2019

I just pushed the 0.8.3 tag, it will be up on npm as soon as the tests pass

Cheers

@jrnail23
Copy link
Contributor Author

jrnail23 commented Jul 9, 2019

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants