prettier-plugin-penere weekly downloads statistics
By ditojs · npm · Prettier plugins
Prettier that respects your line breaks: expressive, controllable formatting on top of stock Prettier
prettier-plugin-penere has 1,428 recorded weekly downloads on npm, an increase of 114% over the past 30 days, ranking #1978 of 3,247 tracked listings.
About prettier-plugin-penere
Penere
A Prettier plugin that makes it less opinionated and a bit more expressive, by respecting your line breaks.
Penere lets you decide how code is laid out, by where you put the first line break, and formats everything else the way Prettier does.
Try it in the playground, side by side with stock Prettier.
// Written on one line, stays on one line (if it fits):
const sizes = [1, 2, 3]
// Broken after the opener, stays expanded:
const sizes = [
1, 2, 3
]
The idea
Prettier already does this for object literals with
objectWrap: "preserve": if
there is a line break between { and the first property, the object stays
expanded. Penere applies the same rule everywhere else:
- Break after the opener (
[,(,{,<,${, before the first.of a chain, …) and the construct stays expanded. - Join it back onto one line and Prettier collapses it again, if it fits.
Everything you don't express this way is formatted by stock Prettier. Each rule
is an option, and wrap: "collapse" turns them all off, giving you exactly
stock Prettier.
Usage
Install Prettier and the plugin:
npm install --save-dev prettier prettier-plugin-penere
Add the plugin to your Prettier configuration:
// prettier.config.js
export default {
plugins: ['prettier-plugin-penere']
}
That's all: Prettier now formats JavaScript, TypeScript, Flow and JSX with Penere, wherever it runs, in editors, on the command line, in pre-commit hooks, or through eslint-plugin-prettier. All options default to Penere's behavior, and can be set next to Prettier's own options:
// prettier.config.js
export default {
plugins: ['prettier-plugin-penere'],
semi: false,
singleQuote: true,
arrowParens: 'avoid',
trailingComma: 'none',
// Penere options:
argumentWrap: 'collapse',
clarifyMixedOperators: true
}
On the command line, without a configuration file:
npx prettier --plugin prettier-plugin-penere --write .
And through Prettier's API:
import * as prettier from 'prettier'
import penere from 'prettier-plugin-penere'
const formatted = await prettier.format(code, {
parser: 'babel',
plugins: [penere]
})
Options
wrap sets all *Wrap options at once, and each of them can be set on its own
to override it. They take "preserve" (Penere) or "collapse" (stock
Prettier), like Prettier's own objectWrap.
| Option | Default | Covers |
|---|---|---|
wrap | "preserve" | All *Wrap options that aren't set, and the ones below |
arrayWrap | wrap | Arrays, array destructuring and tuples |
parameterWrap | wrap | Function parameters |
argumentWrap | wrap | Call arguments |
conditionWrap | wrap | Conditions of if, while and do … while |
memberChainWrap | wrap | Member chains |
objectDestructuringWrap | wrap | Object destructuring |
ternaryWrap | wrap | Conditional expressions and types |
templateLiteralWrap | wrap | Template literal interpolations |
operatorWrap | wrap | Binary and logical operators, and assignments of them |
importExportWrap | wrap | Named imports and exports |
jsxAttributeWrap | wrap | JSX attributes |
typeParameterWrap | wrap | Type parameters and arguments |
extendsWrap | wrap | extends clauses of interfaces |
unionTypeWrap | wrap | Union types |
mappedTypeWrap | wrap | Keys of mapped types |
The other options are not about line breaks. When they aren't set, they follow
wrap too: Penere's value with "preserve", stock Prettier's with
"collapse".
| Option | "preserve" | "collapse" | Covers |
|---|---|---|---|
hugLastParameter | true | false | Hug the last parameter if it's the only destructured one |
conciseStringArrays | true | false | Fill arrays of strings like arrays of numbers |
breakComplexArrayItems | false | true | Always break arrays of objects or arrays |
clarifyMixedOperators | false | true | Add parentheses to mixed operators for readability |
preserveParentheses | true | false | Keep redundant parentheses from the source |
Object literals are left to Prettier's own objectWrap, which already defaults
to "preserve".
The examples below show the input, and the output with each value of the option.
arrayWrap
Break if the source breaks after [, and keep the rows of elements as written,
e.g. to group them. If the first row has only one element, every element goes
on its own line.…
Description from the npm listing.
- prettier
- prettier-plugin
- penere
- formatter
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-penere 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-penere. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.