remove flow types and class property keys
This commit is contained in:
parent
d301c8e099
commit
47c1673092
@ -58,6 +58,10 @@ var astTransformVisitor = {
|
||||
delete node.argument;
|
||||
}
|
||||
|
||||
if (t.isFlow(node)) {
|
||||
return this.remove();
|
||||
}
|
||||
|
||||
if (t.isRestElement(node)) {
|
||||
return node.argument;
|
||||
}
|
||||
@ -82,6 +86,10 @@ var astTransformVisitor = {
|
||||
return t.inherits(t.thisExpression(), node);
|
||||
}
|
||||
|
||||
if (t.isClassProperty(node)) {
|
||||
delete node.key;
|
||||
}
|
||||
|
||||
// functions
|
||||
|
||||
if (t.isFunction(node)) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "babel-eslint",
|
||||
"version": "3.0.0",
|
||||
"version": "3.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
||||
@ -131,4 +131,12 @@ describe("verify", function () {
|
||||
[]
|
||||
);
|
||||
});
|
||||
|
||||
it("class properties", function () {
|
||||
verifyAndAssertMessages(
|
||||
"class Lol { foo = 'bar'; }",
|
||||
{ "no-undef": 1 },
|
||||
[]
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user