question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support for flow comment syntax

See original GitHub issue

What 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ilyavolodincommented, Jan 1, 2017

@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.

2reactions
platinumazurecommented, Dec 29, 2016

I’m not sure we even need to do anything here. @tnguyen14 Have you tried using the "markers" option in the spaced-comment rule? If you simply specify ":" as a marker, then the rule shouldn’t trigger for Flow comments.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found