var gulp = require('gulp');
var $ = require('gulp-load-plugins')();

var jshint = $.jshint;
var combine = require('stream-combiner');
var growly = require('growly');
var jscs = $.jscs;
var constants = require('../common/constants')();

gulp.task('jshint', function() {
    gulp.src(constants.lint)
        .pipe(jshint({
            lookup: true
        }))

    .pipe(jshint.reporter('jshint-stylish'))
        .on('end', function() {
            growly.notify('All files passed', {
                title: 'PASSED - JsHint',
                icon: constants.growly.successIcon
            });
        })
        .pipe(jshint.reporter('fail'))
        .on('error', function() {

            growly.notify('One or more jshint error', {
                title: 'FAILED - JsHint',
                icon: constants.growly.failedIcon
            });

        })
        .on('end', function() {
            growly.notify('All files passed', {
                title: 'PASSED - JsHint',
                icon: constants.growly.successIcon
            });

        });
});

gulp.task('jscs', function() {
    var hasError = false;
    var combined = combine(
        gulp.src(constants.lint),
        jscs());

    combined.on('error', function(err) {
        hasError = true;
        console.log(err.toString());
        growly.notify('One or more jscs error', {
            title: 'FAILED - Jscs',
            icon: constants.growly.failedIcon
        });

    });

    combined.on('end', function() {
        if (!hasError) {
            growly.notify('All files passed', {
                title: 'PASSED - Jscs',
                icon: constants.growly.successIcon
            });
        }

    });

});

gulp.task('lint', ['jshint', 'jscs']);

@@ -351,17 +351,20 @@
     %7D))%0A
-%0A
+    
     .pip
@@ -404,208 +404,8 @@
 '))%0A
-        .on('end', function() %7B%0A            growly.notify('All files passed', %7B%0A                title: 'PASSED - JsHint',%0A                icon: constants.growly.successIcon%0A            %7D);%0A        %7D)%0A
     
@@ -473,17 +473,16 @@
 ion() %7B%0A
-%0A
         
@@ -629,33 +629,32 @@
             %7D);%0A
-%0A
         %7D)%0A     
@@ -813,32 +813,32 @@
 wly.successIcon%0A
+
             %7D);%0A
@@ -833,25 +833,24 @@
         %7D);%0A
-%0A
         %7D);%0A

Clean lint.js file