Skip to content

Commit

Permalink
style: adhere to standard style
Browse files Browse the repository at this point in the history
  • Loading branch information
boennemann committed Mar 22, 2015
1 parent f32a8e7 commit d5a8cb1
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var efh = require('error-first-handler')

module.exports = {
efh: efh,
standard: efh(function(err) {
standard: efh(function (err) {
console.log('Something went wrong:')
if (typeof err === 'string') return console.log(err)
if (err instanceof Error) return console.log(err.message)
Expand Down
5 changes: 1 addition & 4 deletions src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ module.exports = function () {
var config = ini.decode(fs.readFileSync('./.git/config') + '')
var repo = config['remote "origin"'].url

if (repo) pkg.repository = {
type: 'git',
url: ghUrl(repo)
}
if (repo) pkg.repository = { type: 'git', url: ghUrl(repo) }
}

// set up devDependency
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = function (test, createModule) {
.run(command)
.code(0)
.stdout(/> semantic-release pre\n$/m)
.end(function(err) {
.end(function (err) {
t.is(pkg + '', fs.readFileSync(cwd + '/package.json') + '', 'package')
t.error(err, 'nixt')
})
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/postpublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function (test, createModule) {

base.clone()
.run('npm run postpublish')
.end(function(err) {
.end(function (err) {
t.error(err, 'nixt')
})
})
Expand All @@ -50,7 +50,7 @@ module.exports = function (test, createModule) {
base.clone()
.exec('git checkout `git rev-parse HEAD`')
.run('npm run postpublish')
.end(function(err) {
.end(function (err) {
t.error(err, 'nixt')
})
})
Expand Down
6 changes: 3 additions & 3 deletions tests/scenarios/prepublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = function (test, createModule) {
.run('npm run prepublish')
.code(code)
.stdout(/> semantic-release pre\n\nDetermining new version\n/m)
.end(function(err) {
.end(function (err) {
t.error(err, 'nixt')

var pkg = JSON.parse(fs.readFileSync(cwd + '/package.json'))
Expand All @@ -38,8 +38,8 @@ module.exports = function (test, createModule) {
return t.error(null, 'no publish')
}

exec('npm publish --ignore-scripts', {cwd: cwd}, function(err) {
setTimeout(function() {
exec('npm publish --ignore-scripts', {cwd: cwd}, function (err) {
setTimeout(function () {
t.error(err, 'publish')
}, 300)
})
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = function (test, createModule) {
.run(command)
.code(1)
.stdout(/Everything is alright/)
.end(function(err) {
.end(function (err) {
t.error(err, 'nixt')
})
})
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = function (test, createModule) {
.exec('git remote add origin git@github.com:user/repo.git')
.run('./node_modules/.bin/semantic-release setup')
.code(0)
.end(function(err) {
.end(function (err) {
t.error(err, 'nixt')

var pkg = JSON.parse(readFile(join(cwd, 'package.json')))
Expand Down
2 changes: 1 addition & 1 deletion tests/scenarios/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function (test, createModule) {
, 'm'
))
.code(1)
.end(function(err) {
.end(function (err) {
t.error(err, 'nixt')
})
})
Expand Down

0 comments on commit d5a8cb1

Please sign in to comment.