Skip to content
PluginStats

prettier-plugin-ocd weekly downloads statistics

By nksrentas · npm · Prettier plugins

A Prettier plugin that automatically formats JSX attributes in ascending length order (creating a left triangle pattern), making React components more visually organized and consistent.

View on npm Fresh · Dec 6, 2026

prettier-plugin-ocd has 10 recorded weekly downloads on npm, an increase of 150% over the past 30 days, ranking #3131 of 3,247 tracked listings.

Weekly downloads
10
Official API · Dec 5, 2026
7-day growth
+11.1%
+1 weekly downloads
30-day growth
+150%
+6 weekly downloads
90-day growth
+150%
+6 weekly downloads
Rank
#3131
▼ 150 in 7 days

About prettier-plugin-ocd

Prettier Plugin OCD :)

A Prettier plugin that automatically formats JSX attributes in ascending length order (creating a left triangle pattern), making React components more visually organized and consistent.

Features

  • Automatically sorts JSX attributes by length (shortest to longest)
  • Creates a visually appealing left triangle pattern
  • Preserves non-JSX content
  • Handles multiple JSX elements in the same file
  • Full TypeScript support
  • Maintains Prettier's high standards for code formatting

Installation

Using npm:

npm install --save-dev prettier-plugin-ocd

Using yarn:

yarn add -D prettier-plugin-ocd

Usage

The plugin will be automatically picked up by Prettier. No additional configuration is needed.

Before:
const Button = () => (
  <button
    className="primary-button"
    onClick={handleClick}
    id="submit"
    disabled={isLoading}
  >
    Submit
  </button>
);
After:
const Button = () => (
  <button
    id="submit"
    onClick={handleClick}
    disabled={isLoading}
    className="primary-button"
  >
    Submit
  </button>
);

Configuration

This plugin works out of the box with Prettier's default configuration. No additional settings are required.

How It Works

The plugin uses a sophisticated attribute processing system that:

  1. Parses the JSX using Babel
  2. Identifies all JSX attributes
  3. Calculates the length of each attribute
  4. Sorts them in ascending order
  5. Generates the formatted code while preserving all other formatting

License

MIT

Credits

Created by Nikos Rentas

FAQ

Q: Will this affect my code's functionality?

A: No, the plugin only changes the order of JSX attributes, which doesn't affect functionality.

Q: Does it work with all JSX/TSX files?

A: Yes, the plugin supports both JSX and TSX files.

Q: What happens if there's an error?

A: The plugin gracefully handles errors by returning the original code unchanged.

Requirements

  • Node.js >= 14
  • Prettier >= 2.0.0

Known Issues

None at the moment. If you find any issues, please report them in the GitHub issue tracker.

Description from the npm listing.

  • prettier
  • prettier-plugin
  • left-triangle
  • triangle
  • react
  • jsx
  • tsx
  • props
  • ocd

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-ocd weekly downloads on npm, last 90 days: 10 weekly downloads as of Dec 5, 2026, +150% over 90 days.prettier-plugin-ocdWeekly downloads on npm · Last 90 days10downloads / week+150% over 90 days024681012Sep 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-ocd weekly downloads on npm, last 90 days: 10 weekly downloads as of Dec 5, 2026, +150% over 90 days.

7/30/90-day growth

prettier-plugin-ocd weekly downloads growth on npm: +11.1% over 7 days, +150% over 30 days, +150% over 90 days.prettier-plugin-ocdWeekly downloads growth on npm10downloads / week now7-day growth+1 weekly downloads+11.1%30-day growth+6 weekly downloads+150%90-day growth+6 weekly downloads+150%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
prettier-plugin-ocd weekly downloads growth on npm: +11.1% over 7 days, +150% over 30 days, +150% over 90 days.

Ranking history

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

Listing placement

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

Listing placement

Prettier plugins267 listings · 14 pages · page 12, #5 (overall #225)
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-ocd
Date (UTC)Weekly downloadsChange vs. previous
10+3
7-1
8+1
7+2
5-2
70
7-2
90
9+2
7-1
8-3
11+2
90
9—

Similar npm Prettier plugins plugins

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