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

Enable flowComments for babel-flow #9074

Closed

Conversation

sosukesuzuki
Copy link
Member

#9062 (comment)

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker
Copy link
Member

fisker commented Aug 26, 2020

What about babel? It support flow, We'll have to deal with it too.

I hate this , in one hand we are trying to removeflow from babel, in another hand we have to add more stuff for it.

@thorn0
Copy link
Member

thorn0 commented Aug 26, 2020

What about babel? It support flow

My opinion is that it's fine to ignore Flow comments in babel. Its support for Flow isn't reliable anyway.

@fisker
Copy link
Member

fisker commented Aug 26, 2020

We already know it's broken, ignoring the problems seems not good.

How about redirect to babel-flow too, if /*:: found #9071

@thorn0
Copy link
Member

thorn0 commented Aug 26, 2020

These comments are a little-used and little-known feature of Flow. If someone goes to the trouble of using them, it shouldn't be difficult for this person to add @flow or switch parsers in Prettier.

@sosukesuzuki sosukesuzuki marked this pull request as ready for review August 27, 2020 04:50
@thorn0
Copy link
Member

thorn0 commented Aug 27, 2020

This PR misses this part from #9062 (comment): "and unify the code for flow and babel-flow".
Code like the hasFlowShorthandAnnotationComment and hasFlowAnnotationComment functions was added for Babel only because back then Babel didn't have the flowComments plugin. Hopefully it should be safe to remove them now.

@thorn0 thorn0 mentioned this pull request Nov 3, 2020
Base automatically changed from master to main January 23, 2021 17:13
@thorn0
Copy link
Member

thorn0 commented Oct 24, 2022

Superseded by #13687

@thorn0 thorn0 closed this Oct 24, 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

Successfully merging this pull request may close these issues.

None yet

3 participants