fix linting errors
This commit is contained in:
parent
476b683f0f
commit
298cfac7f4
@ -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",
|
||||
|
||||
@ -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))
|
||||
);
|
||||
|
||||
@ -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);
|
||||
//}
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user