New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-lean-imports

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-lean-imports

ESLint Plugin to make sure your imports only import the bits you need

  • 0.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

ESLint-plugin-lean-imports

Travis Build Status devDependency Status

Make sure your imports only import the bits you need

Installation

Install ESLint either locally or globally.

npm install eslint

If you installed ESLint globally, you have to install lean-imports plugin globally too. Otherwise, install it locally.

npm install eslint-plugin-lean-imports

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-lean-imports as a plugin.

{
  "parser": "babel-eslint",
  "plugins": [
    "lean-imports"
  ]
}

Finally, enable all of the rules that you would like to use.

{
  "rules": {
    "lean-imports/import": [1, [
        "lodash",
        "react-bootstrap",
    ]]
  }
}

List of supported rules

The rules prevent from importing the whole library at once.

Here are the supported libraries:

  • import Prevent an array of library from being completely imported

Contributing

PRs are welcome if you have ideas.

Just make sure your commit is prefixed by one of the following:

  • [added]
  • [changed]
  • [fixed]
  • [removed]

For changed or removed, just make sure to add an upgrade path in the commit message.

Ideas are welcome

License

ESLint-plugin-lean-imports is licensed under the MIT License.

Keywords

FAQs

Package last updated on 11 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc