fix linting errors

This commit is contained in:
Sebastian McKenzie
2014-12-12 12:14:02 +11:00
parent 55e2010311
commit 615425c808
6 changed files with 5 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* jshint newcap: false */
/* jshint newcap: false, freeze: false */
var ensureSymbol = function (key) {
Symbol[key] = Symbol[key] || Symbol(key);

View File

@@ -51,7 +51,7 @@ AMDFormatter.prototype.transform = function (ast) {
AMDFormatter.prototype.getModuleName = function () {
if (this.file.opts.amdModuleIds) {
return CommonJSFormatter.prototype.getModuleName.apply(this, arguments);
return DefaultFormatter.prototype.getModuleName.apply(this, arguments);
} else {
return null;
}

View File

@@ -42,7 +42,7 @@ CommonJSFormatter.prototype.export = function (node, nodes) {
var templateName = "exports-default-module";
// exports = module.exports = VALUE;
if (this.hasNonDefaultExports) templateName = "exports-default-module-override"
if (this.hasNonDefaultExports) templateName = "exports-default-module-override";
var assign = util.template(templateName, {
VALUE: this._pushStatement(declar, nodes)

View File

@@ -6,7 +6,7 @@ exports.ComprehensionExpression = function (node) {
var body = [];
var container = t.functionExpression(null, [], t.blockStatement(body), true);
container._aliasFunction = true
container._aliasFunction = true;
body.push(arrayComprehension._build(node, function () {
return t.expressionStatement(t.yieldExpression(node.body));

View File

@@ -1,5 +1,4 @@
var t = require("../../types");
var _ = require("lodash");
exports.BlockStatement = function (node, parent) {
if (t.isFunction(parent)) return;