Skip to content

Commit 55d9a13

Browse files
author
Daniel Schmidt
committed
Exchanged jshint with eslint.
Unfortunately I had to remove some options as they are only supported in eslint > 0.10.0 and gulp-eslint seems to use a lower version. Closes #5.
1 parent 9c5a677 commit 55d9a13

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
lines changed

.eslintrc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"rules": {
3+
"no-console": 0,
4+
"no-extra-parens": 2,
5+
"no-reserved-keys": 2,
6+
"no-eq-null": 2,
7+
"no-extend-native": 2,
8+
"no-process-env": 2,
9+
"no-self-compare": 2,
10+
"no-void": 2,
11+
"no-warning-comments": [1, { "terms": ["todo", "@toto"], "location": "start" }],
12+
"vars-on-top": 2,
13+
"wrap-iife": [2, "inside"],
14+
"global-strict": [2, "always"],
15+
"new-cap": 0,
16+
"no-shadow": 0,
17+
"no-mixed-requires": 0,
18+
"no-new-require": 2,
19+
"brace-style": [2, "1tbs"],
20+
"comma-style": [2, "last"],
21+
"func-style": [2, "expression"],
22+
"no-inline-comments": true,
23+
"no-lonely-if": 2,
24+
"no-multiple-empty-lines": 2,
25+
"no-nested-ternary": 2,
26+
"one-var": 2,
27+
"padded-blocks": [2, "never"],
28+
"quote-props": [2, "as-needed"],
29+
"quotes": [2, "single"],
30+
"space-after-keywords": [2, "always"],
31+
"space-before-blocks": [2, "always"],
32+
"space-in-brackets": [2, "never"],
33+
"space-in-parens": [2, "never"],
34+
"spaced-line-comment": [2, "always"],
35+
},
36+
"env":{
37+
"mocha": true,
38+
"node": true
39+
}
40+
}

gulpfile.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var gulp = require('gulp'),
22
del = require('del'),
33
mocha = require('gulp-mocha'),
4-
jshint = require('gulp-jshint'),
4+
eslint = require('gulp-eslint'),
55
header = require('gulp-header'),
66
rename = require('gulp-rename'),
77
uglify = require('gulp-uglify'),
@@ -11,9 +11,10 @@ var gulp = require('gulp'),
1111

1212
gulp.task('lint', function () {
1313
return gulp
14-
.src('./src/*.js')
15-
.pipe(jshint())
16-
.pipe(jshint.reporter('jshint-stylish'));
14+
.src(['src/**/*.js', './tests/**/*.js'])
15+
.pipe(eslint())
16+
.pipe(eslint.format())
17+
.pipe(eslint.failOnError());
1718
});
1819

1920
gulp.task('clean', ['lint'], function (cb) {
@@ -70,4 +71,4 @@ gulp.task('watch', function () {
7071
gulp.watch(['./.gitdown/*'], ['gitdown']);
7172
});
7273

73-
gulp.task('default', ['test']);
74+
gulp.task('default', ['test']);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"gitdown": "^1.0.6",
2323
"gulp": "^3.8.9",
2424
"gulp-browserify": "^0.5.0",
25+
"gulp-eslint": "^0.2.0",
2526
"gulp-header": "^1.2.2",
26-
"gulp-jshint": "^1.8.5",
2727
"gulp-mocha": "^1.1.1",
2828
"gulp-rename": "^1.2.0",
2929
"gulp-uglify": "^1.0.1",

0 commit comments

Comments
 (0)