-
-
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
--single-quote not working consistently #2031
Comments
Prettier avoids escaping |
I've noticed that it changes to double quotes in the messages that have a single quote as part of the string. ie: It's unknown how to convert the zero number |
Is there a workaround to that, so my lint won't get mad at me? |
You should disable the linting rules that disagrees with prettier. Easiest is just https://github.com/prettier/eslint-config-prettier, but if it's eslint you can set |
Yeah, thanks I'll use backtick in the config so I'll have the consistency that I'm aiming. Thanks for the fast reply, closing the issue now. |
I have a really simple application that converts a numeral to roman. I'm using prettier to format the code, and the single-quote option it's not working consistently, it changes some exceptions message to single-quote and others to double-quote, I'll put screens from before and after formatting.
![screenshot from 2017-06-07 15-03-06](https://user-images.githubusercontent.com/26486135/26893718-83865e94-4b92-11e7-99fd-a891c7e6ca75.png)
Before
After
![screenshot from 2017-06-07 15-03-21](https://user-images.githubusercontent.com/26486135/26893731-8d780948-4b92-11e7-8d1b-ceefd6aba56c.png)
This is the line that I'm executing in my packages.json
"prettier": "prettier --write --single-quote \"src/*.js\" "
The text was updated successfully, but these errors were encountered: