If you are interested in this sort of work, we've been doing this for years at Facebook and are publishing all our "codemods" in a repo:
- JS: https://github.com/cpojer/js-codemod/tree/master/transforms
- React: https://github.com/reactjs/react-codemod/tree/master/transfo...
We built and ran the codemod they talk about in this paper many years ago across thousands of files. Unfortunately, we didn't have the infra open sourced so the actual codemod didn't get open sourced.