diff --git a/compile.js b/compile.js index c58467c..f10643b 100644 --- a/compile.js +++ b/compile.js @@ -23,11 +23,11 @@ function compile (item) { var props = item[1]; var children; - if (props != null && props.constructor === Object) { - children = item.slice(2) + if ( props != null && props.constructor === Object ) { + children = item.slice(2); } else { - props = {} - children = item.slice(1) + props = {}; + children = item.slice(1); } children = compileChildren(children); diff --git a/gulpfile.js b/gulpfile.js index 939cf00..592b336 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -16,22 +16,16 @@ var configFiles = [ "./test/**/*.js", ]; -function handleError (error) { - throw error; -} - gulp.task("jscs", function () { return gulp.src(files.concat(configFiles)) - .pipe(jscs("./.jscs.json")) - .on("error", handleError); + .pipe(jscs("./.jscs.json")); }); gulp.task("jshint", function () { return gulp.src(files.concat(configFiles)) .pipe(jshint()) .pipe(jshint.reporter("default")) - .pipe(jshint.reporter("fail")) - .on("error", handleError); + .pipe(jshint.reporter("fail")); }); gulp.task("mocha", function (callback) { diff --git a/test/MainSpec.js b/test/MainSpec.js index 46f2b83..97ed01d 100644 --- a/test/MainSpec.js +++ b/test/MainSpec.js @@ -4,7 +4,7 @@ describe("no-jsx", function () { var noJsx = require("../index"); it("should export library functions", function () { - noJsx.should.have.property('compile'); - noJsx.should.have.property('mixin'); + noJsx.should.have.property("compile"); + noJsx.should.have.property("mixin"); }); }); diff --git a/test/NoJsxSpec.js b/test/NoJsxSpec.js index 6e17fce..c85434d 100644 --- a/test/NoJsxSpec.js +++ b/test/NoJsxSpec.js @@ -43,7 +43,7 @@ var TestBasicComponent = React.createClass({ ["p", "Bar"], ]; }, -}) +}); describe("no-jsx mixin", function () { it("should convert the items returned by renderTree() to React elements", function () {