diff --git a/index.js b/index.js index 4a940d8..2473976 100644 --- a/index.js +++ b/index.js @@ -43,7 +43,7 @@ function Linter (opts) { this.eslintConfig = Object.assign({ cache: true, - cacheLocation: cacheLocation, + cacheLocation, envs: [], fix: false, globals: [], diff --git a/package.json b/package.json index 8c46306..3d75822 100644 --- a/package.json +++ b/package.json @@ -61,5 +61,8 @@ }, "scripts": { "test": "standard && tape test/clone.js test/api.js" + }, + "engines": { + "node": ">=8.10" } } diff --git a/test/api.js b/test/api.js index 6df5630..392ace1 100644 --- a/test/api.js +++ b/test/api.js @@ -1,12 +1,13 @@ var eslint = require('eslint') var Linter = require('../').linter +var path = require('path') var test = require('tape') function getStandard () { return new Linter({ cmd: 'pocketlint', version: '0.0.0', - eslint: eslint, + eslint, eslintConfig: require('../tmp/standard/options').eslintConfig }) } @@ -14,7 +15,7 @@ function getStandard () { test('api: lintFiles', function (t) { t.plan(3) var standard = getStandard() - standard.lintFiles([], { cwd: '../bin' }, function (err, result) { + standard.lintFiles([], { cwd: path.join(__dirname, '../bin') }, function (err, result) { t.error(err, 'no error while linting') t.equal(typeof result, 'object', 'result is an object') t.equal(result.errorCount, 0) diff --git a/test/lib/standard-cmd.js b/test/lib/standard-cmd.js index eca4da5..e2e4888 100755 --- a/test/lib/standard-cmd.js +++ b/test/lib/standard-cmd.js @@ -4,7 +4,7 @@ var eslint = require('eslint') var opts = { cmd: 'pocketlint', version: '0.0.0', - eslint: eslint, + eslint, eslintConfig: { configFile: path.join(__dirname, 'standard.json'), useEslintrc: false