Site icon 峰哥分享

VSCode auto formatting change all single quotes to double quotes

I recently switch to a new computer. After setting up my angular environment, I noticed that my single quotes are changed to single quotes after a auto indent operation.
This will result the TSLint to give errors.
The problem is caused by the Prettier plugin.
This is good plugin. So you don’t have to uninstall it. Just add the following line into the user settings will resolve the problem.
“prettier.singleQuote”: true,
It’s also a good tool to transform all you double quotes to single quotes or vice versa.

Exit mobile version