1.0.4 • Published 8 years ago
eslint-plugin-no-global-lodash v1.0.4
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.
Installation
You'll first need to install ESLint:
npm i eslint --save-devor
yarn add -D eslintNext, install eslint-plugin-no-global-lodash:
npm install eslint-plugin-no-global-lodash --save-devor
yarn add -D eslint-plugin-no-global-lodashNote: 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
}
}