mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 15:27:17 +00:00
chore(gulp): make linter exit with a non-zero code (#510)
Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
c4c8e2c038
commit
2f3118e4c3
15
gulpfile.js
15
gulpfile.js
@ -21,6 +21,7 @@ const jscs = require('gulp-jscs');
|
||||
const jshint = require('gulp-jshint');
|
||||
const jshintStylish = require('jshint-stylish');
|
||||
const sass = require('gulp-sass');
|
||||
const sequence = require('gulp-sequence');
|
||||
|
||||
const paths = {
|
||||
scripts: [
|
||||
@ -40,14 +41,22 @@ gulp.task('sass', function() {
|
||||
.pipe(gulp.dest('./build/css'));
|
||||
});
|
||||
|
||||
gulp.task('lint', function() {
|
||||
gulp.task('lint:jshint', function() {
|
||||
return gulp.src(paths.scripts)
|
||||
.pipe(jshint())
|
||||
.pipe(jshint.reporter(jshintStylish))
|
||||
.pipe(jscs())
|
||||
.pipe(jscs.reporter());
|
||||
.pipe(jshint.reporter('fail'));
|
||||
});
|
||||
|
||||
gulp.task('lint:jscs', function() {
|
||||
return gulp.src(paths.scripts)
|
||||
.pipe(jscs())
|
||||
.pipe(jscs.reporter())
|
||||
.pipe(jscs.reporter('fail'));
|
||||
});
|
||||
|
||||
gulp.task('lint', sequence('lint:jshint', 'lint:jscs'));
|
||||
|
||||
gulp.task('watch', [ 'lint', 'sass' ], function() {
|
||||
gulp.watch(paths.scripts, [ 'lint' ]);
|
||||
gulp.watch(paths.sass, [ 'sass' ]);
|
||||
|
@ -101,6 +101,7 @@
|
||||
"gulp-jscs": "^3.0.2",
|
||||
"gulp-jshint": "^2.0.0",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"gulp-sequence": "^0.4.5",
|
||||
"jshint": "^2.9.1",
|
||||
"jshint-stylish": "^2.0.1",
|
||||
"jsonfile": "^2.3.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user