eslint-plugin-no-global-lodash

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i eslint-plugin-no-global-lodash

Weekly Downloads

112

Version

1.0.4

License

MIT

Last publish

Collaborators

  • adalbertoteixeira