-
-
Notifications
You must be signed in to change notification settings - Fork 75
Fix: Convert MetaProperty (new.target) nodes correcly (fixes #194) #195
Conversation
LGTM |
tests/lib/basics.js
Outdated
@@ -59,6 +59,9 @@ describe("basics", function() { | |||
try { | |||
result = parser.parse(code, config); | |||
result = tester.getRaw(result); | |||
if (Object.keys(expected).length === 0) { | |||
console.log(JSON.stringify(result, null, 4)); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got to delete this. Sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just in time 😄 I was just reviewing
d507738
to
0633e73
Compare
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soda0289 Please could we add the test case from espree for new.target
as part of this?
https://github.com/eslint/espree/tree/master/tests/fixtures/ecma-version/6/newTarget
We have those tests already: I had to enable the new-target rule by removing it from the filter in tests/lib/ecma-features.js Typescript does not throw an error you have an invalid metaproperty, such as |
Ah! Sorry, that makes sense |
The MetaProperty node was added a couple of months ago into typescript. I think it landed in 2.2.
microsoft/TypeScript#12783
I have to create a identifier node for 'new' since it is not part of the typescript metaproperty node.