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

bug: node cleaner for function bodies (cont. #209) #225

Open
scr2em opened this issue Apr 14, 2024 · 1 comment
Open

bug: node cleaner for function bodies (cont. #209) #225

scr2em opened this issue Apr 14, 2024 · 1 comment

Comments

@scr2em
Copy link

scr2em commented Apr 14, 2024

This is the continuation of our previous conversation in #211

@morgante I believe it's a valid javascript, can you recheck ?

const x = () => (log(), log());
image

Honestly tho, I don't think Grit should handle that, but just throwing this case here.

Here is another example that looks like a domino effect, If we are trying to remove a default value of a destructed property
image

My initial thoughts

1. we may decide to remove the parameter since we can't put any other value.
2. then you will have to check if it's the only parameter to remove `{}` 
3. then you will have to remove the entire line if that's the case. 

but I guess we can just just remove the assign operator

@scr2em
Copy link
Author

scr2em commented Apr 14, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant