{"library":"prettier-plugin-apex","title":"Prettier Apex","description":"A plugin for Prettier that formats Salesforce Apex code. Current stable version is 2.2.6, maintained by the Salesforce developer community. It supports all Apex syntax including triggers, classes, and anonymous blocks. Release cadence is irregular but active. Key differentiators: it is the only actively maintained Prettier plugin for Apex, integrates seamlessly with Prettier's CLI and APIs, and supports modern Apex features like lambda expressions and enhanced loops.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-apex"],"cli":null},"imports":["import prettier from 'prettier';","import * as prettierPluginApex from 'prettier-plugin-apex';","import type { Options } from 'prettier';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import prettier from 'prettier';\nimport * as prettierPluginApex from 'prettier-plugin-apex';\n\nconst code = `public class MyClass { public static void test() { System.debug('hello'); } }`;\n\nprettier.format(code, {\n  parser: 'apex',\n  plugins: [prettierPluginApex],\n  apexInsertFinalNewline: true,\n}).then(result => console.log(result));\n// Output:\n// public class MyClass {\n//   public static void test() {\n//     System.debug('hello');\n//   }\n// }\n","lang":"typescript","description":"Formats a simple Apex class using Prettier with the Apex plugin.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}