NOTE: This demo is using Atom and the packages linter, linter-eslint, language-babel
- Lower barrier: Any editor that has ESLint support now supports Flow 🎉
- Less editor configuration: No need to change your entire workflow to incoroprate flow. No multiple-linters-per-file nonsense.
- Simple: Its literally just an ESLint rule! Just install the dependency, add a flowconfig, and you're good to go!
This guide assumes that you have installed eslint, babel, babel-plugin-transform-flow-strip-types and configured flow. Check out the from-scratch guide for the full guide on getting started.
Step 1. Install
npm install --save-dev eslint-plugin-flowtype-errorsStep 2. Configure
Add this line to the 'rules' section of your .eslintrc
"flowtype-errors/show-errors": 2Add this line to the 'plugins' section of your .eslintrc
"flowtype-errors"Add the @flow pragma to files that you want to lint
Also make sure that your .flowconfig is in the root of your project directory
/**
* @flow
*/Run eslint and and you're all set!
Flow is supported on all OS's except Windows 32bit. Add this line to appveyor to make tests run properly.
apm install linter linter-eslint language-babel- https://github.com/SublimeLinter/SublimeLinter3
- https://github.com/roadhump/SublimeLinter-eslint
- https://github.com/babel/babel-sublime
http://eslint.org/docs/user-guide/integrations#editors
- Add more extensive tests
- Allow passing arguments to flow binary
- Fix column number inconsistencies between ESLint and Flow
- Run flow minimal amount of times for faster linting
- Custom formatting of flow error messages
- Enable rules to allow and disallow specific flow errors
