Menu
Visual studio code prettier
If you want to ensure that all your files are formatted, enable the setting editor.formatOnSave in VS Code.
Prettier is a tool that automatically makes your code more readable and consistent with your project's style guide.VS Code is becoming the most popular Salesforce IDE, but unfortunately, VS Code does not have a default code formatter for Apex! For that, we can use some extensins like Prettierand/or Uncrustify.
Menu Automated code formatting with Prettier