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

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

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
eslint-import-resolver-babel-plugin-root-import
2481.1.16 years ago7 years agoMinified + gzip package size for eslint-import-resolver-babel-plugin-root-import in KB

Readme

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

```sh 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: ```json "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

```json { "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: ```json { "extends": "airbnb", "rules": {}, "settings": {
"import/resolver": {
"babel-plugin-root-import": {
"rootPathPrefix": "@",
"rootPathSuffix": "src/js"
}
}
} } ```

License

MIT, see LICENSE.md for details.