Integrate flowtype with eslint
npm install eslint-plugin-flow-check> Integrate flowtype with eslint
[![npm version][2]][3]
* 💯 Integrating with eslint means integrating with everything
* 💪 Use one tool to check and lint your code
* 👀 Check only files you care about
``shell`
npm install --save-dev eslint \
babel-eslint \
eslint-plugin-flow-check
Configure eslint to use babel-eslint and eslint-plugin-flow-check.
Make sure to enable the plugin via its rule.
`json`
{
"eslintConfig": {
"rules": {
"flow-check/check": 2
},
"parser": "babel-eslint",
"plugins": ["flow-check"]
}
}
Create a .flowconfig in your project root. See the flow-type docs for details.
``
flow init
Add the flow pragma to all files you want to typecheck.
`js``
// @flow
---
Built by (c) marionebl. Released under the MIT license.
[0]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square
[1]: https://nodejs.org/api/documentation.html#documentation_stability_index
[2]: https://img.shields.io/npm/v/eslint-plugin-flow-check.svg?style=flat-square
[3]: https://npmjs.org/package/eslint-plugin-flow-check