-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
codemod: add transform replaceReactUseRef #137
Conversation
435de75
to
4a893d0
Compare
This comment was marked as spam.
This comment was marked as spam.
41e39e7
to
8a1d81f
Compare
45fc72c
to
2a6ddd4
Compare
Thanks you for the contribution to the project! Some issues to resolve:
Again, thanks for the contribution. |
f78526d
to
f7c1dbf
Compare
thats why we have tests : ) i am aware that this codemod was made to transform react-material-ui but this is still a draft (acfba1f etc), not ready to merge |
add .js file extension to all imports so this "just works" without node --experimental-specifier-resolution=node which was removed in node 19 in favor of loaders, which is not better
fix imports for node 19 node 19 has removed the so currently
imo, custom loaders are even worse than the experimental flag |
True, but stability is not only the testing phase. Create a pull request with a lot of differents commits is not good:
I really appreciate your dedication, and your work looks great, but I need your help to keep the project in order with this pull request. |
so should i create many PRs? semver is overrated, npm is overrated ... |
The commits should be grouped by goals in multiple pull requests. The bug fixes have priority and they should separated. If you wrote a test, first add the test commit, and later the fix commit. With this way, the reviewer can run the test without the fix. The tests increment their complexity slowly. Only one complex test is a bad pattern. The complex test is needed, but in last instance. If a new feat/fix requires structuring a lot of code, first try do a refactor commit and later the feat/fix commit. This will hep a lot of in the review. The global changes must be debated with a issue and overall never mixed with others changes.
These last issues are global changes and could be implemented later, without blocking other issues more importants. Each PR must include the If a new react transformer or material component is added it is required regenerate the roadmap file (https://github.com/swordev/suid/blob/main/scripts/actions/genRoadmap.ts). I know that this may seem complex, but it's very easy. Structuring the commits like this, the 80% of your commits would be merged already. |
... right. i guess this also belongs to contributing.md closing as "i dont need this any more" edit: "... and im too lazy to get this merged" |
note: looking back, react2solid should be implemented as an eslint plugin
for example https://github.com/milahu/eslint-plugin-react2solid
why? eslint is the most popular transformer = large ecosystem = reuse existing rules
typescript is slow (except we use swc), typescript should be optional
transform
React.useRef
not perfect but should work for most cases
also
fix #133
fix #136
fix #135 (partial) - use
toMatchInlineSnapshot
to allownpx jest -u