eslint-import-resolver-babel-module
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="5.1.0"></a> | ||
# [5.1.0](https://github.com/tleunen/eslint-import-resolver-babel-module/compare/v5.0.1...v5.1.0) (2019-04-25) | ||
### Features | ||
* Add monorepo support ([#101](https://github.com/tleunen/eslint-import-resolver-babel-module/issues/101)) ([f932339](https://github.com/tleunen/eslint-import-resolver-babel-module/commit/f932339)), closes [#100](https://github.com/tleunen/eslint-import-resolver-babel-module/issues/100) | ||
<a name="5.0.1"></a> | ||
@@ -7,0 +17,0 @@ ## [5.0.1](https://github.com/tleunen/eslint-import-resolver-babel-module/compare/v5.0.0...v5.0.1) (2019-01-29) |
@@ -15,3 +15,3 @@ "use strict"; | ||
function getPlugins(file) { | ||
function getPlugins(file, cwd) { | ||
try { | ||
@@ -21,3 +21,4 @@ const manager = new OptionManager(); | ||
babelrc: true, | ||
filename: file | ||
filename: file, | ||
cwd | ||
}); | ||
@@ -35,4 +36,4 @@ return result.plugins.filter(plugin => plugin.key === 'module-resolver'); | ||
function getPluginOptions(file, defaultOptions) { | ||
const instances = getPlugins(file); | ||
function getPluginOptions(file, cwd, defaultOptions) { | ||
const instances = getPlugins(file, cwd); | ||
return instances.reduce((config, plugin) => ({ | ||
@@ -95,3 +96,3 @@ cwd: plugin.options.cwd || config.cwd, | ||
try { | ||
const pluginOptions = getPluginOptions(file, { | ||
const pluginOptions = getPluginOptions(file, projectRootDir, { | ||
// if .babelrc doesn't exist, try to get the configuration information from `options`, | ||
@@ -98,0 +99,0 @@ // which gets defined by the eslint configuration file. |
{ | ||
"name": "eslint-import-resolver-babel-module", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"main": "lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "babel-plugin-module-resolver resolver for eslint-plugin-import", |
18391
104