From eb7bdf106d33565500c1dd1d89bfd12469a3866c Mon Sep 17 00:00:00 2001 From: Utkarsh Dixit Date: Mon, 8 Jul 2019 12:43:35 +0530 Subject: [PATCH] Fix linting issues --- packages/shipit-cli/src/Shipit.js | 16 ++++++++-------- packages/shipit-cli/src/cli.js | 4 ++-- packages/ssh-pool/src/Connection.js | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/shipit-cli/src/Shipit.js b/packages/shipit-cli/src/Shipit.js index 04ad3c8..9590719 100644 --- a/packages/shipit-cli/src/Shipit.js +++ b/packages/shipit-cli/src/Shipit.js @@ -69,8 +69,8 @@ class Shipit extends Orchestrator { this.options = { ...defaultOptions, ...options } this.environment = options.environment - this.show_progress = false; - this.show_stats = false; + this.showProgress = false; + this.showStats = false; this.initializeEvents() @@ -230,8 +230,8 @@ class Shipit extends Orchestrator { const defaultOptions = { ignores: this.config && this.config.ignores ? this.config.ignores : [], rsync: this.config && this.config.rsync ? this.config.rsync : [], - show_progress: this.show_progress, - show_stats: this.show_stats, + showProgress: this.showProgress, + showStats: this.showStats, } const copyOptions = { ...defaultOptions, ...options } @@ -256,8 +256,8 @@ class Shipit extends Orchestrator { const defaultOptions = { ignores: this.config && this.config.ignores ? this.config.ignores : [], rsync: this.config && this.config.rsync ? this.config.rsync : [], - show_progress: this.show_progress, - show_stats: this.show_stats, + showProgress: this.showProgress, + showStats: this.showStats, } const copyOptions = { ...defaultOptions, ...options } return this.pool.copyToRemote(src, dest, copyOptions) @@ -280,8 +280,8 @@ class Shipit extends Orchestrator { const defaultOptions = { ignores: this.config && this.config.ignores ? this.config.ignores : [], rsync: this.config && this.config.rsync ? this.config.rsync : [], - show_progress: this.show_progress, - show_stats: this.show_stats, + showProgress: this.showProgress, + showStats: this.showStats, } const copyOptions = { ...defaultOptions, ...options } return this.pool.copyFromRemote(src, dest, copyOptions) diff --git a/packages/shipit-cli/src/cli.js b/packages/shipit-cli/src/cli.js index 68b1016..957ef18 100644 --- a/packages/shipit-cli/src/cli.js +++ b/packages/shipit-cli/src/cli.js @@ -26,8 +26,8 @@ program .option('--require ', 'Script required before launching Shipit') .option('--tasks', 'List available tasks') .option('--environments', 'List available environments') - .option('-p, --showProgress', 'Show rsync Progress') - .option('-s, --showStats', 'Show rsync Stats') + .option('-p, --show-progress', 'Show rsync Progress') + .option('-s, --show-stats', 'Show rsync Stats') program.parse(process.argv) diff --git a/packages/ssh-pool/src/Connection.js b/packages/ssh-pool/src/Connection.js index 248c556..a72849c 100644 --- a/packages/ssh-pool/src/Connection.js +++ b/packages/ssh-pool/src/Connection.js @@ -331,11 +331,11 @@ class Connection { tty: this.options.tty, }) - let additionalArgs = (typeof rsync === 'string' ? [rsync] : rsync); - if(cmdOptions.show_progress){ + const additionalArgs = (typeof rsync === 'string' ? [rsync] : rsync); + if(cmdOptions.showProgress){ additionalArgs.push("--progress"); } - if(cmdOptions.show_stats){ + if(cmdOptions.showStats){ additionalArgs.push("--stats"); } @@ -343,7 +343,7 @@ class Connection { src, dest, remoteShell: sshCommand, - additionalArgs: additionalArgs, + additionalArgs, excludes: ignores, })