support for flow comment syntax
See original GitHub issueWhat version are you using? v2.10.2
What did you do? Flow supports the comment syntax, such as
/*: variable type */
What happened?
However, writing it as such will cause an error with the spaced-comment
rule
Expected space or tab after '/*' in comment. (spaced-comment)
What did you expect to happen?
Should eslint be able to detect the file using flow (with the header /* @flow */
and relax this error?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (8 by maintainers)
Top Results From Across the Web
Comment Syntax - Flow: A Static Type Checker for JavaScript
There are 3 special comments that Flow currently supports. You may recognize this syntax from Jarno Rantanen's excellent project, flotate.
Read more >Support for single-line flotate comment syntax? · Issue #358 ... - GitHub
Hi, I was excited to read that flotate syntax is now supported by Flow. However I'm unable to get one of flotate's examples...
Read more >Comments | Apex Developer Guide
Both single and multiline comments are supported in Apex code. ... Comments · Assignment Statements · Rules of Conversion · Control Flow Statements....
Read more >Syntax - Flow
Flow also supports a comment-based syntax, which makes it possible to use Flow without requiring any compilation. See Comment Syntax for more information ......
Read more >Flow | IntelliJ IDEA Documentation - JetBrains
IntelliJ IDEA recognizes Flow structures and provides syntax ... and supply every file to be checked with a // @flow comment on top....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tnguyen14 You problem is basically using off-the-shelf eslint wrapper. Those wrappers are specifically made to be easy to use, but provide no ability to customize configuration. You have two choices, either you can request a change to
spaced-comments
rule configuration from the happiness team, or you can stop using the wrapper and use their shareable eslint config and eslint itself without the wrapper.In both cases this is not an issue with ESLint itself, but with the wrapper application. So closing this issue, since there’s nothing we can do about this, and @platinumazure already provided a correct workaround.
I’m not sure we even need to do anything here. @tnguyen14 Have you tried using the
"markers"
option in thespaced-comment
rule? If you simply specify":"
as a marker, then the rule shouldn’t trigger for Flow comments.