Skip to content

Commit

Permalink
Update gulpfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi authored Jun 13, 2024
1 parent 958ea88 commit 876b1d4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,30 @@ function lint(done) {
.pipe(gulpif(isFixed, gulp.dest('./')));
};

function lint2(done) {
if (argv.nolint) {
return done();
}
const isFixed = function (file) {
return file.eslint != null && file.eslint.fixed;
}
return gulp.src([
'src/**/*.js',
'modules/**/*.js',
'libraries/**/*.js',
'creative/**/*.js',
'test/**/*.js',
'plugins/**/*.js',
'!plugins/**/node_modules/**',
'./*.js'
], { base: './' })
.pipe(eslint({ fix: !argv.nolintfix, quiet: !(typeof argv.lintWarnings === 'boolean' ? argv.lintWarnings : true) }))
.pipe(eslint.format('stylish'))
.pipe(eslint.failAfterError())
.pipe(gulpif(isFixed, gulp.dest('./')));
};


// View the code coverage report in the browser.
function viewCoverage(done) {
var coveragePort = 1999;
Expand Down

0 comments on commit 876b1d4

Please sign in to comment.