diff --git a/packages/commands/validate/src/index.ts b/packages/commands/validate/src/index.ts index 63e61d134a..5891691e61 100644 --- a/packages/commands/validate/src/index.ts +++ b/packages/commands/validate/src/index.ts @@ -375,12 +375,7 @@ function printInvalidDocuments( } function renderErrors(sourceName: string, errors: GraphQLError[], isError = false): string[] { - const errorsAsString = errors.map(e => ` - ${bolderize(e.message)}`).join('\n'); - - return [ - isError ? chalk.redBright('error') : chalk.yellowBright('warn'), - `in ${sourceName}:\n\n`, - errorsAsString, - '\n\n', - ]; + return errors.map(e => { + return `${isError ? chalk.redBright('error') : chalk.yellowBright('warn')} in ${sourceName}: ${bolderize(e.message)}` + }) }