typescript 代码格式化 Visual Studio 代码 - 行长
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53253523/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Code formatting Visual Studio Code - Line Length
提问by Gabriel Castillo Prada
I've been working with Visual Studio Code for a while. Since yesterday the code formatting is not working as I expect but I haven't changed any configuration.
我使用 Visual Studio Code 已经有一段时间了。从昨天开始,代码格式没有按照我的预期工作,但我没有更改任何配置。
This is the file without formatting
这是没有格式化的文件
When it gets formatted:
当它被格式化时:
These are the settings modified by me
这些是我修改的设置
What can I do form improving this?
我能做些什么来改善这个?
回答by basarat
This is not TypeScript or VSCode doing this.
这不是 TypeScript 或 VSCode 这样做。
You have the prettier extension installed. Prettier will always do this, as prettier knows better
您安装了更漂亮的扩展。Prettier 总是会这样做,因为prettier 知道得更清楚