index.js
/*
 * returns an Error object from a standard `results` object.
 */
returns an Error object from a standard `results` object.
returns an Error object from a standard ` results ` object .
function errorify (res) {
  var cwd = process.cwd()
  var count = res.errorCount + res.warningCount
  var err = new Error('' + count + (count === 1 ? ' issue' : ' issues') + ' found:')
  err.stack = '' + err.message
  res.results.forEach(function (result) {
    result.messages.forEach(function (message) {
      err.stack += ('\n    ' +
        result.filePath.replace(cwd, '').replace(/^\//, '') +
        ':' + message.line + ':' + message.column + ': ' +
        message.message + ' (' + message.ruleId + ')')
    })
  })
  return err
}
function errorify ( res ) { var cwd = process . cwd ( ) var count = res . errorCount + res . warningCount var err = new Error ( '' + count + ( count === 1 ? ' issue' : ' issues' ) + ' found:' ) err . stack = '' + err . message res . results . forEach ( function ( result ) { result . messages . forEach ( function ( message ) { err . stack += ( '\n    ' + result . filePath . replace ( cwd , '' ) . replace ( / ^\/ / , '' ) + ':' + message . line + ':' + message . column + ': ' + message . message + ' (' + message . ruleId + ')' ) } ) } ) return err }
returns an Error object from a standard `results` object.
returns an Error object from a standard ` results ` object .