update to eslint 0.16, remove certain mangling
This commit is contained in:
parent
78ca83eb6f
commit
47e3808aa4
@ -66,11 +66,6 @@ var astTransformVisitor = {
|
||||
|
||||
// classes
|
||||
|
||||
if (t.isClassDeclaration(node) || t.isClassExpression(node)) {
|
||||
node.name = node.id;
|
||||
delete node.id;
|
||||
}
|
||||
|
||||
if (t.isReferencedIdentifier(node, parent, { name: "super" })) {
|
||||
return t.inherits(t.thisExpression(), node);
|
||||
}
|
||||
@ -82,28 +77,6 @@ var astTransformVisitor = {
|
||||
|
||||
// functions
|
||||
|
||||
if (t.isFunction(node)) {
|
||||
node.defaults = [];
|
||||
node.params = node.params.map(function (param) {
|
||||
if (t.isAssignmentPattern(param)) {
|
||||
node.defaults.push(param.right);
|
||||
return param.left;
|
||||
} else {
|
||||
node.defaults.push(null);
|
||||
return param;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (t.isArrowFunctionExpression(node)) {
|
||||
node.type = "FunctionExpression";
|
||||
if (node.body.type !== "BlockStatement") {
|
||||
node.body = t.inherits(t.blockStatement([
|
||||
node.body
|
||||
]), node);
|
||||
}
|
||||
}
|
||||
|
||||
if (t.isFunction(node) && node.async) {
|
||||
node.generator = true;
|
||||
node.async - false;
|
||||
|
||||
@ -11,6 +11,9 @@
|
||||
"babel": "^4.6.0",
|
||||
"lodash.assign": "^3.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
@ -18,7 +21,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/babel/babel-eslint",
|
||||
"devDependencies": {
|
||||
"eslint": "^0.15.1",
|
||||
"eslint": "^0.16.0",
|
||||
"espree": "^1.10.0",
|
||||
"mocha": "^2.1.0"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user