Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-import-resolver-babel-plugin-root-import

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-import-resolver-babel-plugin-root-import

fork of eslint-import-resolver-babel-root-import that works

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.2K
decreased by-4.02%
Maintainers
2
Weekly downloads
 
Created
Source

eslint-import-resolver-babel-plugin-root-import

A babel-plugin-root-import resolver for eslint-plugin-import.

This is a fork of eslint-import-resolver-babel-root-import that works with latest version of babel plugin.

Installation

npm install --save-dev eslint-plugin-import eslint-import-resolver-babel-plugin-root-import

Usage

Inside your .eslintrc file, pass this resolver to eslint-plugin-import:

"settings": {
  "import/resolver": "babel-plugin-root-import"
}

And see babel-plugin-root-import to know how to configure your prefix/suffix. Configuration will be parsed down from .babelrc file

Example

{
  "extends": "airbnb",
  "rules": {},
  "settings": {
    "import/resolver": {
      "babel-plugin-root-import": {}
    }
  }
}

Or if you don't use .babelrc and keep your babel configuration in, say, webpack config you can pass those options to resolver directly through .eslintrc file:

{
  "extends": "airbnb",
  "rules": {},
  "settings": {
    "import/resolver": {
      "babel-plugin-root-import": {
        "rootPathPrefix": "@",
        "rootPathSuffix": "src/js"
      }
    }
  }
}

License

MIT, see LICENSE.md for details.

Keywords

FAQs

Package last updated on 22 Feb 2018

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