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

RFC: Convert var to let/const. #6097

Closed
wants to merge 2 commits into from
Closed

Conversation

cpojer
Copy link
Contributor

@cpojer cpojer commented Feb 23, 2016

Talked to @zpao about sending a PR for this. We prefer the React team have a discussion first whether they want to merge this.

We ran this transform quite successfully internally at Facebook and I figured it is time to convert React as well. I'm doing a talk in Tokyo (right now!) and figured it is a good time to do it live. Why the hell not?

All the tests are passing. I'm assuming the code in the React repo isn't clowny so eslint and the conservative codemod should handle all cases correctly. This is an RFC. I'm fine with any decision the React team is making with regards to the code style they want to enforce in this repo – feel free to either merge or close this. To people following along I will ask them to not start a bikeshedding discussion please but instead recommend running the codemod on your own projects yourself. If you do, please report any issues you find!

@gaearon
Copy link
Collaborator

gaearon commented Feb 23, 2016

My only concern about this is it will require changes to pretty much every existing PR.

@cpojer
Copy link
Contributor Author

cpojer commented Feb 24, 2016

I don't think that is a real issue. It's a one time cost and this should be easy to rebase.

@bgw
Copy link
Contributor

bgw commented Feb 24, 2016

@gaearon It wouldn't be the first time this happened: #3998. It's a necessary evil.

@sophiebits
Copy link
Collaborator

Just gonna close this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants