Skip to content
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

useCallback: transform incorrect when using arrow function with single params #176

Open
TIS-OMiddle opened this issue Jan 6, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@TIS-OMiddle
Copy link

input: useCallback(event => {})

current output: useCallback(event: any => {})

expect output: useCallback((event: any) => {})

It should add a brackets in this condition

@eps1lon eps1lon added the bug Something isn't working label Mar 26, 2023
@eps1lon
Copy link
Owner

eps1lon commented Mar 26, 2023

This codemod relies on jscodeshift and Babel for code generation. Though it's not clear if it's a configuration mistake on our side or a bug in 3rd party dependencies. But definitely worth checking out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants