0.1.1 • Published 4 months ago

eslint-plugin-friendly-reduce v0.1.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
4 months ago

eslint-plugin-friendly-reduce

Ensure best practices when dealing with Array#reduce()

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-friendly-reduce:

npm install eslint-plugin-friendly-reduce --save-dev

Usage

Add friendly-reduce to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "friendly-reduce"
    ]
}

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

{
    "rules": {
        "friendly-reduce/wrap-reduce": 2
    }
}

Rules

Name             Description
no-useless-reduceDisallow the usage of useless Array#reduce()
wrap-reduceDisallow Array#reduce() outside of a function explaining it
0.1.1

4 months ago

0.1.0

5 months ago

0.0.1

5 months ago

0.0.0

5 months ago