Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
gulp.task('lint', function () {
return gulp
.src('src/js/**/*.js')
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'))
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('jscs', function() {
return gulp.src('./src/*.js')
.pipe(jscs())
.pipe(jscs.reporter());
});
gulp.task('style', function () {
return gulp.src(allSourceFiles)
.pipe(jscs())
.pipe(jscs.reporter(stylishJscs.path))
.pipe(jscs.reporter('fail'));
});
gulp.task('js-lint', function onJsLint() {
return gulp.src(paths.lib + paths.files.unminified)
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError())
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
});
gulp.task('jscs', function () {
return gulp.src(LINT_DIRS)
.pipe(jscs())
.pipe(jscs.reporter());
});
gulp.task('lint', function () {
return gulp
.src('src/js/**/*.js')
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'))
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
gulp.task('style', function () {
return gulp.src(allSourceFiles)
.pipe(jscs())
.pipe(jscs.reporter(stylishJscs.path))
.pipe(jscs.reporter('fail'));
});
gulp.task('js-lint', function onJsLint() {
return gulp.src(paths.lib + paths.files.unminified)
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError())
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
});
gulp.task('lint', function() {
return gulp.src([paths['src.scripts'], paths['src.tests'], '!' + paths['src.fixtures']])
.pipe(jshint())
.pipe(jshint.reporter(jshintStylish))
.pipe(jshint.reporter('fail'))
.pipe(jscs())
.pipe(jscs.reporter(jscsStylish))
.pipe(jscs.reporter('fail'))
.pipe(complexity({
cyclomatic: [5, 15, 25],
halstead: [15, 20, 25],
maintainability: 100,
breakOnErrors: false
}));
});
function jscsDevelopment(done) {
gulp.src(files ? files : SOURCE)
.pipe(jscs())
.pipe(jscs.reporter())
.pipe(jscs.reporter('fail'));
done();
}