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

Commit 86c7a03

Browse files
authored
Merge pull request #6 from adrianmcli/fix/babel-plugin-name
Update babel plugin name
2 parents 17f06b6 + ec7a850 commit 86c7a03

File tree

5 files changed

+1853
-5
lines changed

5 files changed

+1853
-5
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"plugins": [
33
[
4-
"babel-root-import",
4+
"babel-plugin-root-import",
55
{
66
"rootPathSuffix": "test/somepath",
77
"rootPathPrefix": "@"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npm install --save-dev eslint-plugin-import eslint-import-resolver-babel-root-im
1414
Inside your `.eslintrc` file, pass this resolver to `eslint-plugin-import`:
1515
```
1616
"settings": {
17-
"import/resolver": "babel-root-import"
17+
"import/resolver": "babel-plugin-root-import"
1818
}
1919
```
2020

@@ -29,7 +29,7 @@ your prefix/suffix.
2929
"rules": {},
3030
"settings": {
3131
"import/resolver": {
32-
"babel-root-import": {}
32+
"babel-plugin-root-import": {}
3333
}
3434
}
3535
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-import-resolver-babel-root-import",
3-
"version": "0.0.3",
3+
"version": "1.0.0",
44
"main": "src/index.js",
55
"description": "babel-plugin-root-import resolver for eslint-plugin-import",
66
"repository": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function getConfigFromBabel(start, babelrc = '.babelrc') {
4444
const babelrcJson = JSON5.parse(fs.readFileSync(babelrcPath, 'utf8'));
4545
if (babelrcJson && Array.isArray(babelrcJson.plugins)) {
4646
const pluginConfig = babelrcJson.plugins.find(p => (
47-
p[0] === 'babel-root-import'
47+
p[0] === 'babel-plugin-root-import'
4848
));
4949
// The src path inside babelrc are from the root so we have
5050
// to change the working directory for the same directory

0 commit comments

Comments
 (0)