It's pretty common to use the implicit return when there are no hooks used in the component. Not sure if this is complicated to fix since I am not very familiar with the AST analysis and modifications. If this case can be fixed that would better utilize this codemod.
╭─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ Codemod: react/19/replace-default-props@1.0.5 │
│ Target: /Users/user123/projects/ui/src/ui │
│ │
│ Using default include patterns based on the engine │
│ Included patterns: **/*.js, **/*.jsx, **/*.ts, **/*.tsx, **/*.mjs, **/*.cjs, │
│ **/*.mts, **/*.cts, **/*.vue, **/*.svelte │
│ Patterns excluded by default: **/*.d.ts, **/node_modules/**/*.*, **/.next/**/*.*, │
│ **/dist/**/*.*, **/build/**/*.*, **/.git/**/*.*, │
│ **/.svn/**/*.*, **/.hg/**/*.*, **/.bzr/**/*.*, │
│ **/_darcs/**/*.*, **/_MTN/**/*.*, **/_FOSSIL_, **/.fslckout, │
│ **/.view/**/*.* │
│ Patterns excluded from gitignore: /.idea, /.vscode, /node_modules, /.pnp, **/.pnp.js, │
│ /coverage, /build, /public/static, /.storybook/cache, │
│ /storybook-static, **/.DS_Store, **/.env.local, │
│ **/.env.development.local, **/.env.test.local, │
│ **/.env.production.local, **/npm-debug.log*, │
│ **/yarn-debug.log*, **/yarn-error.log*, **/*.swp, **/*.swo, │
│ **/dist/**/*.*, **/.eslintcache, │
│ **/__image_snapshots__/__diff_output__ │
│ │
│ Running in 4 threads │
│ File formatting disabled │
│ │
│ │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
Execution progress | ████████████████████████████████████████ | 100% || 1/1 files || Current: Card.jsx
No changes were made during the codemod run.
Faulty codemod
react/19/replace-default-propsTrivial tested code sample with functional component and implicit return
Expected
Actual
Change does not happen on this file:
No changes were made during the codemod run.Estimated impact
It's pretty common to use the implicit return when there are no hooks used in the component. Not sure if this is complicated to fix since I am not very familiar with the AST analysis and modifications. If this case can be fixed that would better utilize this codemod.
Thank you for making this tool ❤ It is very helpful refactoring sidekick :)
Logs:
Additional context
Using the latest version as of now (0.18.4)