-
-
Notifications
You must be signed in to change notification settings - Fork 209
Update Babel to ^7.7.0 and enable Flow enums parsing #812
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me, though I'd like someone with more context to confirm this isn't a breaking change.
The support for parsing enums should not be breaking, since |
Hi @kaicataldo, now that the holiday season has passed, I was wondering if you'd be willing to take another look at this. |
@gkz Would you be willing to make this PR over in https://github.com/babel/babel/tree/master/eslint/babel-eslint-parser? I'm working to get |
Though, actually, this should already work in the latest version. Adding these tests could be helpful though. |
We need to add the "flow" plugin to the parser options (to be able to parse Flow code), and add the I'll take a look |
@gkz The latest version reads your Babel config at parse time, so if Babel is able to parse it, ESLint should also. |
@kaicataldo We are blocked on launching the enums feature because of lack of Eslint support. |
I realized I need to add EnumDeclarations to the scope analysis - will update the PR soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I have updated the test |
Do we also need to update the peer dependency on |
No, it would be a breaking change. If someone is using an old version of Babel, this PR is a noop but doesn't do any harm. |
Ah right, this is in v10. Got it 👍 |
Thanks for contributing! |
Thanks for merging! |
Published in |
The ability to parse Flow enums was added in Babel 7.7.0. It sits behind an option "enums" for the flow Babel plugin.
Update the Babel dependency to ^7.7.0, fix a small test issue, then enable
enums: true
.I understand that we wouldn't need to do this with the 11.x series of babel-eslint because Babel is a peer dependency in 11.x, but that's still in beta and not officially released, so that's why I'm opening up a PR for the 10.x series.