Package Exports
- eslint-plugin-fp-ts
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-fp-ts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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-tsThen 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
- fp-ts/prefer-chain: Replace map + flatten with chain
Configurations
Recommended
The plugin defines a recommended configuration with some reasonable defaults.
To use it, add it to the extends clause of your .eslintrc file:
{
"extends": ["plugin:fp-ts/recommended"]
}The rules included in this configuration are:
All
The plugin also defines an all configuration which includes every available
rule.
To use it, add it to the extends clause of your .eslintrc file:
{
"extends": ["plugin:fp-ts/all"]
}