Implement flow support for unsaved docs as per #84#88
Conversation
- `isWatching` got deprecated in favor of `isBackground`. - latest vscode does not recognizes version `0.3.2`.
- Adds status indicator inspired by one in vscode-jest, that is shown spinner when flow is type busy. - Adds `flow.showStatus` setting so that status indicator can be disabled if not desired.
- Add `playground/.flowconfig` blank file to workaround flow’s requirement to have `.flowconfig` file (see facebook/flow#389) - Add `playground/try.js` blank file that will be used as file parameter when running `flow check-contents` so that `playground` will be treated as project root & defaults will be used for flow configuration. - Made changes to flowDiagnostics module so that untitled js documents with @flow pragma are type checked with flow similar to how flowptype.org/try does it.
| export function hasFlowPragma(content:string) { | ||
| const hasPragma = | ||
| content.startsWith('/* @flow */') || | ||
| content.startsWith('// @flow\n') || |
|
Yeah, this all looks 👍 to me - I'm currently on my honeymoon, so don't really have time to set it up and test all these changes locally. Can anyone watching the repo give this PR a whirl, mainly to confirm everything feels good? @Gozala any chance you can add some quick notes in the CHANGELOG for your last 2 PRs and this? Thanks - these have been some great contributions |
That's too many reviews for the honeymoon :)
Sure I'll make a separate pull request for that.
Happy to help, especially since it directly impacts my productivity 😉 |
|
Hah, yeah, but my wife likes to sleep a lot - so I get some time to keep juggling all the OSS balls. |

Implement flow support for unsaved docs as per #84
playground/.flowconfigblank file to workaround flow’s requirement to have.flowconfigfile (see Use defaults when no .flowconfig present facebook/flow#389)playground/try.jsblank file that will be used as file parameter when runningflow check-contentsso thatplaygroundwill be treated as project root & defaults will be used for flow configuration.@flowpragma are type checked with flow similar to how flowptype.org/try does it.P.S.: This pull is based off #87 so relevant changes are starting from c5aa338