forked from route4me/route4me-nodejs-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gulp-linting enabled, now it is much simpler to develop
see route4me#16 - one step closer
- Loading branch information
1 parent
79b6d16
commit e030604
Showing
2 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
"use strict" | ||
|
||
const argv = require('yargs').argv; | ||
const argv = require("yargs").argv | ||
|
||
const gulp = require("gulp") | ||
const eslint = require('gulp-eslint') | ||
const gulpIf = require("gulp-if") | ||
const eslint = require("gulp-eslint") | ||
|
||
gulp.task('default', ['lint']) | ||
gulp.task("default", ["lint"]) | ||
|
||
gulp.task('lint', () => { | ||
return gulp.src(['gulpfile.js', '**/.js']) | ||
gulp.task("lint", () => { | ||
const fix = !!argv.fix | ||
return gulp.src(["gulpfile.js", "**/.js"]) | ||
.pipe(eslint({ | ||
"fix": !!argv.fix | ||
fix, | ||
})) | ||
.pipe(gulp.dest()) | ||
.pipe(eslint.format()) | ||
.pipe(gulpIf(fix, gulp.dest("./"))) | ||
.pipe(eslint.failAfterError()) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters