0.0.2 • Published 7 years ago

eslint-import-resolver-global-import v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

eslint-import-resolver-babel-root-import

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

Installation

npm install --save-dev eslint-plugin-import eslint-import-resolver-global-import

Usage

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

settings: {
  'import/resolver': {
    'global-import': {
      root: __dirname,
      prefix: '@'
    }
  }
}

And see babel-plugin-root-import to know how to configure your prefix/suffix.

Example

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

License

MIT, see LICENSE.md for details.