I'm using http://jshint.com/ and also want to use http://flowtype.org/. As soon as I add static typing, jshint flips out because it doesn't understand the : Object
part of function(options: Object)
.
Has anyone used jshint with Flow? I really like jshint and would prefer to continue using it along side of Flow.
See this discussion on JSHint's GitHub: https://github.com/jshint/jshint/issues/2178
Sounds like they do not plan to support static typing until there is some shared spec or standard between the static type addons such as Flow and TypeScript. However, what I've been doing is running the Flow checker in my IDE, and then running JSHint on the type stripped output. I'm using Grunt to automate this.
You can use eslint its great! You can use grunt-eslint with babel-eslint.
babel-eslint allows you to lint ALL valid Babel code with the fantastic ESLint.
And babel supports flow type annotations...
Just npm install babel-eslint and grunt-eslint in your project, and in .eslintrc file specify babel-eslint parser:
{
"parser": "babel-eslint"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With