react-codemod icon indicating copy to clipboard operation
react-codemod copied to clipboard

Example in transform files

Open RupenAnjaria opened this issue 7 years ago • 7 comments

Just like https://github.com/reactjs/react-codemod/blob/master/transforms/manual-bind-to-arrow.js file has comment on top to show what will be the impact of transformation by before and after codes, can we please update other JS files with comments to show before and after codeblocks?

RupenAnjaria avatar Feb 14 '18 18:02 RupenAnjaria

I'll accept a PR.

threepointone avatar Jul 27 '19 13:07 threepointone

Also in the README would be nice

muescha avatar Aug 09 '19 19:08 muescha

Hey @threepointone , is this issue still free to take?

alex-saunders avatar Oct 29 '19 21:10 alex-saunders

Assigned to you! Take your time with this. Maybe a good idea to add a TOC to the README too, since this will make it quite chunky. Happy to discuss if you have questions.

threepointone avatar Oct 29 '19 21:10 threepointone

Thanks! I'll get working on this right away. Good shout about a contents in the README, I'll add that as well.

alex-saunders avatar Oct 29 '19 21:10 alex-saunders

to avoid out of sync comments maybe it's better only in the: a) transformation file or b) the readme file should be the impact example code?

muescha avatar Oct 29 '19 21:10 muescha

Only in the README file, I think. And it doesn’t have to be exhaustive (if there are options), just a simple example will do.

threepointone avatar Oct 29 '19 21:10 threepointone