-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[New] enable passing cwd as an option to `eslint-import-resolver-webp…
…ack` This enables users to change the lookup of the webpack module for the resolve functionality should it not be in the user's local node_modules. This pertains to the case of a CLI where the CLI may be in charge of webpack, and the user's repo doesn't have it. Co-Authored-By: Jordan Harband <ljharb@gmail.com>
- Loading branch information
Showing
4 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var path = require('path') | ||
|
||
var resolve = require('../index').resolve | ||
|
||
var file = path.join(__dirname, 'files', 'src', 'dummy.js') | ||
|
||
var webpackDir = path.join(__dirname, "different-package-location") | ||
|
||
console.log(resolve('main-module', file, { config: "webpack.config.js", cwd: webpackDir})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters