Sto provando eslint con gulp. Ho creato un compito come questo:Come eseguire gulp eslint in modo continuo e automatico durante il fissaggio dei file - come configurare l'orologio
gulp.task('lint', function() {
return gulp.src([
'components/myjs.js'
])
// eslint() attaches the lint output to the eslint property
// of the file object so it can be used by other modules.
.pipe(eslint())
// eslint.format() outputs the lint results to the console.
// Alternatively use eslint.formatEach() (see Docs).
.pipe(eslint.format())
// To have the process exit with an error code (1) on
// lint error, return the stream and pipe to failOnError last.
.pipe(eslint.failOnError());
});
quando corro gulp lint
mi dice un sacco di errori. Ora sto provando a risolverli uno per uno. Ma devo rieseguire manualmente gulp lint
affinché mi dia un rapporto aggiornato. Come posso configurarlo in modo che venga automaticamente riavviato ogni volta che aggiorno 'components/myjs.js'
?
Grazie!! Ora ho appena eseguito gulp watch. – techguy2000
Prego! :) –