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

Rationale for default double quotes #1105

Closed
robbestad opened this issue Mar 30, 2017 · 6 comments
Closed

Rationale for default double quotes #1105

robbestad opened this issue Mar 30, 2017 · 6 comments
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Comments

@robbestad
Copy link

What is the rationale for enforcing double quotes as standard (when it seems most other use single quotes)?

I support and encourage using double quotes, so I'm not asking for this to change. I'm asking because I'd like to know how you arrived at this position.

@vjeux
Copy link
Contributor

vjeux commented Mar 31, 2017

@jlongster used double quotes on his projects so he started the project with it. But it turns out that most of the js world use single quote so we want to switch the default. We need to find a good transition path though to avoid a big breaking change.

@robbestad
Copy link
Author

All right! Raised this issue internally at my company and apparently no-one is in favor of double quotes. I still like it, but I'll bend to the majority view.

@focusaurus
Copy link

FYI I prefer double quotes because JSON requires them and I often have to move snippets of object literals between JSON documents and javascript code. There's a lot more tooling around switching things around these days, but that's the main reason I prefer double quotes in my javascript.

@vjeux
Copy link
Contributor

vjeux commented Apr 2, 2017

I'm going to close this since it's not very actionable.

@vjeux vjeux closed this as completed Apr 2, 2017
@ghost
Copy link

ghost commented Dec 2, 2017

How to change the default behaviour to single quote?

@suchipi
Copy link
Member

suchipi commented Dec 2, 2017

The default behavior (that is, what happens when you use prettier with no options set) is to use double quotes. If you want to override the default behavior to use single quotes in your project, use the --single-quote option. https://prettier.io/docs/en/options.html

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jul 6, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 6, 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.
Projects
None yet
Development

No branches or pull requests

4 participants