DEPRECATED IN FAVOR OF eslint-plugin-lodash3
lodash specific linting rules for ESLint
Install ESLint either locally or globally.
npm install eslint
If you installed ESLint
globally, you have to install lodash plugin globally too. Otherwise, install it locally.
$ npm install eslint-plugin-lodash
The rules are specifically written to target ES6 JavaScript, so you'll want to use the babel-eslint parser.
Add plugins
section and specify ESLint-plugin-lodash as a plugin.
{
"parser": "babel-eslint",
"plugins": [
"lodash"
]
}
Finally, enable all of the rules that you would like to use.
{
"rules": {
"lodash/import": 1,
}
}
- import: Prevent importing the entire lodash (or lodash-compat) library.
- Add Contributing Guide, until then PRs welcome!
ESLint-plugin-lodash is licensed under the MIT License.