Added linter task to gulp. Added more severe rules to jshint
This commit is contained in:
parent
95b49ea6da
commit
666b94bb2a
18
.jshintrc
Normal file
18
.jshintrc
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"bitwise": true,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"indent": 4,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"nonew": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"esversion": 6,
|
||||
"sub": true,
|
||||
"browser": true,
|
||||
"node": true
|
||||
}
|
||||
24
gulpfile.js
24
gulpfile.js
@ -8,6 +8,9 @@ var rename = require('gulp-rename');
|
||||
var uglify = require('gulp-uglify');
|
||||
var gutil = require('gulp-util');
|
||||
var through = require('through');
|
||||
var jshint=require('gulp-jshint');
|
||||
|
||||
|
||||
var os = require('os');
|
||||
var File = gutil.File;
|
||||
|
||||
@ -167,6 +170,27 @@ gulp.task("scripts", ['workers','shaders'], function(){
|
||||
return;
|
||||
});
|
||||
|
||||
gulp.task('linter', function(){
|
||||
gulp.src(paths.potree)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
gulp.src(paths.laslaz)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
gulp.src(workers.laslaz)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
gulp.src(workers.LASDecoder)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
gulp.src(workers.BinaryDecoder)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
gulp.src(workers.GreyhoundBinaryDecoder)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter('default'));
|
||||
});
|
||||
|
||||
gulp.task('build', ['scripts']);
|
||||
|
||||
gulp.task('watch', function() {
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"shadow": true,
|
||||
"eqnull": true,
|
||||
"laxbreak": true
|
||||
}
|
||||
@ -8,7 +8,9 @@
|
||||
"gulp-size": "*",
|
||||
"gulp-concat": "*",
|
||||
"gulp-uglify": "*",
|
||||
"gulp-rename": "*"
|
||||
"gulp-rename": "*",
|
||||
"jshint": "*",
|
||||
"gulp-jshint": "*"
|
||||
},
|
||||
"author": {},
|
||||
"license": "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user