Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.65 KB

README.md

File metadata and controls

65 lines (42 loc) · 1.65 KB

ESLint-plugin-lodash

DEPRECATED IN FAVOR OF eslint-plugin-lodash3

Travis Build Status devDependency Status

lodash specific linting rules for ESLint

Installation

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.

Configuration

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,
  }
}

List of supported rules

  • import: Prevent importing the entire lodash (or lodash-compat) library.

To Do

  • Add Contributing Guide, until then PRs welcome!

Any rule idea is welcome !

License

ESLint-plugin-lodash is licensed under the MIT License.