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

return in parenthesis inconsistency #465

Closed
vlork opened this issue Aug 25, 2016 · 3 comments
Closed

return in parenthesis inconsistency #465

vlork opened this issue Aug 25, 2016 · 3 comments
Labels
Milestone

Comments

@vlork
Copy link

vlork commented Aug 25, 2016

return (
boop
)
return (
boop
);

becomes

return (
    boop
)
return (
    boop
    );

Not sure if intentional.

Relevant for JSX, with markup within parenthesis, though formatting seems to be done by esformatter core.

@millermedeiros
Copy link
Owner

millermedeiros commented Aug 26, 2016

this definitely needs to be fixed, should not be hard for this specific case.

this is handled by getIndentEdges inside https://github.com/millermedeiros/esformatter/blob/master/lib/hooks/ReturnStatement.js

maybe the parenthesis check is wrong, or maybe it should not return the parentheses.closing as the endToken.

I'm not going to have time to work on esformatter this week, PRs are highly appreciated! Thanks for reporting the bug.

see also #298 (which is way harder to fix, but somewhat related)

@glesage
Copy link

glesage commented Oct 23, 2016

Indeed, this is still an issue. Any updates?

@millermedeiros millermedeiros modified the milestone: v0.11.0 Oct 30, 2016
@millermedeiros
Copy link
Owner

@glesage been busy with my day job, newborn daughter and mountain biking.. only had time to fix this today. will try to release a new version soon including the fix :D

pull requests are highly appreciated!

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

No branches or pull requests

3 participants