Prettier plugin for Salesforce Marketing Cloud formatting AMPscript, SSJS, and SQL. v0.4.1 supports Prettier 3.7+. Key differentiator: unified formatting for SFMC-specific languages with auto-discovery, cross-block control flow handling, and embedded prettier-plugin-sql for T-SQL. Release cadence is frequent (minor/patch monthly).
npm install prettier-plugin-sfmcVerified import paths — ran on the pinned version, not inferred.
Install, configure, and run Prettier with SFMC plugin to format AMPscript, SSJS, and SQL files.
Upgrade Prettier to 3.7+.
To preserve old behavior, set `ampscriptBlockLineBreaks: true` in config.
Use `overrides` in .prettierrc for custom file types.
Override SQL options via prettier-plugin-sql config or disable SQL formatting.
Configure JavaScript options separately in .prettierrc.
npm install prettier-plugin-sfmc --save-dev
Upgrade Prettier to 3.7+.