fkling / astexplorer

A web tool to explore the ASTs generated by various parsers.
https://astexplorer.net/
MIT License
6.13k stars 729 forks source link

Issue with ESLint v2 or v1` transform + sourceType: module #117

Open DrewML opened 8 years ago

DrewML commented 8 years ago

Hoping this isn't just an obvious case of user-error on my part.

Can be seen at: http://astexplorer.net/#/DH4gO9Bvjr

image

image

fkling commented 8 years ago

I have a hunch what the issue is: The transform (eslint) and the parser (espree) are actually completely separate. The parser settings really only affect the parser, which is used to show the tree in the top right panel. ESLint uses its own instance of the parser, with its own settings.

I agree with you that the parser settings should also be used for the transform tool. What prevents us from doing that right now is

The way parser settings are handled is not ideal at the moment. I want to merge #111 soon and then work on improving parser settings (e.g. change them so that they are passed to the parser, which would also make it easier to pass them to the transform tool).

DrewML commented 8 years ago

Cool - that makes sense. Thanks for clarifying.

kentcdodds commented 7 years ago

This appears to have come back or still be a problem. How can I help?