diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..ba49d313 --- /dev/null +++ b/.jshintrc @@ -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 +} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 904db75b..3afc33d5 100644 --- a/gulpfile.js +++ b/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() { diff --git a/jshint_config.js b/jshint_config.js deleted file mode 100644 index 07b5aaf6..00000000 --- a/jshint_config.js +++ /dev/null @@ -1,5 +0,0 @@ -{ - "shadow": true, - "eqnull": true, - "laxbreak": true -} \ No newline at end of file diff --git a/package.json b/package.json index 8a0a0f27..23d7c1cc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,9 @@ "gulp-size": "*", "gulp-concat": "*", "gulp-uglify": "*", - "gulp-rename": "*" + "gulp-rename": "*", + "jshint": "*", + "gulp-jshint": "*" }, "author": {}, "license": "",