Skip to content

Commit

Permalink
Update standard to v.12 and add lint script (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
BridgeAR authored Aug 29, 2018
1 parent 8ae224d commit 6623707
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']) {
Expand Down Expand Up @@ -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 })
})
})
}
Expand Down
2 changes: 1 addition & 1 deletion lib/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
})
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions test/cli-clean-full.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/cli-upload-files.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6623707

Please sign in to comment.