update acorn-to-esprima, account for getter/setter kind property
This commit is contained in:
parent
3b673ef4b6
commit
c35137040a
@ -8,7 +8,7 @@
|
||||
"url": "https://github.com/babel/babel-eslint.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"acorn-to-esprima": "^2.0.3",
|
||||
"acorn-to-esprima": "^2.0.4",
|
||||
"babel-traverse": "^6.0.20",
|
||||
"babel-types": "^6.0.19",
|
||||
"babylon": "^6.0.18",
|
||||
|
||||
@ -432,6 +432,16 @@ describe("acorn-to-esprima", function () {
|
||||
"}",
|
||||
"}"
|
||||
].join("\n"));
|
||||
parseAndAssertSame([
|
||||
"var B = {",
|
||||
"get x () {",
|
||||
"return this.ecks;",
|
||||
"},",
|
||||
"set x (ecks) {",
|
||||
"this.ecks = ecks;",
|
||||
"}",
|
||||
"};"
|
||||
].join("\n"));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -1304,4 +1304,31 @@ describe("verify", function () {
|
||||
[]
|
||||
)
|
||||
});
|
||||
|
||||
it("getter/setter #218", function () {
|
||||
verifyAndAssertMessages([
|
||||
"class Person {",
|
||||
"set a (v) { }",
|
||||
"}"
|
||||
].join("\n"),
|
||||
{ "space-before-function-paren": 1, "space-before-keywords": 1, "indent": 1 },
|
||||
[]
|
||||
)
|
||||
});
|
||||
|
||||
it("getter/setter #220", function () {
|
||||
verifyAndAssertMessages([
|
||||
"var B = {",
|
||||
"get x () {",
|
||||
"return this.ecks;",
|
||||
"},",
|
||||
"set x (ecks) {",
|
||||
"this.ecks = ecks;",
|
||||
"}",
|
||||
"};"
|
||||
].join("\n"),
|
||||
{ "no-dupe-keys": 1 },
|
||||
[]
|
||||
)
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user