From 5986bf920ef84d03fe9fd3efd00cc28a3a42d30b Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2019 04:24:40 +0000 Subject: [PATCH] chore(package): update xo to version 0.25.0 --- index.js | 2 ++ lib/definitions/plugins.js | 2 ++ lib/get-git-auth-url.js | 2 +- lib/git.js | 2 +- package.json | 2 +- test/helpers/git-utils.js | 6 +++--- test/helpers/mockserver.js | 2 +- test/helpers/npm-registry.js | 2 +- 8 files changed, 12 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 8e37936f49..66fc877cbb 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +/* eslint require-atomic-updates: off */ + const {template, pick} = require('lodash'); const marked = require('marked'); const TerminalRenderer = require('marked-terminal'); diff --git a/lib/definitions/plugins.js b/lib/definitions/plugins.js index 3d4478a9e3..31bae73b6b 100644 --- a/lib/definitions/plugins.js +++ b/lib/definitions/plugins.js @@ -1,3 +1,5 @@ +/* eslint require-atomic-updates: off */ + const {isString, isPlainObject} = require('lodash'); const {getGitHead} = require('../git'); const hideSensitive = require('../hide-sensitive'); diff --git a/lib/get-git-auth-url.js b/lib/get-git-auth-url.js index 4495d95d7a..cc7a354842 100644 --- a/lib/get-git-auth-url.js +++ b/lib/get-git-auth-url.js @@ -41,7 +41,7 @@ module.exports = async ({cwd, env, options: {repositoryUrl, branch}}) => { // Test if push is allowed without transforming the URL (e.g. is ssh keys are set up) try { await verifyAuth(repositoryUrl, branch, {cwd, env}); - } catch (error) { + } catch (_) { const envVar = Object.keys(GIT_TOKENS).find(envVar => !isNil(env[envVar])); const gitCredentials = `${GIT_TOKENS[envVar] || ''}${env[envVar] || ''}`; diff --git a/lib/git.js b/lib/git.js index 95a0f7a274..faba17ca2d 100644 --- a/lib/git.js +++ b/lib/git.js @@ -63,7 +63,7 @@ async function isRefInHistory(ref, execaOpts) { async function fetch(repositoryUrl, execaOpts) { try { await execa('git', ['fetch', '--unshallow', '--tags', repositoryUrl], execaOpts); - } catch (error) { + } catch (_) { await execa('git', ['fetch', '--tags', repositoryUrl], execaOpts); } } diff --git a/package.json b/package.json index e31737af68..38adbc1ad9 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "sinon": "^7.2.7", "stream-buffers": "^3.0.2", "tempy": "^0.3.0", - "xo": "^0.24.0" + "xo": "^0.25.0" }, "engines": { "node": ">=8.3" diff --git a/test/helpers/git-utils.js b/test/helpers/git-utils.js index 8d39c16169..9dd4b89725 100644 --- a/test/helpers/git-utils.js +++ b/test/helpers/git-utils.js @@ -100,10 +100,10 @@ export async function gitGetCommits(from, execaOpts) { * Checkout a branch on the current git repository. * * @param {String} branch Branch name. - * @param {Boolean} create `true` to create the branch, `false` to checkout an existing branch. + * @param {Boolean} create to create the branch, `false` to checkout an existing branch. * @param {Object} [execaOpts] Options to pass to `execa`. */ -export async function gitCheckout(branch, create = true, execaOpts) { +export async function gitCheckout(branch, create, execaOpts) { await execa('git', create ? ['checkout', '-b', branch] : ['checkout', branch], execaOpts); } @@ -224,6 +224,6 @@ export async function gitCommitTag(gitHead, execaOpts) { * * @throws {Error} if the push failed. */ -export async function gitPush(repositoryUrl = 'origin', branch = 'master', execaOpts) { +export async function gitPush(repositoryUrl, branch, execaOpts) { await execa('git', ['push', '--tags', repositoryUrl, `HEAD:${branch}`], execaOpts); } diff --git a/test/helpers/mockserver.js b/test/helpers/mockserver.js index f7a6aaca2a..72ee155f9b 100644 --- a/test/helpers/mockserver.js +++ b/test/helpers/mockserver.js @@ -30,7 +30,7 @@ async function start() { minTimeout: 1000, factor: 2, }); - } catch (error) { + } catch (_) { throw new Error(`Couldn't start mock-server after 2 min`); } } diff --git a/test/helpers/npm-registry.js b/test/helpers/npm-registry.js index e01fcc3e75..ee80bfbca2 100644 --- a/test/helpers/npm-registry.js +++ b/test/helpers/npm-registry.js @@ -39,7 +39,7 @@ async function start() { minTimeout: 1000, factor: 2, }); - } catch (error) { + } catch (_) { throw new Error(`Couldn't start npm-registry-docker after 2 min`); }