Socket
Socket
Sign inDemoInstall

eslint-import-resolver-root-import

Package Overview
Dependencies
194
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-import-resolver-root-import

Babel Plugin Root Import ESLint resolver.


Version published
Weekly downloads
589
increased by2.61%
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 29 May 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc