Closed planttheidea closed 8 years ago
I don't believe this can be related to the plugin (but might be a bug in babel's parser). babel-eslint
doesn't run any plugins because it doesn't do any transformations. It only runs the parser.
Here's the corresponding Babel issue (not fixed at the time of writing):
For the time being you can work around this issue by wrapping the return type in a comment.
Preface this by saying I am using babel (duh) with babel-eslint, and what I'm receiving is a linting error, however it appears to be specifically because of the flow types.
With this syntax:
I receive an "Unexpected token" error, however with this syntax:
No problem whatsoever. Pretty sure these should be interchangable, at least from the flow type perspective. I believe it is the typecheck because this is also successful:
I'm pretty sure I'm specifying the return type correctly (it works on all other declarations without the spread operator), its just specifically having issues with this spread operator.