-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Flowtype comments markers #661
Comments
I just ran up against this, but didn't know that Flowtype ignores whitespace before markers. Thanks for pointing out how to work around it! It looks like gajus/eslint-plugin-flowtype#87 might be the place to add support for the syntax without whitespace. |
I think it's probably fine to add an exception for Can you provide a link to the Flow documentation where this comment marker is discussed? |
Comment Syntax section in the docs points to the following blog post. |
This will be part of standard v9. Since it's relaxing a rule, there is no impact on the ecosystem. Except of course, now you can use Flow Comments! 🎉 |
Flowtype supports annotating code with comments (only block comments
/* ... */
). It uses three different markers (:
,::
,flow-include
), none of them is currently recognized by standard. Flowtype ignores whitespaces before markers, so standard doesn't brake anything, but placing spaces before these markers is inconsistent - they are not required before other markers like*
and!
. My proposition is to add:
and::
to list of markers for block comments. I'm not sure ifflow-include
should be also added, it is just an alias for::
, and markers like this looks kind of strange without whitespace:On other hand space before
:
marker could actually improve readability:The text was updated successfully, but these errors were encountered: