Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFlowtype comments markers #661
Comments
This comment has been minimized.
This comment has been minimized.
|
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. |
This comment has been minimized.
This comment has been minimized.
|
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? |
feross
added
the
enhancement
label
Dec 18, 2016
This comment has been minimized.
This comment has been minimized.
|
Comment Syntax section in the docs points to the following blog post. |
feross
added this to the
standard v9 milestone
Feb 9, 2017
feross
added a commit
to standard/eslint-config-standard
that referenced
this issue
Feb 9, 2017
This comment has been minimized.
This comment has been minimized.
|
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! |
qzb commentedOct 14, 2016
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-includeshould 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: