I am currently using JSHint with a Gulp workflow and would like to suppress semicolon errors when working with JavaScript.
I am currently using gulp-jshint. How to enable the "asi" flag in Gulp so that errors disappear?
Type of error I get:
~ / bootstrap-4.0.0-alpha / js / src / modal.js: line 1, col 26, There is no semicolon.
Although this is valid JavaScript. Any help would be appreciated!
Here is my Gulp file in case it helps:
// Load Node Modules/Plugins var gulp = require('gulp'); var concat = require('gulp-concat'); var del = require('del'); var sass = require('gulp-sass'); var uglify = require('gulp-uglify'); var jshint = require('gulp-jshint'); // Process Styles gulp.task('styles', function() { return gulp.src('scss/*.scss') .pipe(sass()) .pipe(gulp.dest('dist')); }); // Process Scripts gulp.task('scripts', function() { return gulp.src('js/src/*.js') .pipe(jshint()) .pipe(jshint.reporter('default')) .pipe(concat('bootstrap.js')) .pipe(uglify()) .pipe(gulp.dest('dist')); }); gulp.task('clean', del.bind(null, ['.tmp', 'dist'])); // Watch tasks gulp.task('watch', function() { gulp.watch('scss/*.scss', 'styles'); gulp.watch('js/src/*.js', 'scripts'); }); gulp.task('build', ['styles', 'scripts', 'watch']); gulp.task('default', ['clean'], () => { gulp.start('build'); });
javascript jshint twitter-bootstrap gulp
Marc rudkowski
source share