Skip to content
PluginStats

prettier-plugin-astro-attributes weekly downloads statistics

By mlane · npm · Prettier plugins

A Prettier plugin that automatically sorts HTML attributes alphabetically in .astro files for consistent code formatting.

View on npm Fresh · Dec 6, 2026

prettier-plugin-astro-attributes has 14 recorded weekly downloads on npm, an increase of 100% over the past 30 days, ranking #3066 of 3,247 tracked listings.

Weekly downloads
14
Official API · Dec 5, 2026
7-day growth
-22.2%
-4 weekly downloads
30-day growth
+100%
+7 weekly downloads
90-day growth
+367%
+11 weekly downloads
Rank
#3066
▼ 229 in 7 days

About prettier-plugin-astro-attributes

Prettier Plugin for Sorting HTML Attributes in Astro Files

A Prettier plugin that automatically sorts HTML attributes alphabetically in .astro files to ensure clean, consistent code formatting.

Installation

1. Install Prettier

If you haven’t already, install Prettier in your project:

  • Run npm install --save-dev prettier.
2. Install the Plugin

Install the prettier-plugin-astro-attributes plugin:

  • Run npm install --save-dev prettier-plugin-astro-attributes.
3. Configure Prettier

In your .prettierrc or prettier.config.js file, add the plugin:

  • Add the following configuration to your Prettier setup:
{
  "overrides": [
    {
      "files": "*.astro",
      "options": {
        "parser": "astro"
      }
    }
  ],
  "plugins": ["prettier-plugin-astro-attributes"]
}

Note: This plugin extends the official prettier-plugin-astro parser. It is designed to work only with the official Astro plugin. It is not compatible with other Astro formatting plugins such as prettier-plugin-tailwindcss. If you have any Tailwind-related Prettier plugins installed, please remove them to avoid conflicts.

Usage

Once installed and configured, run Prettier to format your .astro files:

  • Run npx prettier --write .

The plugin will automatically sort HTML attributes in your .astro files alphabetically, ensuring consistent and readable code.

Features

  • Alphabetical Sorting:
    Sorts attributes in HTML tags (such as <meta>, <link>, etc.) alphabetically by attribute name.

  • Easy Integration:
    Works seamlessly with Prettier when used in combination with the official Astro plugin.

  • Supports .astro Files:
    Specifically designed for Astro projects.

Benefits

  • Consistency:
    Enforces a consistent style for attribute ordering across your Astro files.

  • Cleaner Code:
    Improves the readability and maintainability of your .astro templates.

  • Time-Saving:
    Automates the formatting process, reducing manual code adjustments.

Compatibility Notice

This plugin extends the official prettier-plugin-astro to sort HTML attributes. It is only compatible with the official Astro plugin. If you use other plugins (e.g. prettier-plugin-tailwindcss), this plugin may not work as expected.

If you discover a solution that allows compatibility with Tailwind or other plugins, please open an issue or submit a pull request. Your help is appreciated!

Contributing

Feel free to open an issue or pull request if you have suggestions, bug reports, or improvements. We welcome contributions!

License

This project is licensed under the MIT License.

Description from the npm listing.

  • astro
  • astro-formatting
  • attribute-sorting
  • automated-formatting
  • code-formatting
  • frontend-tools
  • javascript-tools
  • html-attribute-sorting
  • prettier
  • prettier-plugin
  • open-source
  • web-development-tools

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-astro-attributes weekly downloads on npm, last 90 days: 14 weekly downloads as of Dec 5, 2026, +367% over 90 days.prettier-plugin-astro-attributesWeekly downloads on npm · Last 90 days14downloads / week+367% 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-astro-attributes weekly downloads on npm, last 90 days: 14 weekly downloads as of Dec 5, 2026, +367% over 90 days.

7/30/90-day growth

prettier-plugin-astro-attributes weekly downloads growth on npm: -22.2% over 7 days, +100% over 30 days, +367% over 90 days.prettier-plugin-astro-attributesWeekly downloads growth on npm14downloads / week now7-day growth-4 weekly downloads-22.2%30-day growth+7 weekly downloads+100%90-day growth+11 weekly downloads+367%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-astro-attributes weekly downloads growth on npm: -22.2% over 7 days, +100% over 30 days, +367% over 90 days.

Ranking history

prettier-plugin-astro-attributes npm ranking history: currently #3066 (by weekly downloads).prettier-plugin-astro-attributesnpm ranking · by weekly downloads · Last 90 days#3066current 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-astro-attributes npm ranking history: currently #3066 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 154, #8 (overall #3,068)
All npm: every listing in weekly downloads order

Listing placement

Prettier plugins267 listings · 14 pages · page 11, #5 (overall #205)
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-astro-attributes
Date (UTC)Weekly downloadsChange vs. previous
14+3
11-3
14-1
15+4
11-2
13-3
16-2
18-1
19+1
180
18-3
21+2
19+3
16—

Similar npm Prettier plugins plugins

All 20 prettier-plugin-astro-attributes 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-astro-attributes. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.