vscode-glean: Error message clarification: 'You must pass a scope and parentPath'
Hi I am getting the following error when trying to convert a react PureComponent to stateless.
You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a Identifier node without passing scope and parentPath.
Sorry if this is not the right place, but I am confused and cannot find an answer anywhere.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (11 by maintainers)
Commits related to this issue
- chore(release): 5.1.1 [skip ci] ## [5.1.1](https://github.com/wix/vscode-glean/compare/v5.1.0...v5.1.1) (2021-01-06) ### Bug Fixes * **class-to-functional:** fixd support for props distructuring. F... — committed to wix-incubator/vscode-glean by semantic-release-bot 3 years ago
- chore(release): 5.2.2 [skip ci] ## [5.2.2](https://github.com/wix/vscode-glean/compare/v5.2.1...v5.2.2) (2021-03-19) ### Bug Fixes * **class-to-function:** Fixed conversion of class properties with... — committed to wix-incubator/vscode-glean by semantic-release-bot 3 years ago
So the minimal example does work without experiment and doesn’t when the experiment is on.
Looks like props destructuring is an issue here.
Because this works fine in both cases.
Hello! I’m using 5.1.1 and I still see the issue when trying to refactor this:
Seems like there’s the same issue whenever you try to spread
this.props
in JSX too:gives the same error