diff --git a/src/flow-control/input-handler.ts b/src/flow-control/input-handler.ts index 779607ec..74e9eb0b 100644 --- a/src/flow-control/input-handler.ts +++ b/src/flow-control/input-handler.ts @@ -72,7 +72,7 @@ export class InputHandler implements FlowController { input = data; } - if (command && command.stdin) { + if (command?.stdin) { command.stdin.write(input); } else { this.logger.logGlobalEvent( diff --git a/src/logger.ts b/src/logger.ts index 22cf6696..66c4d44a 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -95,9 +95,9 @@ export class Logger { const endLength = Math.floor(prefixLength / 2); const beginningLength = prefixLength - endLength; - const beginnning = text.slice(0, beginningLength); + const beginning = text.slice(0, beginningLength); const end = text.slice(text.length - endLength, text.length); - return beginnning + ellipsis + end; + return beginning + ellipsis + end; } private getPrefixesFor(command: Command): Record { @@ -153,7 +153,7 @@ export class Logger { colorText(command: Command, text: string) { let color: chalk.Chalk; - if (command.prefixColor && command.prefixColor.startsWith('#')) { + if (command.prefixColor?.startsWith('#')) { color = this.chalk.hex(command.prefixColor); } else { const defaultColor = _.get(this.chalk, defaults.prefixColors, this.chalk.reset);