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
svenanders opened this Issue Mar 30, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@svenanders
Copy link

svenanders commented Mar 30, 2017

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

This comment has been minimized.

Copy link
Collaborator

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.

@svenanders

This comment has been minimized.

Copy link
Author

svenanders commented Mar 31, 2017

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

This comment has been minimized.

Copy link

focusaurus commented Mar 31, 2017

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

This comment has been minimized.

Copy link
Collaborator

vjeux commented Apr 2, 2017

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

@vjeux vjeux closed this Apr 2, 2017

@ghost

This comment has been minimized.

Copy link

ghost commented Dec 2, 2017

How to change the default behaviour to single quote?

@suchipi

This comment has been minimized.

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

@gurgeous gurgeous referenced this issue Jan 26, 2018

Closed

quotes? #74

@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.