🔎Enforce Consistent Code Style with Salesforce Prettier Apex Code Formatter
Write code instead of debating how your code should look
Greetings, Salesforce Product Hunter
Welcome to the Salesforce Product Hunt Newsletter, your go-to source to stay connected with the greatest Salesforce resources.
Let's dive in!
🚀 Prettier Apex [CLI App] [Web App]
This week I explored the most widely used Salesforce Apex formatter: prettier-plugin-apex.
Problem it Solves
Code formatting can often be a source of frustration in development teams, as maintaining a consistent style across multiple developers can be a daunting and time-consuming task. With each team member having their own coding preferences, ensuring uniformity throughout the codebase becomes increasingly difficult. This not only leads to inconsistencies but also wastes valuable time during code reviews, where team members must manually check for formatting issues, diverting attention away from more critical code quality concerns.
Apex Prettier Plugin comes to the rescue by automating the apex code formatting process, ensuring that code adheres to a consistent style without the need for manual intervention.
Notable features
Built on top of
jorje
, Salesforce's own internal parser so it is able to format Apex code with a very high degree of accuracy.Can be integrated with Visual Studio Code IDE.
Can format Anonymous Apex.
Integrates with CI/CD pipeline setup to enforce coding style.
Bonus Tip
This Prettier Apex Plugin has a web version. You can format the code without any installations.
What other apps you have in your toolbox that makes you more productive ?
Leave a comment
🌟 Featured Resource: Salesforce Dependent Picklist Matrix Export/Import
Easily export and import the Dependent Picklist Matrix in Salesforce.
Quote to ponder On
“I never dreamed about success. I worked for it.” — Estée Lauder
📢 For feedback or to sponsor this newsletter, send us a message here.
Happy Hunting!
Maninder
Thanks. Useful tool.