mind029 / eslint-plugin-purecheck

ESLint plugin to ensure all functions are pure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eslint-plugin-purecheck

Uses purecheck to ensure all functions are pure.

Installation

You need to install ESLint:

$ npm install eslint --save-dev

Next, install eslint-plugin-purecheck:

$ npm install eslint-plugin-purecheck --save-dev

Note: If you installed ESLint globally (using the -g or --global flag) then you must also install eslint-plugin-this globally.

Usage

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

{
    "plugins": [
        "purecheck"
    ]
}

The plugin comes with a single rule called purecheck/no-impure. In order to enable it, you have to add the rule in the rules section of your .eslintrc file:

{
    "rules": {
        "purecheck/no-impure": "warn"
    }
}

About

ESLint plugin to ensure all functions are pure


Languages

Language:JavaScript 100.0%