From c1f27c682001c475a5a4eda4fe8add54fca15013 Mon Sep 17 00:00:00 2001 From: Thadeu Cotts Date: Tue, 24 Nov 2020 15:42:16 -0300 Subject: [PATCH] [style] [s]: update linter fixes --- packages/create-portal-app/index.js | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/create-portal-app/index.js b/packages/create-portal-app/index.js index 165eb872..a03bc788 100755 --- a/packages/create-portal-app/index.js +++ b/packages/create-portal-app/index.js @@ -53,24 +53,27 @@ async function promptPath() { * Main method to start CLI and validate inputs */ async function run(){ - if(typeof projectPath === 'string'){ - projectPath = projectPath.trim() + if (typeof projectPath === "string") { + projectPath = projectPath.trim(); } - if(!projectPath){ - const response = await promptPath() - if(typeof response.path === 'string'){ - projectPath = response.path.trim() + if (!projectPath) { + const response = await promptPath(); + if (typeof response.path === "string") { + projectPath = response.path.trim(); } } - if(!projectPath){ - console.log() - console.log('Please choose a name to your project:') - console.log() - console.log('Example:') - console.log(`${chalk.cyan(program.name())} ${chalk.yellow('ny-portal-app')}`) - console.log() + if (!projectPath) { + //TODO separate log methods + console.log(); + console.log("Please choose a name to your project:"); + console.log(); + console.log("Example:"); + console.log( + `${chalk.cyan(program.name())} ${chalk.yellow("ny-portal-app")}` + ); + console.log(); - process.exit(1) + process.exit(1); } /**