fix linting errors

This commit is contained in:
Sebastian McKenzie 2015-02-12 21:55:31 +11:00
parent 476b683f0f
commit 298cfac7f4
4 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
var toArray = require("lodash/lang/toArray");
var util = require("util");
exports.messages = {
tailCallReassignmentDeopt: "Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",

View File

@ -257,13 +257,15 @@ ClassTransformer.prototype.pushMethod = function (node) {
ClassTransformer.prototype.pushProperty = function (node) {
if (!node.value) return;
var key;
if (node.static) {
var key = t.memberExpression(this.className, node.key);
key = t.memberExpression(this.className, node.key);
this.body.push(
t.expressionStatement(t.assignmentExpression("=", key, node.value))
);
} else {
var key = t.memberExpression(t.thisExpression(), node.key);
key = t.memberExpression(t.thisExpression(), node.key);
this.constructor.body.body.unshift(
t.expressionStatement(t.assignmentExpression("=", key, node.value))
);

View File

@ -2,7 +2,7 @@
exports.optional = true;
exports.Scopable = function (node, parent, scope) {
exports.Scopable = function () {
//for (var name in scope.bindings) {
// scope.rename(name, scope.generateUidIdentifier("a").name);
//}

View File

@ -10,8 +10,6 @@ exports.Identifier = function (node, parent, scope, file) {
if (!t.isReferenced(node, parent)) return;
if (scope.hasBinding(node.name)) return;
var msg = "Reference to undeclared variable";
// get the closest declaration to offer as a suggestion
// the variable name may have just been mistyped