Skip to content
PluginStats

prettier-plugin-perline weekly downloads statistics

By q04515240 · npm · Prettier plugins

Prettier plugin that forces object properties and array elements onto separate lines.

View on npm Fresh · Dec 6, 2026

prettier-plugin-perline has 11 recorded weekly downloads on npm, an increase of 10.0% over the past 30 days, ranking #3119 of 3,247 tracked listings.

Weekly downloads
11
Official API · Dec 5, 2026
7-day growth
+57.1%
+4 weekly downloads
30-day growth
+10.0%
+1 weekly downloads
90-day growth
+37.5%
+3 weekly downloads
Rank
#3119
▼ 97 in 7 days

About prettier-plugin-perline

prettier-plugin-perline

这是一个 Prettier 插件,用于在满足条件时强制对象和数组按“每行一个成员”进行格式化。

安装

npm i -D prettier-plugin-perline

构建

该包以 dist 目录作为发布产物,发布前请先构建:

npm run build

构建后入口产物为:dist/index.mjs

测试

项目内置了回归测试脚本,用于防止历史 bug(例如箭头函数简写返回对象时丢失圆括号)再次出现。

npm run test:regression

如需执行当前仓库全部测试,可运行:

npm run test

接入方式

在 .prettierrc 的 plugins 中添加:

{
  "plugins": ["prettier-plugin-perline"]
}

配置项

  • objectPerLineMinProperties(数字,默认值:2)
    • 当对象属性数量大于等于该值时,强制每行一个属性。
  • arrayPerLineMinElements(数字,默认值:-1)
    • 当数组元素数量大于等于该值时,强制每行一个元素。
    • 设为 -1 表示关闭该规则。
  • htmlMustacheBracketSpacing(布尔值,默认值:true)
    • 当值为 true 时,格式化 .html 文件中的 Mustache 表达式时会规范为 {{ msg }} 形式。
    • 当值为 false 时,不会执行该 Mustache 空格规则。

特殊规则:当文件名命中 .*rc、*.jsonc、*.json 时,若未显式覆盖上述两个选项,则插件会自动按 1 处理,从而强制“一个字段一行 / 一个元素一行”。

HTML Mustache 空格规则

当格式化 .html 文件时,若命中 Mustache 插值表达式,插件会统一规范为双大括号内两侧各保留一个空格。

<div>{{msg}}</div>

会被格式化为:

<div>{{ msg }}</div>

如需关闭该规则,可在配置中设置:

{
  "htmlMustacheBracketSpacing": false
}

示例(JSON/JSONC/RC 强制单成员分行)

{
  "overrides": [
    {
      "files": [".*rc", "*.jsonc"],
      "options": {
        "parser": "jsonc"
      }
    },
    {
      "files": ["*.json"],
      "options": {
        "parser": "json"
      }
    }
  ]
}

源码目录:src/(包含入口 src/index.mjs)。

Description from the npm listing.

  • prettier
  • prettier-plugin
  • object
  • array
  • format

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

prettier-plugin-perline weekly downloads on npm, last 90 days: 11 weekly downloads as of Dec 5, 2026, +37.5% over 90 days.prettier-plugin-perlineWeekly downloads on npm · Last 90 days11downloads / week+37.5% over 90 days02468101214Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
prettier-plugin-perline weekly downloads on npm, last 90 days: 11 weekly downloads as of Dec 5, 2026, +37.5% over 90 days.

7/30/90-day growth

prettier-plugin-perline weekly downloads growth on npm: +57.1% over 7 days, +10.0% over 30 days, +37.5% over 90 days.prettier-plugin-perlineWeekly downloads growth on npm11downloads / week now7-day growth+4 weekly downloads+57.1%30-day growth+1 weekly downloads+10.0%90-day growth+3 weekly downloads+37.5%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-perline weekly downloads growth on npm: +57.1% over 7 days, +10.0% over 30 days, +37.5% over 90 days.

Ranking history

prettier-plugin-perline npm ranking history: currently #3119 (by weekly downloads).prettier-plugin-perlinenpm ranking · by weekly downloads · Last 90 days#3119current rank#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-perline npm ranking history: currently #3119 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 157, #1 (overall #3,121)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 11, #20 (overall #220)
Prettier plugins: every listing in weekly downloads order

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)
Recent weekly downloads observations for prettier-plugin-perline
Date (UTC)Weekly downloadsChange vs. previous
110
11-1
12+8
40
4+2
20
2-5
70
7+1
60
60
60
60
6—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-perline alternatives

Data 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-perline. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.