-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update dependencies and devDependencies (#224)
Highlights: * update ESLint form v4 to v5 https://eslint.org/docs/user-guide/migrating-to-5.0.0 * update gulp form v3 to v4 fix #228 close #229 close #230 close #231
- Loading branch information
Showing
13 changed files
with
3,054 additions
and
2,149 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,8 +1,7 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- node | ||
- '4' | ||
- '6' | ||
before_install: npm install --global npm | ||
script: npm run-script pretest && npm run-script coverage | ||
after_script: npx istanbul-coveralls | ||
after_script: npx coveralls < coverage/lcov.info |
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
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
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
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
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,39 +1,31 @@ | ||
'use strict'; | ||
|
||
// npm install gulp gulp-eslint gulp-if | ||
// npm install gulp@next gulp-eslint gulp-if | ||
|
||
const gulp = require('gulp'); | ||
const {dest, src, task} = require('gulp'); | ||
const gulpIf = require('gulp-if'); | ||
const eslint = require('..'); | ||
|
||
function isFixed(file) { | ||
// Has ESLint fixed the file contents? | ||
return file.eslint != null && file.eslint.fixed; | ||
} | ||
|
||
gulp.task('lint-n-fix', () => { | ||
|
||
return gulp.src('../test/fixtures/*.js') | ||
.pipe(eslint({ | ||
fix: true | ||
})) | ||
task('lint-n-fix', () => { | ||
return src('../test/fixtures/*.js') | ||
.pipe(eslint({fix: true})) | ||
.pipe(eslint.format()) | ||
// if fixed, write the file to dest | ||
.pipe(gulpIf(isFixed, gulp.dest('../test/fixtures'))); | ||
.pipe(gulpIf(isFixed, dest('../test/fixtures'))); | ||
}); | ||
|
||
gulp.task('flag-n-fix', () => { | ||
// This is a *very* basic CLI flag check. | ||
// For a more robust method, check out [yargs](https://www.npmjs.com/package/yargs) | ||
const hasFixFlag = (process.argv.slice(2).indexOf('--fix') >= 0); | ||
task('flag-n-fix', () => { | ||
const hasFixFlag = process.argv.slice(2).includes('--fix'); | ||
|
||
return gulp.src('../test/fixtures/*.js') | ||
.pipe(eslint({ | ||
fix: hasFixFlag | ||
})) | ||
return src('../test/fixtures/*.js') | ||
.pipe(eslint({fix: hasFixFlag})) | ||
.pipe(eslint.format()) | ||
// if fixed, write the file to dest | ||
.pipe(gulpIf(isFixed, gulp.dest('../test/fixtures'))); | ||
.pipe(gulpIf(isFixed, dest('../test/fixtures'))); | ||
}); | ||
|
||
gulp.task('default', ['lint-n-fix']); | ||
task('default', ['lint-n-fix']); |
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
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,31 +1,24 @@ | ||
'use strict'; | ||
|
||
// npm install gulp gulp-eslint | ||
// npm install gulp@next gulp-eslint | ||
|
||
const gulp = require('gulp'); | ||
const {src, task} = require('gulp'); | ||
const eslint = require('..'); | ||
|
||
gulp.task('quiet-lint', () => { | ||
return gulp.src('../test/fixtures/*.js') | ||
.pipe(eslint({ | ||
// only report errors | ||
quiet: true | ||
})) | ||
task('quiet-lint', () => { | ||
return src('../test/fixtures/*.js') | ||
.pipe(eslint({quiet: true})) | ||
.pipe(eslint.format()); | ||
}); | ||
|
||
|
||
|
||
function isWarning(message) { | ||
return message.severity === 1; | ||
} | ||
|
||
gulp.task('lint-warnings', () => { | ||
return gulp.src('../test/fixtures/*.js') | ||
.pipe(eslint({ | ||
quiet: isWarning | ||
})) | ||
task('lint-warnings', () => { | ||
return src('../test/fixtures/*.js') | ||
.pipe(eslint({quiet: isWarning})) | ||
.pipe(eslint.format()); | ||
}); | ||
|
||
gulp.task('default', ['quiet-lint','lint-warnings']); | ||
task('default', ['quiet-lint','lint-warnings']); |
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
Oops, something went wrong.