0.0.3 • Published 6 years ago

eslint-plugin-js-fp-linter v0.0.3

Weekly downloads
5
License
ISC
Repository
-
Last release
6 years ago

eslint-plugin-js-fp-linter

linting rules that promote functional programming practices

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-js-fp-linter:

$ npm install eslint-plugin-js-fp-linter --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-js-fp-linter globally.

Usage

Add js-fp-linter to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "js-fp-linter"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "js-fp-linter/rule-name": 2
    }
}

Supported Rules

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": [
      "js-fp-linter"
    ],
    "extends": "plugin:js-fp-linter/recommended"
  }
}