eslint-plugin-lodash-fp

ESLint rules for lodash/fp

MIT 20 个版本
安装
npm install eslint-plugin-lodash-fp
yarn add eslint-plugin-lodash-fp
pnpm add eslint-plugin-lodash-fp
bun add eslint-plugin-lodash-fp
README

eslint-plugin-lodash-fp Build Status

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": [
        "error",
        "_"
      ],
      "lodash-fp/no-argumentless-calls": "error",
      "lodash-fp/no-chain": "error",
      "lodash-fp/no-extraneous-args": "error",
      "lodash-fp/no-extraneous-function-wrapping": "error",
      "lodash-fp/no-extraneous-iteratee-args": "error",
      "lodash-fp/no-extraneous-partials": "error",
      "lodash-fp/no-for-each": "off",
      "lodash-fp/no-partial-of-curried": "error",
      "lodash-fp/no-single-composition": "error",
      "lodash-fp/no-submodule-destructuring": "error",
      "lodash-fp/no-unused-result": "error",
      "lodash-fp/prefer-compact": "error",
      "lodash-fp/prefer-composition-grouping": "error",
      "lodash-fp/prefer-constant": [
        "error",
        {
          "arrowFunctions": false
        }
      ],
      "lodash-fp/prefer-flat-map": "error",
      "lodash-fp/prefer-get": "error",
      "lodash-fp/prefer-identity": [
        "error",
        {
          "arrowFunctions": false
        }
      ],
      "lodash-fp/preferred-alias": "off",
      "lodash-fp/use-fp": "error"
    }
  }
}

Rules

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": {
		"extends": "plugin:lodash-fp/recommended"
	}
}

See ESLint documentation for more information about extending configuration files.

MIT © Jeroen Engels

版本列表
2.2.0-a1 2018-07-09
2.1.3 2016-11-08
2.1.2 2016-11-03
2.1.1 2016-10-14
2.1.0 2016-10-10
2.0.1 2016-08-24
2.0.0 2016-07-14
1.3.0 2016-05-26
1.2.0 2016-05-08
1.1.3 2016-05-02
1.1.2 2016-05-01
1.1.1 2016-04-30
1.1.0 2016-04-30
1.0.2 2016-04-29
1.0.1 2016-04-27
1.0.0 2016-04-27
0.1.0 2016-04-19
0.0.3 2016-04-15
0.0.2 2016-04-13
0.0.1 2016-04-11