fix linting errors
This commit is contained in:
parent
ca482b79ad
commit
55f2cffc22
@ -169,7 +169,7 @@ Class.prototype.buildBody = function () {
|
|||||||
// we have no constructor, we have a super, and the super doesn't appear to be falsy
|
// we have no constructor, we have a super, and the super doesn't appear to be falsy
|
||||||
if (!this.hasConstructor && superName && !t.isFalsyExpression(superName)) {
|
if (!this.hasConstructor && superName && !t.isFalsyExpression(superName)) {
|
||||||
var helperName = "class-super-constructor-call";
|
var helperName = "class-super-constructor-call";
|
||||||
if (this.isLoose) helperName += "-loose"
|
if (this.isLoose) helperName += "-loose";
|
||||||
constructor.body.body.push(util.template(helperName, {
|
constructor.body.body.push(util.template(helperName, {
|
||||||
CLASS_NAME: className,
|
CLASS_NAME: className,
|
||||||
SUPER_NAME: this.superName
|
SUPER_NAME: this.superName
|
||||||
|
|||||||
@ -2,7 +2,7 @@ var t = require("../../../types");
|
|||||||
|
|
||||||
exports.optional = true;
|
exports.optional = true;
|
||||||
|
|
||||||
exports.ExpressionStatement = function (node, parent, scope, context, file) {
|
exports.ExpressionStatement = function (node, parent, scope, context) {
|
||||||
// remove consequenceless expressions such as local variables and literals
|
// remove consequenceless expressions such as local variables and literals
|
||||||
//
|
//
|
||||||
// var foo = true; foo; -> var foo = true;
|
// var foo = true; foo; -> var foo = true;
|
||||||
@ -16,7 +16,7 @@ exports.ExpressionStatement = function (node, parent, scope, context, file) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.IfStatement = {
|
exports.IfStatement = {
|
||||||
exit: function (node, parent, scope, context, file) {
|
exit: function (node, parent, scope, context) {
|
||||||
// todo: in scenarios where we can just return the consequent or
|
// todo: in scenarios where we can just return the consequent or
|
||||||
// alternate we should drop the block statement if it contains no
|
// alternate we should drop the block statement if it contains no
|
||||||
// block scoped variables
|
// block scoped variables
|
||||||
|
|||||||
@ -6,7 +6,7 @@ var isConsole = t.buildMatchMemberExpression("console", true);
|
|||||||
|
|
||||||
exports.optional = true;
|
exports.optional = true;
|
||||||
|
|
||||||
exports.CallExpression = function (node, parent, scope, context, file) {
|
exports.CallExpression = function (node, parent, scope, context) {
|
||||||
if (isConsole(node.callee)) {
|
if (isConsole(node.callee)) {
|
||||||
context.remove();
|
context.remove();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
var t = require("../../../types");
|
//var t = require("../../../types");
|
||||||
|
|
||||||
exports.optional = true;
|
exports.optional = true;
|
||||||
|
|
||||||
|
|||||||
@ -2,19 +2,16 @@
|
|||||||
|
|
||||||
module.exports = Scope;
|
module.exports = Scope;
|
||||||
|
|
||||||
var isBoolean = require("lodash/lang/isBoolean");
|
var contains = require("lodash/collection/contains");
|
||||||
var isNumber = require("lodash/lang/isNumber");
|
var traverse = require("./index");
|
||||||
var contains = require("lodash/collection/contains");
|
var defaults = require("lodash/object/defaults");
|
||||||
var isString = require("lodash/lang/isString");
|
var globals = require("globals");
|
||||||
var traverse = require("./index");
|
var flatten = require("lodash/array/flatten");
|
||||||
var defaults = require("lodash/object/defaults");
|
var extend = require("lodash/object/extend");
|
||||||
var globals = require("globals");
|
var object = require("../helpers/object");
|
||||||
var flatten = require("lodash/array/flatten");
|
var each = require("lodash/collection/each");
|
||||||
var extend = require("lodash/object/extend");
|
var has = require("lodash/object/has");
|
||||||
var object = require("../helpers/object");
|
var t = require("../types");
|
||||||
var each = require("lodash/collection/each");
|
|
||||||
var has = require("lodash/object/has");
|
|
||||||
var t = require("../types");
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This searches the current "scope" and collects all references/bindings
|
* This searches the current "scope" and collects all references/bindings
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user