【发布时间】:2020-07-25 03:53:22
【问题描述】:
如何使我的代码格式更漂亮,就像在图片上一样?
每次我保存我的代码时,它都会被格式化为一行代码,但将它保存在共享图片上对我来说更具可读性。
编辑:
我的 .prettierrc:
{
"singleQuote": true,
"printWidth": 200,
"semi": true,
"bracketSpacing": true,
"arrowParens": "always",
"parser": "typescript",
"useTabs": false,
"tabWidth": 2
}
【问题讨论】:
-
应该可以,如this playground所示。
-
你的配置是什么样的?
-
在主帖中添加了我的配置。
标签: visual-studio-code code-formatting prettier