-
-
Notifications
You must be signed in to change notification settings - Fork 209
Type annotation identifier does not always have range information #473
Comments
I'm seeing this same exact thing with flow type object spread, such as
I've tried to use the absolute latest releases though I'm unsure how there is an old babylon 6.17.1:
|
Thanks for the report! Do either of you think you could create a small repository to reproduce the issue and maybe even make a pull request with a fix? |
Repo with reproduction: I did this quickly and did not try to pare down the other eslint plugins, but perhaps it is simple enough as is. |
@rosskevin I looked into this. The problem is that there is no range information. This is because babel-eslint is not traversing into the To fix this I think there just has to be a new release of babel v6. |
@soda0289 my repo is using the latest 7.x alpha, which I have seen has the original PR merged so I would expect it to work. I don't know the version of babel-traverse as I am mobile now, but I'll check in the morning. |
I was able to do a quick check, it appears my test repo has a mixture of
I tried to be explicit with |
Thank you for the issue. Now that |
Upstream issue for eslint/eslint#8630.
Given this source code:
This generates the AST shown at this gist.
It looks like both identifiers in
FieldOptions<Date>
do not get ranges:I'm hazarding a guess that this might have to do with being preceded by the spread operator, but I can't say for sure.
Unfortunately, I don't know enough about babel-eslint or Flow to have any idea where to start with this. But if someone can give me some guidance on where to start, I could theoretically at least attempt a solution.
The text was updated successfully, but these errors were encountered: