Gulp -jscs autofix not working

I have the following code in my gulpfile.js

gulp.src(['server.js']) .pipe(jscs({fix: true})) .pipe(gulp.dest('prod-app')); 

But in prod-app / server.js there is the same file as server.js. Without any corrections. How to fix it?

+7
javascript gulp jscs gulp-jscs
source share
1 answer

You can read about the base option to change a large number of scripts here and use it as follows:

gulp.task('lint-jscs-fix', function() { return gulp.src(quantumArtScripts, { base: './' }) .pipe(jscs({ fix: true })) .pipe(jscs.reporter()) // log all errors that should be fixed .pipe(gulp.dest('.')) // destination of files .on('error', console.error.bind(console)); });

0
source share

All Articles