Skip to content

Commit fafb0f0

Browse files
committed
Changed jshint to eslint
1 parent 7958694 commit fafb0f0

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

gulpfile.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var plumber = require('gulp-plumber');
33
var gutil = require('gulp-util');
44
var notify = require('gulp-notify');
55
var uglify = require('gulp-uglify');
6-
var jshint = require('gulp-jshint');
6+
var eslint = require('gulp-eslint');
77
var rename = require('gulp-rename');
88

99
var files = 'src/*.js';
@@ -12,23 +12,18 @@ gulp.task('uglify', function() {
1212
return gulp.src(files)
1313
.pipe(plumber())
1414
.pipe(uglify({preserveComments: 'license'}))
15-
.on('error', notify.onError("Error: <%= error.message %>"))
15+
.on('error', notify.onError('Error: <%= error.message %>'))
1616
.pipe(rename({suffix: '.min'}))
1717
.pipe(gulp.dest('dist'));
1818
});
1919

2020
gulp.task('lint', function() {
2121
return gulp.src(files)
2222
.pipe(plumber())
23-
.pipe(jshint())
24-
.pipe(notify(function (file) {
25-
if (file.jshint.success) {
26-
return false;
27-
}
28-
29-
return file.relative + " (" + file.jshint.results.length + " errors)\n";
30-
}))
31-
.pipe(jshint.reporter('default'));
23+
.pipe(eslint())
24+
.pipe(eslint.format())
25+
.pipe(eslint.failAfterError())
26+
.on('error', notify.onError('Error: <%= error.message %>'));
3227
});
3328

3429
gulp.task('copy', function() {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"homepage": "https://github.com/maciej-gurban/responsive-bootstrap-toolkit",
1818
"devDependencies": {
1919
"gulp": "^3.9.1",
20-
"gulp-jshint": "^2.0.1",
20+
"gulp-eslint": "^2.0.0",
2121
"gulp-notify": "^2.2.0",
2222
"gulp-plumber": "^1.1.0",
2323
"gulp-rename": "^1.2.2",

0 commit comments

Comments
 (0)