lukehoban / atom-ide-flow

Atom IDE support for Flow
MIT License
87 stars 17 forks source link

First try at figuring out how to check live #38

Closed nmn closed 8 years ago

nmn commented 9 years ago

I updated the flow check command so that it will pass the current text to flow and get errors while typing instead of waiting for you to save. This will be a big productivity improvement, and will help with linter integration that is currently pending.

That said, I've never hacked on an Atom Package before, and I'm not terribly comfortable with coffeescript, so don't treat this PR as anything more than pseudo code.

I have however checked that the following flow command works in the command-line:

cat someFile.js | flow check-contents someFile.js cat someFile.js | flow check-contents --json someFile.js

nmn commented 9 years ago

I've made a separate linter plugin for flow types: https://github.com/nmn/linter-flow-plus

The good part about this plug-in is that it lints as you type and not when you save. Also it is integrated with linter, so the UI is completely customizable.

The following are some ideas that I like:

I also think it's a good idea to split the functionality of ide-flow into smaller packages that do one thing and do that one thing well:

These could all be separate packages.