问题描述
我想知道是否有像 Eslint for Flutter/Dart 这样的库,它会在我保存文件时自动插入分号和尾随逗号.
I was wondering if there is a library like Eslint for Flutter/Dart that will automatically insert semicolons and trailing commas when I save the file.
FLutter 版本:1.22.3飞镖版本:2.10.3
FLutter Version: 1.22.3Dart Version: 2.10.3
推荐答案
文档中有 Code Formatting 帮助区.有 VsCode 部分 这里.它解释了
There is a Code Formatting help area in the documentation.There is a section for VsCode Here. It explains that
要在当前源代码窗口中自动格式化代码,请在代码窗口中右键单击并选择格式化文档.您可以为此 VS Code 首选项添加键盘快捷键.
安装 Flutter 扩展后.
After installing the Flutter extension.
我还发现了另一个 Stack Overflow 帖子 此处 可以帮助您提供一些扩展建议以及一种在 VsCode 中/在 VsCode 中创建自己的绑定的方法.
I also found another Stack Overflow post Here that may be able to help you with a few extension suggestions and a way to make your own bindings for/in VsCode.
这篇关于有没有办法用 vscode 自动格式化颤振?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!