Skip to content
PluginStats

prettier-plugin-single-attribute-per-line-except-first weekly downloads statistics

By iominh · npm · Prettier plugins

Prettier plugin that puts each attribute on its own line, except for the first attribute

View on npm Fresh · Dec 6, 2026

prettier-plugin-single-attribute-per-line-except-first has 20 recorded weekly downloads on npm, an increase of 42.9% over the past 30 days, ranking #2988 of 3,247 tracked listings.

Weekly downloads
20
Official API · Dec 5, 2026
7-day growth
+233%
+14 weekly downloads
30-day growth
+42.9%
+6 weekly downloads
90-day growth
+186%
+13 weekly downloads
Rank
#2988
▲ 72 in 7 days

About prettier-plugin-single-attribute-per-line-except-first

prettier-plugin-single-attribute-per-line-except-first

A Prettier plugin that formats HTML and JSX elements with a special attribute alignment pattern:

  • First attribute stays on the same line as the tag
  • Additional attributes each go on their own line
  • All subsequent attributes are aligned with the first attribute

This creates a clean, readable format that's ideal for components with multiple attributes.

Installation

npm install --save-dev prettier prettier-plugin-single-attribute-per-line-except-first

Usage

Add the following to your Prettier config file (.prettierrc, .prettierrc.json, or .prettierrc.js):

{
  "singleAttributePerLineExceptFirst": true
}

Example

Input code (before formatting):

<div
  id="container"
  class="main-container"
  style="width: 100%"
  data-testid="test-container"
>
  <span>Content</span>
</div>

With this plugin (singleAttributePerLineExceptFirst: true):

<div
  id="container"
  class="main-container"
  style="width: 100%"
  data-testid="test-container"
>
  <span>Content</span>
</div>

With standard Prettier (singleAttributePerLine: true):

<div
  id="container"
  class="main-container"
  style="width: 100%"
  data-testid="test-container"
>
  <span>Content</span>
</div>

JSX Example

Before formatting:

<Button
  onClick={handleClick}
  className="primary"
  disabled={isDisabled}
  type="submit"
  aria-label="Submit"
>
  Submit
</Button>

After formatting with this plugin:

<Button
  onClick={handleClick}
  className="primary"
  disabled={isDisabled}
  type="submit"
  aria-label="Submit"
>
  Submit
</Button>

Supported Languages

This plugin works with:

  • HTML
  • JSX (React)
  • Vue
  • Angular

Features

  • ✅ Keeps first attribute on the same line as the tag
  • ✅ Places each additional attribute on its own line
  • ✅ Aligns subsequent attributes with the first attribute
  • ✅ Works with self-closing tags
  • ✅ Maintains proper indentation of content
  • ✅ Compatible with Prettier v2.x and v3.x

Why use this plugin?

This formatting style combines the best of both worlds:

  • The compactness of inline attributes for simple elements
  • The readability of one-attribute-per-line for complex elements
  • The visual clarity of aligned attributes

It's especially useful for components with many attributes, like form elements, containers with multiple props, or components with complex event handlers.

License

MIT

Description from the npm listing.

  • prettier
  • prettier-plugin
  • formatter
  • html
  • jsx
  • attributes

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-single-attribute-per-line-except-first weekly downloads on npm, last 90 days: 20 weekly downloads as of Dec 5, 2026, +186% over 90 days.prettier-plugin-single-attribute-per-l…Weekly downloads on npm · Last 90 days20downloads / week+186% over 90 days0510152025Sep 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-single-attribute-per-line-except-first weekly downloads on npm, last 90 days: 20 weekly downloads as of Dec 5, 2026, +186% over 90 days.

7/30/90-day growth

prettier-plugin-single-attribute-per-line-except-first weekly downloads growth on npm: +233% over 7 days, +42.9% over 30 days, +186% over 90 days.prettier-plugin-single-attribute-per-l…Weekly downloads growth on npm20downloads / week now7-day growth+14 weekly downloads+233%30-day growth+6 weekly downloads+42.9%90-day growth+13 weekly downloads+186%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-single-attribute-per-line-except-first weekly downloads growth on npm: +233% over 7 days, +42.9% over 30 days, +186% over 90 days.

Ranking history

prettier-plugin-single-attribute-per-line-except-first npm ranking history: currently #2988 (by weekly downloads).prettier-plugin-single-attribute-per-l…npm ranking · by weekly downloads · Last 90 days#2988current rank#1800#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 43 observations · Updated Dec 5, 2026pluginstats.com
prettier-plugin-single-attribute-per-line-except-first npm ranking history: currently #2988 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 150, #10 (overall #2,990)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 9, #16 (overall #176)
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-single-attribute-per-line-except-first
Date (UTC)Weekly downloadsChange vs. previous
20-1
21+5
160
16+10
6+1
50
5-1
60
6-3
90
90
9-1
100
10—

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-single-attribute-per-line-except-first. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.