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

Commit 17f06b6

Browse files
Christian LeChristian Le
authored andcommitted
Fix path and es6 arrow function for return
1 parent 4dca9f9 commit 17f06b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ if (babelRootImport.default) {
2828
function getConfigFromBabel(start, babelrc = '.babelrc') {
2929
if (start === '/') return [];
3030

31-
const packageJSONPath = path.join(start, babelrc);
31+
const packageJSONPath = path.join(start, 'package.json');
3232
const packageJSON = require(packageJSONPath);
3333
const babelConfig = packageJSON.babel;
3434
if (babelConfig) {
35-
const pluginConfig = babelConfig.plugins.find(p => {
35+
const pluginConfig = babelConfig.plugins.find(p => (
3636
p[0] === 'babel-root-import'
37-
});
37+
));
3838
process.chdir(path.dirname(packageJSONPath));
3939
return pluginConfig[1];
4040
}

0 commit comments

Comments
 (0)