Skip to content

[RFC] Do not indent calls with a single template literal argument - #873

Merged
vjeux merged 1 commit into
prettier:masterfrom
vjeux:template_indent
May 1, 2017
Merged

vjeux merged 1 commit into
prettier:masterfrom
vjeux:template_indent

Conversation

@vjeux

@vjeux vjeux commented Mar 3, 2017

Copy link
Copy Markdown
Contributor

I'm not sure that this is a good idea. A current workaround is to remove the parenthesis.

Fixes #786

})() + 3 + 2 + 3 + 2 + 3} with expr\`;

foo(
\`a long string \${1 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + 3 + 2 + (function() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was written as being indented, and now is all messed up. So this isn't ideal for this situation :(

@jlongster

Copy link
Copy Markdown
Member

Hm, yeah this is hard call. I don't feel good merging this without thinking a little more and seeing how it affects more people. Thanks for the idea!

@vjeux

vjeux commented Mar 19, 2017

Copy link
Copy Markdown
Contributor Author

I'll close this to clean up the queue, we should re-open if we want to do it.

I'm not sure that this is a good idea. A current workaround is to remove the parenthesis.

Fixes prettier#786
@vjeux
vjeux force-pushed the template_indent branch from acb2363 to 3017cae Compare April 22, 2017 15:28
@vjeux
vjeux merged commit c521406 into prettier:master May 1, 2017
@vjeux

vjeux commented May 1, 2017

Copy link
Copy Markdown
Contributor Author

It keeps coming up, it seems like it's how people actually write their code.

@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 20, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants