From b2f314341f92d95f89da54c156099c6db36fc549 Mon Sep 17 00:00:00 2001 From: Ankit Chaudhary <46367738+Ankitchaudharyy@users.noreply.github.com> Date: Mon, 10 Oct 2022 15:17:20 +0530 Subject: [PATCH] refactor: remove nested template literals (#337) (#344) --- src/lib/logger.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/logger.ts b/src/lib/logger.ts index 7fec1a7d7..11add8296 100644 --- a/src/lib/logger.ts +++ b/src/lib/logger.ts @@ -149,6 +149,7 @@ export const logTypeScriptMessage = (message: string) => { export const logTypeScriptError = (code: number, message: string, fileName: string, line: number, character: number) => { const fileInfo = `${chalk.cyan(fileName)}:${chalk.yellow(line + 1)}:${chalk.yellow(character + 1)}` - const error = `${chalk.red('error')} ${chalk.gray(`TS${code}:`)}` - console.error(`${TSLogo} ${fileInfo} - ${error} ${message}`) + const error = chalk.red('error') + const errorCode = chalk.gray(`TS${code}:`) + console.error(`${TSLogo} ${fileInfo} - ${error} ${errorCode} ${message}`) }