{"library":"prettier-plugin-powershell","title":"prettier-plugin-powershell","description":"Prettier plugin (v2.1.0, monthly releases) for formatting PowerShell source files (.ps1, .psm1, .psd1) with idiomatic defaults. Supports fine-grained configuration like indentation style/width, trailing commas, brace style, alias rewriting, and keyword casing. Requires Node.js >=20.11.0, Prettier >=3, and has an optional peer dependency on TypeScript ^6.0.3 for types. Extensively tested with ≥95% coverage, ready for CI/CD pipelines. Differentiator: first-class Prettier integration with options beyond basic PowerShell formatters.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install prettier-plugin-powershell"],"cli":null},"imports":["import plugin from 'prettier-plugin-powershell'","import { powershell } from 'prettier-plugin-powershell'","import type { Plugin } from 'prettier-plugin-powershell'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import prettier from 'prettier';\nimport plugin from 'prettier-plugin-powershell';\n\nconst source = `$greeting = \"Hello, World!\"\nWrite-Output $greeting\n`;\n\nconst formatted = await prettier.format(source, {\n  filepath: 'script.ps1',\n  parser: 'powershell',\n  plugins: [plugin],\n  tabWidth: 4,\n  powershellTrailingComma: 'all',\n});\n\nconsole.log(formatted);","lang":"typescript","description":"Formats a simple PowerShell script using the plugin programmatically with custom options.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}