cli.js
function interceptReporter(reporter, filesMap){
  if(!reporter) reporter = require('jshint/src/reporters/default').reporter;
  return function(results, data, opts){
    if (filesMap) {
      results.forEach(function(result){
        result.file = filesMap[result.file];
      });
    }
    return reporter(results, data, opts);
  };
}
function interceptReporter(reporter, filesMap){
  if(!reporter) reporter = require('jshint/src/reporters/default').reporter;
  return function(results, data, opts){
    if (filesMap) {
      results.forEach(function(result){
        result.file = filesMap[result.file];
      });
    }
    return reporter(results, data, opts);
  };
}
function interceptReporter ( reporter , filesMap ) { if ( ! reporter ) reporter = require ( 'jshint/src/reporters/default' ) . reporter ; return function ( results , data , opts ) { if ( filesMap ) { results . forEach ( function ( result ) { result . file = filesMap [ result . file ] ; } ) ; } return reporter ( results , data , opts ) ; } ; }
Intercept configured reporter and change file names so it looks
like nothing happened.
@param  {Reporter} reporter JSHint reporter
@param  {Object}   filesMap Map related transformed files to original file paths.
@return {Function}          Wrapper around configured reporter. Same arity as reporter.
Intercept configured reporter and change file names so it looks like nothing happened .