2014-08-28 21:40:18 +00:00
|
|
|
var gulp = require('gulp');
|
|
|
|
var jshint = require('gulp-jshint');
|
|
|
|
var stylish = require('jshint-stylish');
|
|
|
|
var cache = require('gulp-cached');
|
|
|
|
var paths = require('./paths.js');
|
|
|
|
|
|
|
|
|
|
|
|
gulp.task('jshint', function () {
|
|
|
|
return gulp.src([paths.src.scripts, paths.src.exclude.libs])
|
2014-08-30 04:32:09 +00:00
|
|
|
.pipe(cache('jshint'))
|
2014-08-28 21:40:18 +00:00
|
|
|
.pipe(jshint({
|
|
|
|
'-W030': false,
|
|
|
|
'-W064': false,
|
2015-01-30 01:14:38 +00:00
|
|
|
'-W097': false, //Use the function form of “use strict”
|
|
|
|
'-W100': false, //Silently deleted characters (in locales)
|
2014-08-28 21:40:18 +00:00
|
|
|
'undef': true,
|
|
|
|
'globals': {
|
2015-02-03 01:18:45 +00:00
|
|
|
'module': true,
|
2014-08-28 21:40:18 +00:00
|
|
|
'require': true,
|
|
|
|
'define': true,
|
|
|
|
'window': true,
|
|
|
|
'document': true,
|
|
|
|
'console': true
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
.pipe(jshint.reporter(stylish));
|
2015-01-30 01:14:38 +00:00
|
|
|
});
|