Flow a static type checker for javascript (IntelliJ IDEA).

Create project:

mkdir example-js-flow
cd example-js-flow
npm init

Setup Flow:

npm install --save-dev flow-bin 

Add a “flow” script to your package.json:

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"flow": "flow"
},

Init flow (this creates a file .flowconfig):

npm run flow init

First run:

npm run flow

Set Flow in IntelliJ IDEA settings:

Put this flag before any code in *.js files, so Flow will know what files should be checked.

// @flow
...

Links:

)
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade