eslint-plugin-fp-ts
A collection of ESLint rules for fp-ts
Installation
Assuming ESlint is installed locally in your project:
# npm
npm install --save-dev eslint-plugin-fp-ts
# yarn
yarn add --dev eslint-plugin-fp-ts
Then enable the plugin in your .eslintrc
config
{
"plugins": ["fp-ts"]
}
and enable the rules you want, for example
{
"plugins": ["fp-ts"],
"rules": {
"fp-ts/no-lib-imports": "error"
}
}
List of supported rules
- fp-ts/no-lib-imports: Disallow imports from 'fp-ts/lib'
- fp-ts/no-pipeable: Disallow imports from the 'pipeable' module
- fp-ts/prefer-traverse: Replace map + sequence with traverse
- fp-ts/no-redundant-flow: Remove redundant uses of flow