Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Patch SpreadProperty to escope's PatternVisitor #209

Merged
merged 1 commit into from
Nov 23, 2015

Conversation

Constellation
Copy link
Contributor

Once new escope is released, we can patch SpreadProperty to PatternVisitor.
This will solve estools/escope#88 and eslint/eslint#4481.

See escope side PR: estools/escope#89

Once new escope is released, we can patch SpreadProperty to PatternVisitor.
This will solve estools/escope#88 and eslint/eslint#4481.
@mAiNiNfEcTiOn
Copy link

Well, I have been testing this code (using the branch directly, because this is a serious issue), and so far seems to be ok...

Any perspectives of when will it be merged?

@samwhite
Copy link

+1: This seems to fix #210 - using the code locally right now to fix the no-redeclare problem

hzoo added a commit that referenced this pull request Nov 23, 2015
Patch SpreadProperty to escope's PatternVisitor
@hzoo hzoo merged commit 0af8736 into babel:master Nov 23, 2015
@hzoo
Copy link
Member

hzoo commented Nov 23, 2015

Ok merging and releasing. Ok interesting that the test fails now in travis

@hzoo
Copy link
Member

hzoo commented Nov 23, 2015

@Constellation getting errors after merging now - don't have time at the moment to look into it

@evocateur
Copy link
Contributor

The pull request was using eslint 1.9.0, and the merged test used eslint 1.10.1. Something changed between 1.9.0 and 1.10.1 was evidently not backward-compatible.

evocateur pushed a commit to evocateur/babel-eslint that referenced this pull request Nov 23, 2015
Despite the improvements from babel#209 with the pattern visitor, it doesn't
actually iterate over the Property node siblings of the SpreadProperty.
Thus, the "ignore properties left of spread" fix in babel#95 regressed.

Restoring the "old" path of looping over all properties of an ObjectPattern
that contains a SpreadProperty avoids the regression. It seems inelegant,
but I don't have enough insight into the referencer to propose an alternative.
nicolo-ribaudo pushed a commit to babel/babel that referenced this pull request Nov 14, 2019
…visitor

Patch SpreadProperty to escope's PatternVisitor
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants