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 Version: 1.22.3 Dart Version: 2.10.3
With VS Code version 1.53 ( I am sure previous have this too) you don't need to install any special extension. Just navigate to:
Preferences -> Settings -> Text Editor -> Formatting
make sure "Format on save" is enabled
with every time you hit Ctrl + S
your file will be saved as well as code formatted.
flutter
extension.settings.json
file:"[dart]": {
"editor.defaultFormatter": "Dart-Code.dart-code",
"editor.formatOnSave": true,
}
after this, you can format your dart file with the save (ctrl+s
) action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With