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 · Oct 18, 2026

prettier-plugin-perline has 3 recorded weekly downloads on npm, a decrease of 57.1% over the past 30 days, ranking #2243 of 2,322 tracked listings.

Weekly downloads
3
Official API · Oct 18, 2026
7-day growth
—
Insufficient history
30-day growth
-57.1%
-4 weekly downloads
90-day growth
+200%
+2 weekly downloads
Rank
#2243
Among tracked npm listings

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: 3 weekly downloads as of Oct 18, 2026, +200% over 90 days.prettier-plugin-perlineWeekly downloads on npm · Last 90 days3downloads / week+200% over 90 days02468101214Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
prettier-plugin-perline weekly downloads on npm, last 90 days: 3 weekly downloads as of Oct 18, 2026, +200% over 90 days.

7/30/90-day growth

prettier-plugin-perline weekly downloads growth on npm: 7-day growth unavailable, -57.1% over 30 days, +200% over 90 days.prettier-plugin-perlineWeekly downloads growth on npm3downloads / week now7-day growth+3 weekly downloadsInsufficient history30-day growth-4 weekly downloads-57.1%90-day growth+2 weekly downloads+200%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
prettier-plugin-perline weekly downloads growth on npm: 7-day growth unavailable, -57.1% over 30 days, +200% over 90 days.

Ranking history

prettier-plugin-perline npm ranking history: currently #2243 (by weekly downloads).prettier-plugin-perlinenpm ranking · by weekly downloads · Last 90 days#2243current rank#2190#2200#2210#2220#2230#2240#2250Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
prettier-plugin-perline npm ranking history: currently #2243 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,161 shown · page 113, #7 (overall #2,247)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins244 listings · 13 pages · page 10, #9 (overall #189)
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 (122)
Recent weekly downloads observations for prettier-plugin-perline
Date (UTC)Weekly downloadsChange vs. previous
3+2
10
10
10
10
10
1+1
00
00
0-1
10
10
10
1—

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 Oct 20, 2026. See the methodology.