Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed linting errors #3

Merged
merged 2 commits into from Oct 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions compile.js
Expand Up @@ -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);
Expand Down
10 changes: 2 additions & 8 deletions gulpfile.js
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions test/MainSpec.js
Expand Up @@ -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");
});
});
2 changes: 1 addition & 1 deletion test/NoJsxSpec.js
Expand Up @@ -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 () {
Expand Down