From 4b2cf2e2c5f71aff29594d0666cf4d3dba493636 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 4 Feb 2015 23:24:08 +1100 Subject: [PATCH] fix styling errors --- lib/6to5/generation/generators/types.js | 2 +- lib/6to5/transformation/modules/_default.js | 2 +- .../transformation/transformers/es6/destructuring.js | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/6to5/generation/generators/types.js b/lib/6to5/generation/generators/types.js index 999cd4ae2d..35a4988dd0 100644 --- a/lib/6to5/generation/generators/types.js +++ b/lib/6to5/generation/generators/types.js @@ -96,7 +96,7 @@ exports.Literal = function (node) { this.push(val); } else if (type === "number") { this.push(val + ""); - } else if (type === "boolean" ) { + } else if (type === "boolean") { this.push(val ? "true" : "false"); } else if (node.regex) { this.push("/" + node.regex.pattern + "/" + node.regex.flags); diff --git a/lib/6to5/transformation/modules/_default.js b/lib/6to5/transformation/modules/_default.js index 113d8a9ac7..d72f4bdb9c 100644 --- a/lib/6to5/transformation/modules/_default.js +++ b/lib/6to5/transformation/modules/_default.js @@ -73,7 +73,7 @@ var importsVisitor = { }; DefaultFormatter.prototype.getLocalImports = function () { - this.file.scope.traverse(this.file.ast, importsVisitor, this); + this.file.scope.traverse(this.file.ast, importsVisitor, this); }; var remapVisitor = { diff --git a/lib/6to5/transformation/transformers/es6/destructuring.js b/lib/6to5/transformation/transformers/es6/destructuring.js index 0ca5d9b12a..9a08a475b3 100644 --- a/lib/6to5/transformation/transformers/es6/destructuring.js +++ b/lib/6to5/transformation/transformers/es6/destructuring.js @@ -13,7 +13,7 @@ function Destructuring(opts) { this.kind = opts.kind; } - Destructuring.prototype.buildVariableAssignment = function (id, init) { +Destructuring.prototype.buildVariableAssignment = function (id, init) { var op = this.operator; if (t.isMemberExpression(id)) op = "="; @@ -32,7 +32,7 @@ function Destructuring(opts) { return node; }; - Destructuring.prototype.buildVariableDeclaration = function (id, init) { +Destructuring.prototype.buildVariableDeclaration = function (id, init) { var declar = t.variableDeclaration("var", [ t.variableDeclarator(id, init) ]); @@ -40,7 +40,7 @@ function Destructuring(opts) { return declar; }; - Destructuring.prototype.push = function (elem, parentId) { +Destructuring.prototype.push = function (elem, parentId) { if (t.isObjectPattern(elem)) { this.pushObjectPattern(elem, parentId); } else if (t.isArrayPattern(elem)) { @@ -52,7 +52,7 @@ function Destructuring(opts) { } }; - Destructuring.prototype.pushAssignmentPattern = function (pattern, parentId) { +Destructuring.prototype.pushAssignmentPattern = function (pattern, parentId) { var tempParentId = this.scope.generateUidBasedOnNode(parentId); var declar = t.variableDeclaration("var", [ @@ -167,7 +167,7 @@ Destructuring.prototype.pushArrayPattern = function (pattern, parentId) { } }; - Destructuring.prototype.init = function (pattern, parentId) { +Destructuring.prototype.init = function (pattern, parentId) { if (!t.isArrayExpression(parentId) && !t.isMemberExpression(parentId) && !t.isIdentifier(parentId)) { var key = this.scope.generateUidBasedOnNode(parentId); this.nodes.push(this.buildVariableDeclaration(key, parentId));