Reputation: 9829
In cases where I'm using flow.. https://flowtype.org/
// @flow
var foo = (str: string) => {
return str;
};
and Eslint together,
Eslint reports unexpected token on str: string
.
Is there a way to make Eslint ignore (or recognize) flow types and not report them as errors?
Upvotes: 8
Views: 5314
Reputation: 4178
As Hamlet mentioned there is eslint-plugin-flowtype which will do a couple of things:
Here are the Installation Instructions and Configuration docs.
Upvotes: 8