Add lint:fix command to gulp and npm-scripts
This commit is contained in:
parent
20cb6a76dd
commit
c1eb8f16dc
|
@ -161,6 +161,13 @@ gulp.task('lint', function () {
|
|||
.pipe(eslint.failAfterError())
|
||||
});
|
||||
|
||||
gulp.task('lint:fix', function () {
|
||||
return gulp.src(['app/**/*.js', 'ui/**/*.js', 'mascara/src/*.js', 'mascara/server/*.js', '!node_modules/**', '!dist/firefox/**', '!docs/**', '!app/scripts/chromereload.js', '!mascara/test/jquery-3.1.0.min.js'])
|
||||
.pipe(eslint(Object.assign(fs.readFileSync(path.join(__dirname, '.eslintrc')), {fix: true})))
|
||||
.pipe(eslint.format())
|
||||
.pipe(eslint.failAfterError())
|
||||
});
|
||||
|
||||
/*
|
||||
gulp.task('default', ['lint'], function () {
|
||||
// This will only run if the lint task is successful...
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"test:mascara:build:background": "browserify mascara/src/background.js -o dist/mascara/background.js",
|
||||
"test:mascara:build:tests": "browserify test/integration/lib/first-time.js -o dist/mascara/tests.js",
|
||||
"lint": "gulp lint",
|
||||
"lint:fix": "gulp lint:fix",
|
||||
"disc": "gulp disc --debug",
|
||||
"announce": "node development/announcer.js",
|
||||
"generateNotice": "node notices/notice-generator.js",
|
||||
|
|
Loading…
Reference in New Issue