fix linting errors

This commit is contained in:
Sebastian McKenzie 2015-01-26 13:51:06 +11:00
parent b21b0e753e
commit cfd0059fc7
5 changed files with 5 additions and 12 deletions

View File

@ -3,8 +3,6 @@
var t = require("../../types"); var t = require("../../types");
exports._params = function (node, print) { exports._params = function (node, print) {
var self = this;
this.push("("); this.push("(");
print.join(node.params, { print.join(node.params, {

View File

@ -223,7 +223,6 @@ DefaultFormatter.prototype.exportSpecifier = function (specifier, node, nodes) {
// export * from "foo"; // export * from "foo";
nodes.push(this.buildExportsWildcard(ref, node)); nodes.push(this.buildExportsWildcard(ref, node));
} else { } else {
var ref;
if (t.isSpecifierDefault(specifier) && !this.noInteropRequire) { if (t.isSpecifierDefault(specifier) && !this.noInteropRequire) {
// importing a default so we need to normalise it // importing a default so we need to normalise it
ref = t.callExpression(this.file.addHelper("interop-require"), [ref]); ref = t.callExpression(this.file.addHelper("interop-require"), [ref]);

View File

@ -3,12 +3,10 @@
module.exports = CommonJSFormatter; module.exports = CommonJSFormatter;
var DefaultFormatter = require("./_default"); var DefaultFormatter = require("./_default");
var traverse = require("../../traverse");
var util = require("../../util"); var util = require("../../util");
var t = require("../../types"); var t = require("../../types");
var _ = require("lodash"); var _ = require("lodash");
function CommonJSFormatter(file) { function CommonJSFormatter(file) {
DefaultFormatter.apply(this, arguments); DefaultFormatter.apply(this, arguments);

View File

@ -1,6 +1,5 @@
"use strict"; "use strict";
var traverse = require("../../../traverse");
var util = require("../../../util"); var util = require("../../../util");
var t = require("../../../types"); var t = require("../../../types");
@ -11,7 +10,7 @@ var hasDefaults = function (node) {
return false; return false;
}; };
exports.Function = function (node, parent, scope, context, file) { exports.Function = function (node, parent, scope) {
if (!hasDefaults(node)) return; if (!hasDefaults(node)) return;
t.ensureBlock(node); t.ensureBlock(node);
@ -35,7 +34,7 @@ exports.Function = function (node, parent, scope, context, file) {
var left = param.left; var left = param.left;
var right = param.right; var right = param.right;
node.params[i] = scope.generateUidIdentifier("x") node.params[i] = scope.generateUidIdentifier("x");
// we're accessing a variable that's already defined within this function // we're accessing a variable that's already defined within this function
var localDeclar = scope.get(left.name, true); var localDeclar = scope.get(left.name, true);

View File

@ -1,6 +1,5 @@
module.exports = Node; module.exports = Node;
var object = require("../helpers/object");
var acorn = require("acorn-6to5"); var acorn = require("acorn-6to5");
var oldNode = acorn.Node; var oldNode = acorn.Node;