eslint-plugin-lodash-fp
ESLint rules for lodash/fp
Install
$ npm install --save-dev eslint eslint-plugin-lodash-fp
Usage
Configure it in package.json
.
{
"name": "my-awesome-project",
"eslintConfig": {
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
},
"plugins": [
"lodash-fp"
],
"rules": {
"lodash-fp/consistent-compose": "off",
"lodash-fp/consistent-name": "off",
"lodash-fp/no-chain": "error",
"lodash-fp/no-extraneous-function-wrapping": "error",
"lodash-fp/no-single-composition": "error",
"lodash-fp/use-fp": "error"
}
}
}
Rules
Recommended configuration
This plugin exports a recommended
configuration that enforces good practices.
To enable this configuration, use the extends
property in your package.json
.
{
"name": "my-awesome-project",
"eslintConfig": {
"plugins": [
"lodash-fp"
],
"extends": "plugin:lodash-fp/recommended"
}
}
See ESLint documentation for more information about extending configuration files.
Note: This configuration will also enable the correct parser options and environment.
MIT © Jeroen Engels