Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change var name for coherence #9579

Merged
merged 4 commits into from
Feb 26, 2019

Conversation

tanohzana
Copy link
Contributor

Q                       A
Fixed Issues?
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

I was reding the code to understand how it worked, but I enciuntered this variable name called printMethod and I thought it was going to be used afterwards, but it turned out it as only to test that the function existed, so I think it makes more sense to name it as a boolean.

@babel-bot
Copy link
Collaborator

babel-bot commented Feb 25, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10298/

@tanohzana
Copy link
Contributor Author

It's either possible to rename this variable or use printMethod on line 370 so the variable is reused.

Just let me know what suits you !

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this[node.type] is a method which prints the node.

@tanohzana
Copy link
Contributor Author

Yes it is, but it is used as a boolean. Let me know then, if what I do next makes more sense then.

nicolo-ribaudo
nicolo-ribaudo previously approved these changes Feb 25, 2019
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

@nicolo-ribaudo nicolo-ribaudo dismissed their stale review February 25, 2019 16:21

It doesn't work because, since it is a method, it needs to be called with the correct this context.

danez and others added 2 commits February 26, 2019 09:36
@babel babel deleted a comment from buildsize bot Feb 26, 2019
@existentialism existentialism added PR: Polish 💅 A type of pull request used for our changelog categories pkg: generator labels Feb 26, 2019
@existentialism existentialism merged commit 8f26f6d into babel:master Feb 26, 2019
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: generator PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants