简体   繁体   English

在VS代码中进行Tslint.config格式化/美化

[英]Tslint.config formatting/beautification in VS code

How to get tslint.config based formatting in VSCode. 如何在VSCode中获取基于tslint.config的格式。 I tried some extensions and it warns me about code quality, but not format/beautify my code on save 我尝试了一些扩展,它警告我代码质量,但不保存格式化/美化我的代码

There is a config option for vscode-tslint tslint.autoFixOnSave , which will run the fixes for any rules that have fixes. vscode-tslint tslint.autoFixOnSave有一个配置选项,它将运行任何具有修复的规则的修复程序。

As suggested above prettier would be a better solution for formatting your code. 如上所述, 更漂亮的是格式化代码的更好解决方案。 You'll want to use tslint-config-prettier , to avoid conflicts between them. 你会想要使用tslint-config-prettier来避免它们之间的冲突。 Allowing prettier to do formatting, and tslint to do any other fixes. 允许更漂亮的格式化,tslint做任何其他修复。

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

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