prettier-plugin-insert-comma weekly downloads statistics
By refirst11 · npm · Prettier plugins
A Prettier plugin for inserting missing commas in multi-line objects.
prettier-plugin-insert-comma has 72 recorded weekly downloads on npm, a decrease of 15.3% over the past 30 days, ranking #1781 of 2,322 tracked listings.
About prettier-plugin-insert-comma
prettier-plugin-insert-comma
A Prettier plugin that automatically inserts missing commas in multi-line object properties before formatting.
Prettier cannot format code with syntax errors like missing commas in objects. This plugin runs as a preprocessor to insert commas between properties, allowing Prettier to format your code successfully.
The plugin first checks the original source with Prettier's language parser. If the parser reports a missing comma, it inserts a separator and checks again. This preserves literal contents, including regular expressions, JSX text, and nested template strings. Comments, shorthand properties, methods, numeric and Unicode keys are supported. Trailing commas are left to Prettier's settings.
Recovery requires another parse for each missing comma and is limited to 100 insertions per file. If recovery fails or reaches that limit without producing valid syntax, the original source is passed back to Prettier for its normal error reporting. Other syntax errors are not repaired.
Requirements
- Prettier 3.7.0 or higher
Example
Before — Prettier would throw a parse error:
const config = {
host: 'localhost'
port: 3000
options: {
debug: true
verbose: false
}
}
After — commas are inserted, Prettier formats normally:
const config = {
host: 'localhost',
port: 3000,
options: {
debug: true,
verbose: false,
},
};
Installation
Install prettier-plugin-insert-comma as a dev dependency:
npm install -D prettier prettier-plugin-insert-comma
Then add the plugin to your Prettier configuration:
// .prettierrc
{
"plugins": ["prettier-plugin-insert-comma"],
}
For JSON files, you need to specify the parser explicitly with overrides:
{
"plugins": ["prettier-plugin-insert-comma"],
"overrides": [
{
"files": ["*.json"],
"options": {
"parser": "json",
"quoteProps": "preserve",
"singleQuote": false,
"trailingComma": "none"
}
}
]
}
Supported Languages
| Language |
|---|
| TypeScript, TSX |
| JavaScript, JSX |
| JSON |
Description from the npm listing.
- prettier
- prettier-plugin
- comma
- missing-comma
- auto-fix
- typescript
- javascript
- json
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 (122)Similar npm Prettier plugins plugins
All 20 prettier-plugin-insert-comma 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-plugin-insert-comma. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.