Skip to content
PluginStats

prettier-plugin-salesforce weekly downloads statistics

By mattsimonis · npm · Prettier plugins

Prettier plugin for Salesforce Apex, metadata XML, Visualforce, Aura, and LWC template files.

View on npm Fresh · Dec 6, 2026

prettier-plugin-salesforce has 8 recorded weekly downloads on npm, a decrease of 33.3% over the past 30 days, ranking #3167 of 3,247 tracked listings.

Weekly downloads
8
Official API · Dec 5, 2026
7-day growth
+60.0%
+3 weekly downloads
30-day growth
-33.3%
-4 weekly downloads
90-day growth
-11.1%
-1 weekly downloads
Rank
#3167
▼ 59 in 7 days

About prettier-plugin-salesforce

prettier-plugin-salesforce

Prettier plugin for Salesforce Apex, Visualforce, Aura, LWC templates, and Salesforce metadata XML.

Site and playground: https://mattsimonis.github.io/prettier-plugin-salesforce/

Install

pnpm add -D prettier prettier-plugin-salesforce

Use the matching command for npm or Yarn if your project uses one of those package managers.

Configure

Add the plugin to .prettierrc:

{
  "plugins": ["prettier-plugin-salesforce"]
}

Format Salesforce source:

pnpm prettier --write "force-app/**/*"

Check formatting in CI:

pnpm prettier --check "force-app/**/*"

Do not set a top-level parser in a shared Prettier config. Use targeted overrides only when a file family needs a parser forced.

Supported files

SurfaceFiles
Apex.cls, .trigger, anonymous .apex files
Visualforce.page, .component
Aura markup.cmp, .intf, .tokens, .evt, .design, .auradoc, Aura .app
LWC templates.html files under an lwc path segment
LWC, Aura, and static resource assetsDelegated JS, TS, CSS, JSON, YAML, Markdown, and HTML text assets
Salesforce metadata XML*-meta.xml, .labels, known metadata family suffix files, and metadata XML paths
Salesforce payload text.email, .resource, .asset, .forceignore, and known Salesforce payload text paths

The plugin owns Salesforce paths only. Ordinary project files stay with Prettier core, another plugin, or no parser.

Options

OptionDefaultUse
salesforceSortLabelsByFullNamefalseSort <labels> blocks in CustomLabels metadata by nested <fullName>.
salesforceFinalNewlinetruePrint one trailing newline at the end of Salesforce-formatted files.
salesforceTestVisiblePlacement"own-line"Print Apex @TestVisible on its own line. Use "inline" to keep it with the declaration.
salesforceBlankLineBeforeLineCommentfalseAdd an empty line before standalone Apex // comments, except first comments in a block and comments directly after block comments.
salesforceLogicalOperatorPosition"end-of-line"Put wrapped Apex logical operators at the end of the previous line. Use "start-of-line" for leading operators.

Example:

{
  "plugins": ["prettier-plugin-salesforce"],
  "printWidth": 120,
  "salesforceSortLabelsByFullName": false,
  "salesforceLogicalOperatorPosition": "end-of-line"
}

Parser overrides

Most projects should let Prettier infer parsers. If your repo has broad parser overrides, put Salesforce-specific overrides later so they win:

{
  "plugins": ["prettier-plugin-salesforce"],
  "overrides": [
    { "files": "**/*-meta.xml", "options": { "parser": "html" } },
    {
      "files": ["**/*-meta.xml", "**/*.labels", "**/*.labels-meta.xml"],
      "options": { "parser": "salesforce-metadata-xml" }
    }
  ]
}

Available parser names:

ParserUse
salesforce-apexApex classes and triggers.
salesforce-apex-anonymousAnonymous Apex scripts.
salesforce-markupVisualforce and Aura markup.
salesforce-metadata-xmlSalesforce metadata XML and metadata suffix files.
salesforce-router-by-pathPath-aware router for shared extensions such as .html, .md, .xml, .svg, and .app.

Config audit APIs

The package exports helpers for finding risky Prettier overrides in Salesforce workspaces. The source repository also has a local audit:configs script for maintainers.

Programmatic APIs

import { routeFile } from "prettier-plugin-salesforce";
import { auditPrettierConfig } from "prettier-plugin-salesforce/config-audit";
import { scanPrettierConfigAuditReports } from "prettier-plugin-salesforce/config-audit/scan";
  • routeFile(filePath) returns the Salesforce route for a path.
  • auditPrettierConfig(config) reports risky parser overrides.
  • scanPrettierConfigAuditReports(root) scans a workspace tree.

For repository development, release checks, playground use, and deep routing notes, see the project README and docs/ directory.

Description from the npm listing.

  • prettier
  • prettier-plugin
  • salesforce
  • apex
  • sfdx

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

prettier-plugin-salesforce weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026, -11.1% over 90 days.prettier-plugin-salesforceWeekly downloads on npm · Last 90 days8downloads / week-11.1% over 90 days0246810121416Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-salesforce weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026, -11.1% over 90 days.

7/30/90-day growth

prettier-plugin-salesforce weekly downloads growth on npm: +60.0% over 7 days, -33.3% over 30 days, -11.1% over 90 days.prettier-plugin-salesforceWeekly downloads growth on npm8downloads / week now7-day growth+3 weekly downloads+60.0%30-day growth-4 weekly downloads-33.3%90-day growth-1 weekly downloads-11.1%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-salesforce weekly downloads growth on npm: +60.0% over 7 days, -33.3% over 30 days, -11.1% over 90 days.

Ranking history

prettier-plugin-salesforce npm ranking history: currently #3167 (by weekly downloads).prettier-plugin-salesforcenpm ranking · by weekly downloads · Last 90 days#3167current rank#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-salesforce npm ranking history: currently #3167 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 159, #9 (overall #3,169)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 12, #16 (overall #236)
Prettier plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for prettier-plugin-salesforce
Date (UTC)Weekly downloadsChange vs. previous
8+1
7+1
6+2
40
40
4+1
3-2
50
5+1
40
40
4-1
50
5—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-salesforce alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/prettier-plugin-salesforce. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.