Skip to content
This repository has been archived by the owner on Sep 28, 2020. It is now read-only.

fix: eslint path #283

Merged
merged 3 commits into from Jul 4, 2019
Merged
Changes from 1 commit
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
11 changes: 1 addition & 10 deletions index.js
Expand Up @@ -160,21 +160,12 @@ module.exports = function(input, map) {
loaderUtils.getOptions(webpack)
);

var userEslintPath = userOptions.eslintPath;

var eslintPkgPath = "eslint/package.json";
if (userEslintPath) {
eslintPkgPath = userEslintPath + "/package.json";
}

var eslintVersion = require(eslintPkgPath).version;

var config = assign(
// loader defaults
{
cacheIdentifier: JSON.stringify({
"eslint-loader": pkg.version,
eslint: eslintVersion
eslint: require(userOptions.eslintPath || "eslint").version
ricardogobbosouza marked this conversation as resolved.
Show resolved Hide resolved
}),
eslintPath: "eslint"
},
Expand Down