prettier-rm-duplicate-json-keys weekly downloads statistics
By zhoujiwei529 · npm · Prettier plugins
A Prettier plugin that removes duplicate keys from JSON files
prettier-rm-duplicate-json-keys has 13 recorded weekly downloads on npm, an increase of 117% over the past 30 days, ranking #3089 of 3,247 tracked listings.
About prettier-rm-duplicate-json-keys
Prettier Plugin: Remove Duplicate JSON Keys
Modified based on prettier-plugin-sort-json. A Prettier plugin that removes duplicate keys from JSON files and provides flexible sorting options.
Features
- Removes duplicate keys from JSON files
- Supports various sorting algorithms for JSON keys
- Configurable recursive sorting
- Case-insensitive sorting options
- Numeric and lexical sorting options
Installation
npm install --save-dev prettier-rm-duplicate-json-keys
Usage
Add the plugin to your Prettier configuration:
{
"plugins": ["prettier-rm-duplicate-json-keys"],
"jsonRecursiveSort": true,
"jsonSortOrder": "lexical"
}
Configuration
Options
-
jsonRecursiveSort(boolean, default: false)- When true, sorts JSON files recursively, including any nested properties
-
jsonSortOrder(string, default: "lexical")- Specifies the sorting algorithm to use
- Available options:
lexical: Standard alphabetical sortingnumeric: Numeric prefix sortingcaseInsensitiveLexical: Case-insensitive alphabetical sortingcaseInsensitiveNumeric: Case-insensitive numeric prefix sortingreverseLexical: Reverse alphabetical sortingreverseNumeric: Reverse numeric prefix sortingcaseInsensitiveReverseLexical: Case-insensitive reverse alphabetical sortingcaseInsensitiveReverseNumeric: Case-insensitive reverse numeric prefix sortingnone: No sorting
Example
Input JSON:
{
"a": 1,
"b": 2,
"b": 3,
"c": {
"z": 1,
"y": 2,
"z": 3
}
}
Output JSON (with jsonSortOrder: "lexical"):
{
"a": 1,
"b": 2,
"c": {
"y": 2,
"z": 1
}
}
Development
# Install dependencies
npm install
# Build the project
npm run build
License
ISC
Description from the npm listing.
- prettier
- prettier-plugin
- json
- duplicate-keys
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 (170)Similar npm Prettier plugins plugins
All 20 prettier-rm-duplicate-json-keys 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/prettier-rm-duplicate-json-keys. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.