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

Update babel plugin name #6

Merged
merged 5 commits into from Aug 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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