-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Comments
@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. |
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. |
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. |
I'm going to close this since it's not very actionable. |
How to change the default behaviour to single quote? |
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 |
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.
The text was updated successfully, but these errors were encountered: