diff --git a/lib/worker.js b/lib/worker.js index f9487a79..3956f877 100644 --- a/lib/worker.js +++ b/lib/worker.js @@ -6,6 +6,7 @@ const CP = require('childprocess-promise') const ChildProcess = require('child_process') const Path = require('path') const FS = require('fs') +const resolveEnv = require('resolve-env') const Communication = new CP() @@ -92,7 +93,7 @@ Communication.on('JOB', function(job) { Path.join(__dirname, 'reporter.js') ] if (params.rulesDir) { - let rulesDir = params.rulesDir + let rulesDir = resolveEnv(params.rulesDir) if (!Path.isAbsolute(rulesDir)) { rulesDir = find(params.fileDir, rulesDir) } diff --git a/package.json b/package.json index 8c55a64f..3639042d 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "atom-package-deps": "^3.0.2", "childprocess-promise": "^3.0.0", "escape-html": "^1.0.3", - "eslint": "^1.9.0" + "eslint": "^1.9.0", + "resolve-env": "^1.0.0" }, "devDependencies": { "eslint-plugin-react": "^3.8.0",