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

Request: Add config flag for JSX ternaries #6279

Closed
denieler opened this issue Jul 8, 2019 · 4 comments
Closed

Request: Add config flag for JSX ternaries #6279

denieler opened this issue Jul 8, 2019 · 4 comments
Labels
lang:jsx Issues affecting JSX (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Comments

@denieler
Copy link

denieler commented Jul 8, 2019

Hey! I was searching for the answer why my JSX ternaries look so weird and ugly and found this issue #4139, which is closed. Please guys, can you make a configuration flag to be able to opt out from this decision.

Thank you in advance!

@denieler denieler changed the title Add config for JSX ternaries Add config flag for JSX ternaries Jul 8, 2019
@denieler denieler changed the title Add config flag for JSX ternaries Request: Add config flag for JSX ternaries Jul 8, 2019
@lydell
Copy link
Member

lydell commented Jul 8, 2019

Hi!

The reason for closing #4139 still stands: #4139 (comment)

Have you used Prettier for a while, or are just getting started? It might be helpful to know that we've had several issues closed by the people opening them a couple of months later. After using Prettier for a while they realized that the formatting the were initially bothered by was no longer an issue.

When it comes to JSX formatting, that is something that we've gone through several phases of improvements of and are quite happy with! So it is not something that we're going to change. Sorry! As you can see we have over 600 other issues to work on.

So in this case I'm going to close your issue, but thanks for using Prettier! 🙇‍♂️

@lydell lydell closed this as completed Jul 8, 2019
@lydell lydell added the lang:jsx Issues affecting JSX (not general JS issues) label Jul 8, 2019
@denieler
Copy link
Author

denieler commented Jul 8, 2019

hi @lydell , no actually I've been using it for years, it's a great tool, but customization in some places can make it magnificent. You have a configuration singleQuote, I don't see the big difference between the decision for having such configuration and having another for ternaries in JSX.

I know you probably will not do anything with this issue but just wanted to show that there are some people in the community, which are not extremely happy with the decision.

Also, it's quite strange that ternary operators are working as expected in JS, for example Playground from #5881. And it's not really clear for me why it was made another decision for JSX.

@kachkaev
Copy link
Member

kachkaev commented Jul 9, 2019

@denieler see https://prettier.io/docs/en/option-philosophy.html and also check out the number of 👍 in #40 🙂

@denieler
Copy link
Author

denieler commented Jul 9, 2019

@kachkaev I think if #4139 would not be limited to collaborators it would also take numbers and number of 👍

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:jsx Issues affecting JSX (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

3 participants