mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-25 01:14:02 -05:00
Gulp's `gulp.src` can also take an [array of globs](https://github.com/gulpjs/gulp/blob/master/docs/API.md), which makes iterating through all the directories manually rather redundant.
30 lines
702 B
JavaScript
30 lines
702 B
JavaScript
var gulp = require('gulp'),
|
|
jshintStylish = require('jshint-stylish'),
|
|
gutil = require('gulp-util'),// Currently unused, but gulp strongly suggested I install...
|
|
jshint = require('gulp-jshint'),
|
|
jsHintOptions = {
|
|
"trailing": true,
|
|
"nonbsp": true,
|
|
"noarg": true,
|
|
"latedef": true,
|
|
|
|
"sub": true,
|
|
"smarttabs": true,
|
|
"evil": true,
|
|
"esnext": true,
|
|
"node": true,
|
|
"eqeqeq": false
|
|
};
|
|
|
|
gulp.task('lint', function() {
|
|
var directories = ['./*.js', './data/*.js', './mods/*.js', './config/*.js'];
|
|
console.log("\n\n*** Linting JavaScript Files ***\n\n");
|
|
|
|
gulp.src(directories)
|
|
.pipe(jshint(jsHintOptions))
|
|
.pipe(jshint.reporter(jshintStylish));
|
|
|
|
});
|
|
|
|
gulp.task('default', ['lint']);
|