Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 17, 2018
1 parent a0bee56 commit d8dcc67
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions cli.js
Expand Up @@ -89,7 +89,7 @@ Promise
.then(pkg => {
console.log(`\n ${pkg.name} ${pkg.version} published 🎉`);
})
.catch(err => {
console.error(`\n${logSymbols.error} ${err.message}`);
.catch(error => {
console.error(`\n${logSymbols.error} ${error.message}`);
process.exit(1);
});
8 changes: 4 additions & 4 deletions lib/prerequisite.js
Expand Up @@ -22,8 +22,8 @@ module.exports = (input, pkg, opts) => {
title: 'Verify user is authenticated',
skip: () => process.env.NODE_ENV === 'test' || pkg.private || isExternalRegistry,
task: () => execa.stdout('npm', ['whoami'])
.catch(err => {
throw new Error(/ENEEDAUTH/.test(err.stderr) ?
.catch(error => {
throw new Error(/ENEEDAUTH/.test(error.stderr) ?
'You must be logged in to publish packages. Use `npm login` and try again.' :
'Authentication error. Use `npm whoami` to troubleshoot.');
})
Expand All @@ -41,8 +41,8 @@ module.exports = (input, pkg, opts) => {
{
title: 'Check git remote',
task: () => execa.stdout('git', ['ls-remote', 'origin', 'HEAD'])
.catch(err => {
throw new Error(err.stderr.replace('fatal:', 'Git fatal error:'));
.catch(error => {
throw new Error(error.stderr.replace('fatal:', 'Git fatal error:'));
})
},
{
Expand Down
2 changes: 1 addition & 1 deletion lib/ui.js
Expand Up @@ -29,7 +29,7 @@ function prettyVersionDiff(oldVersion, inc) {
}

function printCommitLog(repositoryUrl) {
return execa.stdout('git', ['rev-list', `--tags`, '--max-count=1'])
return execa.stdout('git', ['rev-list', '--tags', '--max-count=1'])
.then(latestHash => execa.stdout('git', ['log', '--format=%s %h', `${latestHash}..HEAD`]))
.then(result => {
if (!result) {
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Expand Up @@ -7,7 +7,7 @@ exports.readPkg = () => {
const {pkg} = readPkgUp.sync();

if (!pkg) {
throw new Error(`No package.json found. Make sure you're in the correct project.`);
throw new Error('No package.json found. Make sure you\'re in the correct project.');
}

return pkg;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -50,7 +50,7 @@
"update-notifier": "^2.1.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
"ava": "^0.25.0",
"xo": "^0.23.0"
}
}

0 comments on commit d8dcc67

Please sign in to comment.