Allow autofixing using eslint --fix for singleReturnOnly mode.
I ran this on one of our codebases here at Uber with 35 kloc and it successfully converted 450+ functions into arrow functions.
The code is unfortunately pretty confusing because eslint has a bad API for AST manipulation :) So I had to roll something myself and it's a little messy
Allow autofixing using
eslint --fix
forsingleReturnOnly
mode.I ran this on one of our codebases here at Uber with 35 kloc and it successfully converted 450+ functions into arrow functions.
The code is unfortunately pretty confusing because eslint has a bad API for AST manipulation :) So I had to roll something myself and it's a little messy