This repository was archived by the owner on Jan 14, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Change the way to retrieve comments. #32
Comments
Thats kinda critical, because you can have |
I've run into this as well. I'd love to look at this at some point, but need to get to the rest of my OSS backlog first! Does anyone who might be more familiar with TS's internals have an idea of how this could be achieved a different way? |
@kaicataldo @shmidt-i @g-plane issue is due to https://github.com/JamesHenry/typescript-estree/blob/master/src/parser.ts#L134 what you want is jsx: extra.jsx ? ts.JsxEmit.ReactNative : undefined but right now there is: jsx: extra.jsx ? ts.JsxEmit.Preserve : undefined you should be able to specify one of 3 values there: |
We can switch this parser to optionally accept all the values |
@JamesHenry this got fixed in #82 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, this parser uses the scanner of TypeScript to retrieve comments. And there is an issue:
For example, we have code like this (please ignore the syntax highlight from GitHub):
As we can see above, the text in the
div
tag isJSXText
, however, thetypescript-estree
regards it as comment and adds it to thecomments
property. Note that this only affected on thecomments
property if thecomments
option is on, while the AST and thetokens
property work fine.The text was updated successfully, but these errors were encountered: