Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!
jscodeshift -t ../js-codemod/transforms/no-vars.js src