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 is the same file as server.js. Without any fixes. How to fix it?
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 is the same file as server.js. Without any fixes. How to fix it?
You can read about base
option to modify a lot of scripts together here and use it like this:
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));
});
© 2022 - 2024 — McMap. All rights reserved.
.pipe(jscs.reporter())
after your frist jscs, it might give some information, maybe it's not loading the rules ect. – Floc