reporter.js
function (lintFile) {
  var deferred = new Deferred();

  parseJslintXml(lintFile, function (err, lintErrors) {
    if (lintErrors) {
      deferred.resolve(lintErrors);
    } else {
      if (err && err.code === 'ENOENT') {
        console.warn('No jslint xml file found at:', lintFile);
      } else if (err) {
        console.log(err);
      }
      deferred.reject();
    }
  });

  return deferred.promise;
}
function (lintFile) {
  var deferred = new Deferred();

  parseJslintXml(lintFile, function (err, lintErrors) {
    if (lintErrors) {
      deferred.resolve(lintErrors);
    } else {
      if (err && err.code === 'ENOENT') {
        console.warn('No jslint xml file found at:', lintFile);
      } else if (err) {
        console.log(err);
      }
      deferred.reject();
    }
  });

  return deferred.promise;
}
function ( lintFile ) { var deferred = new Deferred ( ) ; parseJslintXml ( lintFile , function ( err , lintErrors ) { if ( lintErrors ) { deferred . resolve ( lintErrors ) ; } else { if ( err && err . code === 'ENOENT' ) { console . warn ( 'No jslint xml file found at:' , lintFile ) ; } else if ( err ) { console . log ( err ) ; } deferred . reject ( ) ; } } ) ; return deferred . promise ; }
Get the lint errors from an jslint xml file.o
@param {String} lintFile The path of the jslint xml file.
@return {Deferred} A promise object. It will resolve only if there are jslint errors found.
Get the lint errors from an jslint xml file . o