Skip to content
PluginStats

prettier-plugin-pkg weekly downloads statistics

By un-ts (5 listings) · npm · Prettier plugins

An opinionated package.json formatter plugin for Prettier

View on npm Fresh · Dec 6, 2026

prettier-plugin-pkg has 47,680 recorded weekly downloads on npm, a decrease of 3.8% over the past 30 days, ranking #803 of 3,247 tracked listings.

Weekly downloads
47,680
Official API · Dec 5, 2026
7-day growth
-4.5%
-2.2K weekly downloads
30-day growth
-3.8%
-1.9K weekly downloads
90-day growth
+44.5%
+14.7K weekly downloads
Rank
#803
▼ 45 in 7 days

About prettier-plugin-pkg

banner

prettier-plugin-pkg npm bundle size npm bundle size

An opinionated package.json formatter plugin for Prettier, based on [prettier-plugin-package][].

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing, taking various rules into account.

This plugin adds support for package.json files used within NPM modules, [npm][], [yarn][] and [VSCode][] is supported out of box.

Requirements

prettier-plugin-pkg is an evergreen module. 🌲 This module requires an LTS Node version (v12.0.0+).

Install

# npm
npm i -D prettier prettier-plugin-pkg

# yarn
yarn add -D prettier prettier-plugin-pkg

Usage

Once installed, Prettier plugins must be added to .prettierrc:

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

Then:

# npx
npx prettier --write package.json

# yarn
yarn prettier --write package.json

Rules

This plugin enforces its own set of opinionated rules:

Engines

Keys in engines are ordered alphabetically.

Files

Keys in files are ordered alphabetically (keeping the negations below), followed by README.md and LICENSE if they exist in the array.

Scripts

Keys in scripts are ordered alphabetically. Use prefixes wisely to properly order child scripts. e.g. lint, lint:ts.

Sorting

Top-level keys are sorted according to a style commonly seen in the packages of @JounQin, @1stG and @unts. Known keys, and their order are

<!-- prettier-ignore -->
[
  // schema definition
  "$schema",

  // meta
  "name",
  "version",
  "type",
  "flat",
  "displayName",
  "description",
  "categories",
  "repository",
  "homepage",
  "bugs",
  "donate",
  "funding",
  "sponsor",
  "author",
  "publisher",
  "maintainers",
  "contributors",
  "license",
  "preview",
  "private",
  "workspaces",

  // constraints
  "languageName",
  "packageManager",
  "engines",
  "cpu",
  "os",
  "libc",
  "devEngines",

  // entries
  "man",
  "bin",
  "main",
  "types",
  "typings",
  "typesVersions",
  "module",
  "imports",
  "exports",
  "esnext",
  "es2020",
  "esm2020",
  "fesm2020",
  "es2015",
  "esm2015",
  "fesm2015",
  "es5",
  "esm5",
  "fesm5",
  "browser",
  "umd",
  "jsdelivr",
  "unpkg",

  // contents and utils
  "directories",
  "files",
  "keywords",
  "scripts",
  "config",

  // dependencies
  "bundledDependencies",
  "peerDependencies",
  "peerDependenciesMeta",
  "dependencies",
  "dependenciesMeta",
  "optionalDependencies",
  "devDependencies",
  "overrides",
  "resolutions",
  "publishConfig",
  "sideEffects",

  // vscode spec
  "icon",
  "badges",
  "galleryBanner",
  "activationEvents",
  "contributes",
  "markdown",
  "qna",
  "extensionPack",
  "extensionDependencies",
  "extensionKind"
]

Unknown keys, or keys not part of the list above, will be alphabetically sorted and added to the end of the file. Note that this list takes into account both npm and yarn keys.

You can also use the packageSortOrder option to specify a custom sort order, or use the packageSortOrderPreset option to use a preset sort order:

Forthcoming

Forthcoming rules include:

  • Author format
  • Repository format

Format Options

interface FormatOptions {
  // An array of property names to sort the package.json properties by.
  packageSortOrder?: string[]
  // An array of property names to ignore when sorting the package.json properties.
  packageIgnoreSort?: string[]
  // A preset for the package.json sort order.
  packageSortOrderPreset?: 'npm' | 'npm-plus'
}

Acknowledgements

Thanks for @shellscape's original great work of [prettier-plugin-package][] again.

Sponsors and Backers

Sponsors and Backers

Sponsors
1stGRxTSUnTS
1stG Open Collective sponsorsRxTS Open Collective sponsorsUnTS Open Collective sponsors
Backers…

Description from the npm listing.

  • package
  • package.json
  • pkg
  • plugin
  • prettier
  • prettier-plugin

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-pkg weekly downloads on npm, last 90 days: 47,680 weekly downloads as of Dec 5, 2026, +44.5% over 90 days.prettier-plugin-pkgWeekly downloads on npm · Last 90 days47,680downloads / week+44.5% over 90 days010K20K30K40K50K60KSep 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-pkg weekly downloads on npm, last 90 days: 47,680 weekly downloads as of Dec 5, 2026, +44.5% over 90 days.

7/30/90-day growth

prettier-plugin-pkg weekly downloads growth on npm: -4.5% over 7 days, -3.8% over 30 days, +44.5% over 90 days.prettier-plugin-pkgWeekly downloads growth on npm47,680downloads / week now7-day growth-2,229 weekly downloads-4.5%30-day growth-1,898 weekly downloads-3.8%90-day growth+14,676 weekly downloads+44.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-pkg weekly downloads growth on npm: -4.5% over 7 days, -3.8% over 30 days, +44.5% over 90 days.

Ranking history

prettier-plugin-pkg npm ranking history: currently #803 (by weekly downloads).prettier-plugin-pkgnpm ranking · by weekly downloads · Last 90 days#803current rank#740#750#760#770#780#790#800#810#820Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-pkg npm ranking history: currently #803 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 41, #3 (overall #803)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 1, #11 (overall #11)
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-pkg
Date (UTC)Weekly downloadsChange vs. previous
47,680-2.1K
49,787+1.7K
48,083+2K
46,061+1.2K
44,816+1.8K
43,032-3.4K
46,392-3.5K
49,909+1.4K
48,501-33
48,534+198
48,336-476
48,812-678
49,490+3.9K
45,568—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-pkg 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-pkg. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.