eslint-plugin-no-global-lodash

Lodash should not be loaded globally. If a lodash method is needed only the package for that method should be loaded in the file.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-plugin-no-global-lodash
001.0.46 years ago6 years agoMinified + gzip package size for eslint-plugin-no-global-lodash in KB

Readme

eslint-plugin-no-global-lodash
view on npm Build Status
Lodash should not be loaded globally. If a lodash method is needed only the package for that method should be loaded in the file.

Installation

You'll first need to install ESLint:
npm i eslint --save-dev

or
yarn add -D eslint

Next, install eslint-plugin-no-global-lodash:
npm install eslint-plugin-no-global-lodash --save-dev

or
yarn add -D eslint-plugin-no-global-lodash

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

Usage

Add no-global-lodash to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
    "plugins": [
        "no-global-lodash"
    ]
}

Then configure the rules you want to use under the rules section.
{
    "rules": {
        "eslint-no-global-lodash/no-global-lodash": 2
    }
}

Supported Rules