-
Notifications
You must be signed in to change notification settings - Fork 63
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
Configuration for quote style of strings #28
Comments
I'm in favor of adding a configuration and I think forcing it is good. I can't see it being desirable to swap out string styles to avoid as many string escapes as possible. That seems to go in the face of "consistency" and is really only applicable to |
I tend to agree with prettier's string rationale. The whole point of using a formatter is that the computer can make these changes when people are unable/unwilling and do it correctly every time. So I'd rather the formatter aim to reduce the amount of escaping in the string as much as possible. I'll agree with how they do prettier's option as well here. And I think the option for configuration is a good idea in this case. |
#73 will add support for this configuration. I have decided to default to preferring double quotes, but not forcing it. I did this so it falls in line with other similar formatters, like prettier. The original behaviour is still available by setting |
Quote style (single quote vs double quote) for strings is a hot topic, including what to do with escapes, consistency etc.
I was wondering whether we should introduce configuration for this specific point.
There would have to be two parts to this:
So, there are two questions to answer here: 1) should we add this configuration option? and 2) what should be our default? [currently our default is double quote - which will remain so - and forcing regardless of escapes - which I'm not sure which is better]
The text was updated successfully, but these errors were encountered: