prettier-plugin-powershell weekly downloads statistics
By Nick2bad4u (2 listings) · npm · Prettier plugins
Prettier plugin for formatting PowerShell source files with idiomatic defaults.
prettier-plugin-powershell has 2,525 recorded weekly downloads on npm, an increase of 76.8% over the past 30 days, ranking #1806 of 3,247 tracked listings.
About prettier-plugin-powershell
Prettier Plugin PowerShell
A Prettier 3 plugin that formats PowerShell source files (.ps1, .psm1, .psd1) with predictable, idiomatic output. The formatter is extensively tested (high coverage with strict CI thresholds) and ready for CI/CD pipelines, editor integrations, and automated release flows.

Table of contents
- Highlights
- Quick start
- Configuration reference
- Example formatting
- Contributing
- Credits
- License
- Contributors ✨
Highlights
- 🌟 Idiomatic PowerShell – balances spacing, casing, and pipeline layout while preserving comments and here-strings.
- 🔧 Fine-grained controls – tune indentation style/width, trailing delimiters, brace style, alias rewriting, and keyword casing.
- ⚡ Prettier-first – drop-in plugin for Prettier v3+, compatible with the CLI, editors, and format-on-save workflows.
- 📈 Production ready – enforced by CI (lint, typecheck, tests) with Codecov-powered reporting and ≥95 % coverage gates.
- 🛠️ TypeScript source – strongly typed AST helpers and printer utilities for easy extension.
Quick start
Install
npm install --save-dev prettier prettier-plugin-powershell
Requires Node.js 18.12 or newer and Prettier v3 or newer.
Prettier configuration
Add the plugin to your Prettier config (e.g. .prettierrc.json):
{
"plugins": ["prettier-plugin-powershell"],
"parser": "powershell"
}
You can co-locate plugin options with standard Prettier settings:
{
"plugins": ["prettier-plugin-powershell"],
"tabWidth": 2,
"powershellTrailingComma": "all",
"powershellRewriteAliases": true
}
Command line
Format scripts recursively:
npx prettier "**/*.ps1" --write
Programmatic usage
import prettier from "prettier";
import plugin from "prettier-plugin-powershell";
const formatted = await prettier.format(source, {
filepath: "script.ps1",
parser: "powershell",
plugins: [plugin],
});
Configuration reference
| Option | Type | Default | Description |
|---|---|---|---|
powershellIndentStyle | <code>"spaces"</code><br><code>"tabs"</code> | "spaces" | Render indentation with spaces or tabs. |
powershellIndentSize | number | 4 | Overrides Prettier's tabWidth specifically for PowerShell files (clamped between 1 and 8). |
powershellTrailingComma | <code>"none"</code><br><code>"multiline"</code><br><code>"all"</code> | "none" | When to emit trailing semicolons between hashtable entries (PowerShell arrays do not support trailing commas). |
powershellSortHashtableKeys | boolean | false | Sort hashtable keys alphabetically before printing. |
powershellBlankLinesBetweenFunctions | number | 1 | Minimum blank lines preserved between function declarations (clamped between 0 and 3). |
powershellBlankLineAfterParam | boolean | true | Insert a blank line after param (...) blocks within functions/script blocks. |
powershellBraceStyle | <code>"1tbs"</code><br><code>"allman"</code><br><code>"stroustrup"</code> | "1tbs" | Choose inline braces, Allman function braces, or Stroustrup continuation keywords on new lines. |
powershellLineWidth | number | 120 | Maximum print width for wrapping pipelines, hashtables, and arrays (clamped between 40 and 200). |
powershellPreferSingleQuote | boolean | false | Prefer single-quoted strings when interpolation is not required. |
| … |
Description from the npm listing.
- prettier
- prettier-plugin
- powershell
- formatter
- formatting
- ps1
- psm1
- psd1
- pwsh
- scripting
- devtools
- code-formatting
- opinionated
- powershell-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
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-plugin-powershell 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-powershell. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.