spalger / gulp-jshint

JSHint plugin for gulp
MIT License
419 stars 65 forks source link

Should be fix custom reporter snippet #147

Closed devtip closed 8 years ago

devtip commented 8 years ago

The Page Link: Custom Reporter

The snippet should be look like as follow...

    var myReporter = map ( function ( file , cb ) {
      if ( !file.jshint.success ) {
        console.log('JSHINT fail in '+file.path);

        file.jshint.results.forEach(function (err) {
          if (err) {
            var err = err.error; // Add this line
            console.log(' ' + file.path + ': line ' + err.line + ', col ' + err.character + ', code ' + err.code + ', ' + err.reason);
          }
        });
      }
      cb(null, file);
    });
spalger commented 8 years ago

Fixed, thanks!