Skip to content

Commit

Permalink
moving from jscs + jshint to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rodney committed Jan 16, 2016
1 parent 93c5d8b commit ddab3bf
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 54 deletions.
12 changes: 12 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: "eslint:recommended"

env:
node: true

rules:
indent: [2, 4]
quotes: [2, "single"]
no-multi-spaces: 2
no-unreachable: 2


5 changes: 0 additions & 5 deletions .jscsrc

This file was deleted.

22 changes: 5 additions & 17 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
var coveralls = require('gulp-coveralls');
var gulp = require('gulp');
var eslint = require('gulp-eslint');
var istanbul = require('gulp-istanbul');
var jshint = require('gulp-jshint');
var jscs = require('gulp-jscs');
var mocha = require('gulp-mocha');

var srcFiles = [
Expand All @@ -11,24 +10,13 @@ var srcFiles = [
'lib/**/*.js'
];

gulp.task('jscs', function() {
gulp.task('lint', function() {
return gulp.src(srcFiles)
.pipe(jscs({
configPath: '.jscsrc'
}))
.pipe(jscs.reporter('unix'))
.pipe(jscs.reporter('fail'));
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('jshint', function() {
return gulp.src(srcFiles)
.pipe(jshint('./test/.jshintrc'))
.pipe(jshint.reporter('default', { verbose: true }))
.pipe(jshint.reporter('fail'));
});

gulp.task('lint', ['jscs', 'jshint']);

gulp.task('instrument', function() {
return gulp.src('lib/**/*.js')
.pipe(istanbul({
Expand Down
2 changes: 1 addition & 1 deletion lib/append.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = {
output += elementString + ']';
fs.writeSync(fd, output, lastSquareBracket);
}
} finally {
} finally {
fs.closeSync(fd);
}
}
Expand Down
2 changes: 0 additions & 2 deletions lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ module.exports = function(input) {

if (input instanceof stream.Readable) {
var objects = 0;
var previousCharacter;
var openDoubleQuotes = false;
var buffer = '';

Expand All @@ -36,7 +35,6 @@ module.exports = function(input) {
}

buffer += character;
previousCharacter = character;
if (openDoubleQuotes) {
return;
}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"devDependencies": {
"bluebird": "^3.1.1",
"chai": "^3.4.1",
"eslint": "^1.10.3",
"gulp": "^3.9.0",
"gulp-coveralls": "^0.1.4",
"gulp-eslint": "^1.1.1",
"gulp-istanbul": "^0.10.3",
"gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0",
Expand Down
5 changes: 5 additions & 0 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends: "../.eslintrc.yaml"

env:
node: true
mocha: true
29 changes: 0 additions & 29 deletions test/.jshintrc

This file was deleted.

0 comments on commit ddab3bf

Please sign in to comment.