prettier-plugin-multiline-arrays-2 weekly downloads statistics
By Nick2bad4u (2 listings) · npm · Prettier plugins
Prettier plugin to force array elements to wrap onto new lines.
prettier-plugin-multiline-arrays-2 has 167 recorded weekly downloads on npm, an increase of 12.8% over the past 30 days, ranking #1690 of 2,322 tracked listings.
About prettier-plugin-multiline-arrays-2
prettier-plugin-multiline-arrays-2
Prettier plugin to force array elements to wrap onto new lines, even when there is only one element. It supports TypeScript, JavaScript, JSON, and JSON5, with options for array wrap thresholds, per-line element patterns, and opt-in TypeScript union wrapping.
[!NOTE] This is a maintained fork of electrovir/prettier-plugin-multiline-arrays. Credit to the original plugin for the core idea and implementation.
Install
npm install --save-dev prettier-plugin-multiline-arrays-2
Add the plugin to your Prettier config:
export default {
plugins: ["prettier-plugin-multiline-arrays-2"],
};
When combining this plugin with parser/preprocessor plugins such as prettier-plugin-organize-imports, put prettier-plugin-multiline-arrays-2 last. Prettier 3.9 selects the last plugin-provided parser for a parser name, and this plugin needs its parser wrapper to run so it can delegate to companion preprocessors and then apply multiline array printing.
Options
multilineArraysWrapThreshold: number. Arrays with more elements than this value are forced to wrap. The default is-1, which disables automatic threshold wrapping.multilineArraysLinePattern: string. Space- or comma-separated list of numbers controlling the element count per line. The pattern repeats for longer arrays. The default is"1".multilineTypeUnionsWrapThreshold: number. TypeScript union types with more members than this value are forced to wrap with one member per line. The default is-1, which disables union wrapping.
Example:
{
"multilineArraysWrapThreshold": 3,
"multilineArraysLinePattern": "2 1",
"multilineTypeUnionsWrapThreshold": 2
}
Comment Overrides
Use comments to override the next array:
// prettier-multiline-arrays-next-threshold: 4
const thresholdArray = ["a", "b", "c", "d", "e"];
// prettier-multiline-arrays-next-line-pattern: 2 1
const patternedArray = ["a", "b", "c", "d", "e"];
Use set comments to affect later arrays in a file:
// prettier-multiline-arrays-set-threshold: 5
// prettier-multiline-arrays-set-line-pattern: 2 1 3
Use prettier-multiline-arrays-reset to return to the configured defaults.
Comment overrides only apply to array formatting. TypeScript union wrapping is
controlled by multilineTypeUnionsWrapThreshold.
Precedence
- Comment overrides.
- Manual wrapping from leading new lines or trailing commas.
- Prettier options.
- Default behavior.
Development
npm ci
npm run build
npm test
npm run release:check
The test suite runs with Vitest coverage. Release verification also packs the plugin and tests it in isolated consumer projects against both the exact minimum supported Prettier version and the newest published version allowed by the peer range.
Description from the npm listing.
- array
- format
- multiline
- prettier
- prettier-plugin
- printer
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-multiline-arrays-2 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-multiline-arrays-2. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.