@aforemendude/prettier-plugin-json-utils weekly downloads statistics
By aforemendude (2 listings) · npm · Prettier plugins
A Prettier plugin for sorting JSON keys, with specialized modes for VS Code settings and package.json files.
@aforemendude/prettier-plugin-json-utils has 1 recorded weekly downloads on npm, a decrease of 97.9% over the past 30 days, ranking #2186 of 2,256 tracked listings.
About @aforemendude/prettier-plugin-json-utils
Prettier Plugin JSON Utils
A Prettier plugin for sorting JSON keys, with specialized modes for VS Code settings and package.json files.
The plugin has three modes:
• sort-keys (default) recursively sorts object keys while preserving array order and values. • vscode-settings recursively sorts object keys and normalizes selected Code Spell Checker word lists. • package-json recursively sorts object keys while preserving the order-sensitive conditional keys below exports and imports.
Requirements
• Node.js 20 or newer • Prettier 3.9.0 or newer within version 3
Installation
Configuration
Load the plugin in your Prettier configuration:
With no additional configuration, the plugin uses sort-keys for all supported JSON files. You can also select it explicitly:
Modes are never inferred from filenames or parsers. To use the specialized modes, set jsonUtilsMode globally or in an override. For example:
The plugin wraps Prettier's json, jsonc, json5, and json-stringify parsers. The default is sort-keys for all four parsers, including when calling prettier.format() without a filepath.
When loaded after another JSON plugin, this plugin delegates to the nearest preceding parser with the same astFormat as Prettier's built-in parser. Parsers with a different or missing astFormat and their preprocessors are skipped. If no compatible parser is found, Prettier's built-in parser is used.
If you previously relied on automatic mode selection, add explicit overrides like those above to retain the specialized behavior. Files with nonstandard names can use the same options.
Sort Keys Mode (Default)
All object keys are sorted recursively with JavaScript's case-sensitive lexicographic ordering, including objects inside arrays. Array elements retain their order and string values retain their case. Comments are preserved and move with the properties they describe.
This mode also sorts keys inside exports and imports. Select package-json for package manifests that need conditional key order preserved, and vscode-settings to normalize supported cSpell word lists.
VS Code Settings Mode
All object keys are sorted recursively with JavaScript's case-sensitive lexicographic ordering. Normal array order is preserved, and object keys inside arrays are still sorted.
Arrays assigned to these exact property names are additionally lowercased and sorted:
• cSpell.flagWords • cSpell.ignoreWords • cSpell.userWords • cSpell.words
The normalization applies at any nesting level and retains duplicate entries. If one of these settings is not an array of strings, its array contents are left unchanged. Because sorting occurs on Prettier's JSON AST, comments in JSON and JSONC settings files are preserved and move with the values they describe.
Package JSON Mode
Object keys are sorted recursively and array elements retain their original order, matching the JSON serialization policy in upgrade-npm-packages with these order-sensitive exceptions:
• Subpath keys in the root exports object are sorted. • A root exports object containing only condition keys retains its order. • Specifier keys in the root imports object are sorted. • Conditional keys and all nested objects below exports and imports retain their order.
Conditional order is semantically significant in Node.js, so a sequence such as types, import, require, default is never alphabetized by this mode.
Development
Working on this repository requires Node.js 22.12.0 or newer. The published plugin requires Node.js 20 or newer.
npm run test runs the TypeScript unit and integration suites with Vitest. npm run build removes and recreates dist, and npm run verify runs formatting, type checking, the build, and all tests.
Description from the npm listing.
- prettier
- prettier-plugin
- json
- package-json
- vscode
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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 (121)Similar npm Prettier plugins plugins
All 20 @aforemendude/prettier-plugin-json-utils alternativesData 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/@aforemendude/prettier-plugin-json-utils. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.