src/resolveTaskFn.js
function makeErr(linter, result, context = {}) {
  // Indicate that some linter will fail so we don't update the index with formatting changes
  context.hasErrors = true // eslint-disable-line no-param-reassign
  const { stdout, stderr, killed, signal } = result
  if (killed || (signal && signal !== '')) {
    return throwError(
      `${symbols.warning} ${chalk.yellow(`${linter} was terminated with ${signal}`)}`
    )
  }
  return throwError(dedent`${symbols.error} ${chalk.redBright(
    `${linter} found some errors. Please fix them and try committing again.`
  )}
  ${stdout}
  ${stderr}
  `)
}
function makeErr(linter, result, context = {}) {
  // Indicate that some linter will fail so we don't update the index with formatting changes
  context.hasErrors = true // eslint-disable-line no-param-reassign
  const { stdout, stderr, killed, signal } = result
  if (killed || (signal && signal !== '')) {
    return throwError(
      `${symbols.warning} ${chalk.yellow(`${linter} was terminated with ${signal}`)}`
    )
  }
  return throwError(dedent`${symbols.error} ${chalk.redBright(
    `${linter} found some errors. Please fix them and try committing again.`
  )}
  ${stdout}
  ${stderr}
  `)
}
function makeErr ( linter , result , context = { } ) { // Indicate that some linter will fail so we don't update the index with formatting changes context . hasErrors = true // eslint-disable-line no-param-reassign const { stdout , stderr , killed , signal } = result if ( killed || ( signal && signal !== '' ) ) { return throwError ( ` ${ symbols . warning } ${ chalk . yellow ( ` ${ linter } ${ signal } ` ) } ` ) } return throwError ( dedent ` ${ symbols . error } ${ chalk . redBright ( ` ${ linter } ` ) } ${ stdout } ${ stderr } ` ) }
Create a failure message dependding on process result.

@param {string} linter
@param {Object} result
@param {string} result.stdout
@param {string} result.stderr
@param {boolean} result.failed
@param {boolean} result.killed
@param {string} result.signal
@param {Object} context (see https://github.com/SamVerschueren/listr#context)
@returns {Error}
Create a failure message dependding on process result .