Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function scripts() {
console.info("Running scripts...");
gulp.src(paths.scriptsDir + '/*-library.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(uglify())
.pipe(header(banner, {
packageInfo: packageInfo
}))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest(paths.scriptsDir));
}
return function dev() {
return gulp.src(srcs, {base: paths.src})
.pipe(wrap('(function(){"use strict";<%= contents %>}());'))
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(gulp.dest(paths.dest))
.on('end', function() {
gutil.log(gutil.colors.green('✔ JS Dev'), 'Finished');
});
};
}
return function dev() {
return gulp.src(srcs, {base: paths.src})
.pipe(wrap('(function(){"use strict";<%= contents %>}());'))
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(gulp.dest(paths.dest))
.on('end', function() {
gutil.log(gutil.colors.green('✔ JS Dev'), 'Finished');
});
};
}
function lint () {
return gulp.src(['test/**/*.js', 'index.js', 'contrib/cover.js', 'contrib/coverage_store.js', 'contrib/reporters/**/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('default'));
}
function lint() {
return gulp.src('www/js/**/app.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
}
module.exports = function lint() {
//Files for testing
let files = ['build/**/*.js'].concat(
APP_JS_SRC,
APP_TEST_SRC
);
return gulp.src(files)
.pipe(cached('lint'))
.pipe(jshint())
.pipe(jscs())
.on('error', function() {})
.pipe(stylish.combineWithHintResults())
.pipe(jshint.reporter('jshint-stylish'));
};
tasks.lint = gulp.series(function lint() {
return gulp.src([config.dragular.scripts])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'));
});
function lint() {
return gulp.src(files)
.pipe(jshint(config.src.jshintrc))
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'))
}
function lint() {
return gulp.src([
'src/**/*.js',
'tests/**/*.spec.js'
]).pipe(cached('lint'))
.pipe(jshint())
.pipe(jscs())
.on('error', noop)
.pipe(stylish.combineWithHintResults())
.pipe(jshint.reporter('jshint-stylish'));
}
function lint() {
return gulp.src(['tests/*.spec.js', 'tests/helpers/*.js', 'avrgirl-arduino.js', 'lib/*.js'])
.pipe(jshint())
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
};