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
|
||||
if (!this.hasConstructor && superName && !t.isFalsyExpression(superName)) {
|
||||
var helperName = "class-super-constructor-call";
|
||||
if (this.isLoose) helperName += "-loose"
|
||||
if (this.isLoose) helperName += "-loose";
|
||||
constructor.body.body.push(util.template(helperName, {
|
||||
CLASS_NAME: className,
|
||||
SUPER_NAME: this.superName
|
||||
|
||||
@ -2,7 +2,7 @@ var t = require("../../../types");
|
||||
|
||||
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
|
||||
//
|
||||
// var foo = true; foo; -> var foo = true;
|
||||
@ -16,7 +16,7 @@ exports.ExpressionStatement = function (node, parent, scope, context, file) {
|
||||
};
|
||||
|
||||
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
|
||||
// alternate we should drop the block statement if it contains no
|
||||
// block scoped variables
|
||||
|
||||
@ -6,7 +6,7 @@ var isConsole = t.buildMatchMemberExpression("console", true);
|
||||
|
||||
exports.optional = true;
|
||||
|
||||
exports.CallExpression = function (node, parent, scope, context, file) {
|
||||
exports.CallExpression = function (node, parent, scope, context) {
|
||||
if (isConsole(node.callee)) {
|
||||
context.remove();
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
var t = require("../../../types");
|
||||
//var t = require("../../../types");
|
||||
|
||||
exports.optional = true;
|
||||
|
||||
|
||||
@ -2,10 +2,7 @@
|
||||
|
||||
module.exports = Scope;
|
||||
|
||||
var isBoolean = require("lodash/lang/isBoolean");
|
||||
var isNumber = require("lodash/lang/isNumber");
|
||||
var contains = require("lodash/collection/contains");
|
||||
var isString = require("lodash/lang/isString");
|
||||
var traverse = require("./index");
|
||||
var defaults = require("lodash/object/defaults");
|
||||
var globals = require("globals");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user