From 73f65ae63417d9883ed83a2effa3709fd6ffe01e Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Mon, 20 Oct 2014 08:35:02 +1100 Subject: [PATCH] fix jshint spacing issues --- lib/6to5/file.js | 2 +- lib/6to5/transformers/jsx/index.js | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/6to5/file.js b/lib/6to5/file.js index d693f2bc44..8f9dcb53f3 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -130,7 +130,7 @@ File.prototype.generateUid = function (name) { name = name.replace(/^[-0-9]+/, ""); // camel case - name = name.replace(/[-_\s]+(.)?/g, function(match, c){ + name = name.replace(/[-_\s]+(.)?/g, function (match, c) { return c ? c.toUpperCase() : ""; }); diff --git a/lib/6to5/transformers/jsx/index.js b/lib/6to5/transformers/jsx/index.js index f3e6477421..be34943581 100644 --- a/lib/6to5/transformers/jsx/index.js +++ b/lib/6to5/transformers/jsx/index.js @@ -88,9 +88,15 @@ exports.XJSElement = { var args = callExpr.arguments; switch (children.length) { - case 0: break; - case 1: args.push(children[0]); break; - default: args.push(b.arrayExpression(children)); + case 0: + break; + + case 1: + args.push(children[0]); + break; + + default: + args.push(b.arrayExpression(children)); } callExpr.loc = node.loc;