Skip to content

Commit 865abc4

Browse files
committed
Fix jshint config
1 parent b28985f commit 865abc4

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

gulpfile.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
var gulp = require('gulp'),
33
shell = require('gulp-shell'),
44
jshint = require('gulp-jshint'),
5-
jasmine = require('gulp-jasmine');
5+
jasmine = require('gulp-jasmine'),
6+
stylish = require('jshint-stylish');
67

78
gulp.task('jsdoc', shell.task([
89
'./node_modules/.bin/jsdoc -c ./doc-config.json',
@@ -11,12 +12,13 @@ gulp.task('jsdoc', shell.task([
1112
gulp.task('lint', function () {
1213
return gulp.src(['./src/**/*.js'], ['./test/**/*.js'])
1314
.pipe(jshint())
14-
.pipe(jshint.reporter('default'));
15+
.pipe(jshint.reporter(stylish))
16+
.pipe(jshint.reporter('fail'));
1517
});
1618

1719
gulp.task('test', function () {
1820
return gulp.src('test/**/*.spec.js')
1921
.pipe(jasmine());
2022
});
2123

22-
gulp.task('build', ['lint', 'test']);
24+
gulp.task('build', ['lint', 'test']);

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"gulp-jasmine": "^1.0.1",
1212
"gulp-jshint": "^1.9.0",
1313
"gulp-shell": "^0.2.11",
14-
"jsdoc": "3.3.0-alpha13"
14+
"jsdoc": "3.3.0-alpha13",
15+
"jshint-stylish": "^1.0.0"
1516
},
1617
"scripts": {
1718
"test": "echo \"Error: no test specified\" && exit 1"

src/compression/runlength/runlength.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Run-length encoding.
3-
* The idea of this algorithm is to remove the usless zeros and
3+
* The idea of this algorithm is to remove the usless zeros and
44
* give us representation of string in binary which in which the
55
* zeros will be stripped and replaced with their count.
66
*/

test/graphs/searching/bfs.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var bfs = require('../../../src/graphs/searching/bfs').bfs;
1313
describe('BFS', function () {
1414

1515
it('should work with empty graph', function () {
16-
expect(bfs([], 0, 0)).toEqual([1]);
16+
expect(bfs([], 0, 0)).toEqual([0]);
1717
});
1818

1919
it('should return the correct output when used with\

0 commit comments

Comments
 (0)