GULP: Modify a watched file in place without causing an infinite loop
问题 Im trying to use gulp and jscs to prevent code smell. I also want to use watch so that this happens when ever a change is made. The problem I'm running into is jscs is modify the source file that is being watched. This causes gulp to go into an infinite loop of jscs modifying the file and then watch seeing the change and firing off jscs again and again and again ... const gulp = require('gulp'); gulp.task('lint', function() { return gulp.src('/src/**/*.js') .pipe(jscs({ fix: true })) .pipe