eslint-plugin-fp-challenge
Enforce rules of Functional Programming challenge
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-fp-challenge
:
$ npm install eslint-plugin-fp-challenge --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must
also install eslint-plugin-fp-challenge
globally.
Usage
Add fp-challenge
to the plugins section of your .eslintrc
configuration
file. You can omit the eslint-plugin-
prefix:
Then configure the rules you want to use under the rules section.
Supported Rules
no-self-reference
prevents recursion to itself by name.no-calling-object-members
prevents usage of.map
,.sort
,.reduce
. To force using plain functions instead (and prevent side-effects)no-use-function
promote using lambda's since they are more readable when using a single statement and a single argument.no-mutable-state
prevent assigning new values.single-argument
promote currying instead of using multiple arguments.
Use the whole challenge configuration