Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from adrianmcli/fix/babel-plugin-name
Browse files Browse the repository at this point in the history
Update babel plugin name
  • Loading branch information
GollyJer committed Aug 15, 2017
2 parents 17f06b6 + ec7a850 commit 86c7a03
Show file tree
Hide file tree
Showing 5 changed files with 1,853 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .babelrc
@@ -1,7 +1,7 @@
{
"plugins": [
[
"babel-root-import",
"babel-plugin-root-import",
{
"rootPathSuffix": "test/somepath",
"rootPathPrefix": "@"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -14,7 +14,7 @@ npm install --save-dev eslint-plugin-import eslint-import-resolver-babel-root-im
Inside your `.eslintrc` file, pass this resolver to `eslint-plugin-import`:
```
"settings": {
"import/resolver": "babel-root-import"
"import/resolver": "babel-plugin-root-import"
}
```

Expand All @@ -29,7 +29,7 @@ your prefix/suffix.
"rules": {},
"settings": {
"import/resolver": {
"babel-root-import": {}
"babel-plugin-root-import": {}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "eslint-import-resolver-babel-root-import",
"version": "0.0.3",
"version": "1.0.0",
"main": "src/index.js",
"description": "babel-plugin-root-import resolver for eslint-plugin-import",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -44,7 +44,7 @@ function getConfigFromBabel(start, babelrc = '.babelrc') {
const babelrcJson = JSON5.parse(fs.readFileSync(babelrcPath, 'utf8'));
if (babelrcJson && Array.isArray(babelrcJson.plugins)) {
const pluginConfig = babelrcJson.plugins.find(p => (
p[0] === 'babel-root-import'
p[0] === 'babel-plugin-root-import'
));
// The src path inside babelrc are from the root so we have
// to change the working directory for the same directory
Expand Down

0 comments on commit 86c7a03

Please sign in to comment.