diff --git a/bin.js b/bin.js index f1b89589..fc5b8c65 100755 --- a/bin.js +++ b/bin.js @@ -236,7 +236,7 @@ function runTool (args, Tool, version) { tool.on('port', function (port, proc, cb) { process.env.PORT = port // inline the PORT env to make it easier for cross platform usage - execspawn(envString(onPort, {PORT: port}), {stdio: 'inherit'}).on('exit', cb) + execspawn(envString(onPort, { PORT: port }), { stdio: 'inherit' }).on('exit', cb) }) if (args['collect-only']) { @@ -266,7 +266,7 @@ function runTool (args, Tool, version) { // open HTML file in default browser /* istanbul ignore if: we don't want to open a browser in `npm test` */ - if (args.open) opn('file://' + path.resolve(filename + '.html'), {wait: false}) + if (args.open) opn('file://' + path.resolve(filename + '.html'), { wait: false }) }) }) } diff --git a/lib/clean.js b/lib/clean.js index 20f31599..d262cced 100644 --- a/lib/clean.js +++ b/lib/clean.js @@ -15,7 +15,7 @@ function clean (dir, cb) { async.eachSeries( pathsToRemove, - (entry, next) => rimraf(entry, {disableGlob: true}, next), + (entry, next) => rimraf(entry, { disableGlob: true }, next), cb ) }) diff --git a/package.json b/package.json index 2ae6affc..b65debe2 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,8 @@ "test-local": "standard | snazzy && tap --no-cov test/*.test.js test-local/*.test.js", "ci-lint": "standard | snazzy", "ci-test": "tap test/*.test.js", - "ci-cov": "tap --100 test/*.test.js" + "ci-cov": "tap --100 test/*.test.js", + "lint": "standard --fix | snazzy" }, "dependencies": { "@nearform/bubbleprof": "^1.1.0", @@ -36,7 +37,7 @@ "devDependencies": { "autocannon": "^2.0.0", "snazzy": "^8.0.0", - "standard": "^11.0.0", + "standard": "^12.0.0", "tap": "^12.0.0", "tar-stream": "^1.5.5" }, diff --git a/test/cli-clean-full.test.js b/test/cli-clean-full.test.js index a86c441d..8eece05d 100644 --- a/test/cli-clean-full.test.js +++ b/test/cli-clean-full.test.js @@ -18,7 +18,7 @@ test('clinic clean', function (t) { t.equal(files.length, 2) // the folder and html file fs.writeFileSync(path.join(tempdir, 'some-other-file'), 'sup') - cli({cwd: tempdir}, ['clinic', 'clean'], function (err) { + cli({ cwd: tempdir }, ['clinic', 'clean'], function (err) { t.ifError(err) fs.readdir(tempdir, function (err, files) { @@ -32,7 +32,7 @@ test('clinic clean', function (t) { }) test('clinic clean on bad dir', function (t) { - cli({relayStderr: false}, [ + cli({ relayStderr: false }, [ 'clinic', 'clean', '--path', 'path/does/not/exist' ], function (err, stdout, stderr) { t.ok(err) diff --git a/test/cli-upload-files.test.js b/test/cli-upload-files.test.js index a99e6e26..33a8b68d 100644 --- a/test/cli-upload-files.test.js +++ b/test/cli-upload-files.test.js @@ -127,7 +127,7 @@ test('clinic upload - bad status code', function (t) { test('clinic upload bad-folder', function (t) { const server = new FakeUploadServer() server.listen(function () { - cli({relayStderr: false}, [ + cli({ relayStderr: false }, [ 'clinic', 'upload', '--upload-url', server.uploadUrl, doctorBadDirectory