A better linter plugin for Facebook's Flow JS typechecker. It works on the fly.
linter
package is installed and enabled for Atom.flow init
command to do so)apm
cli./* @flow */
to any JS file to enable on-the-fly flow linting when you code!Please see the official flow website for details on how to install flow. My recommendation is to clone down the repo and build it yourself for the best ES6 support possible.
linter-flow-plus is made to be a simple package that does one thing well.
Please Note: IDE-flow and Nuclide provide other features such as autocomplete, type definitions on hover etc. Please continue to use those services for those features. (possibly in addition to linter-flow-plus)
linter-flow-plus has on-the-fly linting using flow types. It also provides clean errors with traces. (Only Nuclide's trace support is based on the same code, and no other implementation exists currently)
This linter currently does not support Hack. Though the linter just uses the flow-cli and hack support should be trivial to add, I'm not a Hack/PHP developer and I can't test that it actually works. I would welcome if someone was to add support for Hack to this package and test it.
This linter only works within files with the /* @flow */
comment. Linter errors from other files are currently ignored and settings to lint all files without the comment are currently ignored. I would love some feedback to fix this issue.
If you open a project without .flowconfig
file with this linter enabled, you will get a dumb error on line 1, saying Error Linting
.
This project started off as I was frustrated with IDE-flow and Nuclide. I hunted around in the flow-cli, made a PR to add documentation about it to their website, and create a few issues on Nuclide, and eventually, after seeing how straightforward writing a linter was, creating this linter over the night.
Since then, I depend on this linter on a daily basis for all my Javascript development, and so I maintain this project. There are a few rough edges and I would love some help to fix them.
So please, make contributions and create github issues. In the issues, please complain about problems and missing features.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.