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

Add option to keep quotes consistent instead of removing escape characters. #2516

Closed
ssylvia opened this issue Jul 19, 2017 · 1 comment
Closed
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:option request Issues requesting a new option. We generally don’t accept these unless there is technical necessity.

Comments

@ssylvia
Copy link

ssylvia commented Jul 19, 2017

Prettier provide an option to in use consistent quotes but will start mixing quotes to avoid escape characters. Can we provide an option to always use the same quote style and keep escape characters?

Looks like there's other interest in keeping all quotes consistent:
#838
#2031
#973
#2338

@azz
Copy link
Member

azz commented Jul 20, 2017

We won't be adding an option for this at this time. There hasn't been a lot of demand for this so I think the default behaviour is good.

#973 (comment)
We are now past 1.0 and are not going to do any big formatting changes like the one proposed here. There are pros and cons for both approaches and I don't think that we're going to get everyone happy, so it's best to keep with the status quo.

As for prettier being a code formatter and not a refactoring tool, this is true. But single/double quotes is more often than not lumped inside of the formatting category, so prettier has to make a decision around those.

@azz azz closed this as completed Jul 20, 2017
@azz azz added the type:option request Issues requesting a new option. We generally don’t accept these unless there is technical necessity. label Jul 20, 2017
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jul 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 7, 2018
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. type:option request Issues requesting a new option. We generally don’t accept these unless there is technical necessity.
Projects
None yet
Development

No branches or pull requests

2 participants