A demo of the power of React PropTypes with Flow's static analysis. Blog post/Video.
Props must be documented.
Flow understands and propagates constraints to call sites.
git clone [email protected]:winkler1/flow-eslint-react-demo.git && cd flow-eslint-react-demo && git checkout react-13 && npm install
npm run lint
to confirm eslint working.- Watch your code:
./node_modules/.bin/onchange "**/*.js" .babelrc .eslintrc .flowconfig -- ./run_checks.sh
- Make changes in src/App.js. As you change, ESLint and Flow should run checks and give feedback.