Skip to content

Commit

Permalink
feat(ESLint): replace JSHint with ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
felixzapata committed Aug 27, 2016
1 parent 195242c commit a013569
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 40 deletions.
21 changes: 21 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"extends": "eslint:recommended",
"rules": {
"no-console": "off"
},
"env": {
"browser": true
},
"plugins": [
"html"
],
"globals": {
"require" : false,
"__dirname" : false,
"describe" : false,
"process" : false,
"beforeEach" : false,
"afterEach" : false,
"it" : false
}
}
13 changes: 0 additions & 13 deletions .jshintrc

This file was deleted.

4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.travis.yml
.gitignore
.jshintignore
.jshintrc
.eslintignore
.eslintrc.json
tasks
test
gulpfile.js
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@
},
"devDependencies": {
"conventional-changelog": "^1.1.0",
"eslint-plugin-html": "^1.5.2",
"gulp": "^3.9.1",
"gulp-bump": "^2.1.0",
"gulp-eslint": "^3.0.1",
"gulp-git": "^1.7.0",
"gulp-jshint": "^2.0.0",
"gulp-load-plugins": "^1.2.0",
"gulp-mocha": "^2.2.0",
"gulp-util": "^3.0.7",
"jshint": "^2.9.2",
"jshint-stylish": "^2.1.0",
"mocha": "^2.4.5",
"require-dir": "^0.3.0",
"run-sequence": "^1.1.5",
Expand Down
21 changes: 0 additions & 21 deletions tasks/jshint.js

This file was deleted.

14 changes: 14 additions & 0 deletions tasks/lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();

// Lint JavaScript
gulp.task('lint', function() {
return gulp.src([
'index.js',
'test/test.js'
])
.pipe($.eslint())
.pipe($.eslint.format())
.pipe($.eslint.failAfterError());
});
2 changes: 1 addition & 1 deletion tasks/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();

gulp.task('test', ['jshint'], function () {
gulp.task('test', ['lint'], function () {
return gulp.src('test.js', {cwd: './test', read: false})
.pipe($.mocha());
});

0 comments on commit a013569

Please sign in to comment.