简体   繁体   English

想通过使用更漂亮的代码格式化程序 VS CODE 来使用单引号

[英]want to use single quotes by using prettier code formatter VS CODE

我已经从 Visual Studio 代码的扩展中下载了更漂亮的,我想使用单引号而不是双引号请帮忙

Take a look at the configuration doc .查看配置文档

// prettier.config.js or .prettierrc.js
module.exports = {
  trailingComma: "es5",
  tabWidth: 4,
  semi: false,
  singleQuote: true, //what you want
};

Edit: or you can simply go to the extension settings and search for prettier.singleQuote .编辑:或者您可以简单地转到扩展设置并搜索prettier.singleQuote

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM