Skip to content

ESLint plugin for preventing full import of huge libraries

License

Notifications You must be signed in to change notification settings

mdebbar/eslint-plugin-full-import

 
 

Repository files navigation

eslint-plugin-full-import

Configurable linting rule for preventing the full-importing of huge libraries (e.g. lodash, aws-sdk, etc).

Installation

Install ESLint along with eslint-plugin-full-import:

yarn add --dev eslint eslint-plugin-full-import

The rule is specifically written to target ES6 imports.

Configuration

Add plugins section and specify eslint-plugin-full-import as a plugin:

{
  "plugins": [
    "full-import"
  ]
}

Then, enable the no-full-import rule and pass an array of packages that you want to prevent from being fully imported:

{
  "rules": {
    "full-import/no-full-import": ["error", [
      "lodash",
      "aws-sdk"
    ]],
  }
}

List of supported rules

  • no-full-import: Prevent importing the entirety of the listed packages.

About

ESLint plugin for preventing full import of huge libraries

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%