Skip to content
PluginStats

prettier-plugin-auto-sort-imports weekly downloads statistics

By crmapache (2 listings) · npm · Prettier plugins

Zero-config Prettier plugin that sorts and groups imports with blank lines between groups. Discovers your tsconfig/jsconfig path aliases automatically - no regex configuration. Works with TypeScript and JavaScript, frontend and backend.

View on npm Fresh · Oct 17, 2026

prettier-plugin-auto-sort-imports has 13 recorded weekly downloads on npm, a decrease of 53.6% over the past 30 days.

It ranks #1889 of 2,256 tracked npm listings by weekly downloads.

PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.

Weekly downloads
13
Official API · Oct 17, 2026
7-day growth
-63.9%
-23 weekly downloads
30-day growth
-53.6%
-15 weekly downloads
90-day growth
—
Insufficient history
Rank
#1889
Among tracked npm listings

About prettier-plugin-auto-sort-imports

prettier-plugin-auto-sort-imports

Sorts and groups your imports, with blank lines between groups, without asking you to write a single regular expression.

It reads your tsconfig.json / jsconfig.json and works out which imports are your own path aliases, which are npm packages, which are Node builtins and which are relative. Install it, and it does the right thing.

Try it in the playground → Paste your own file, pick a preset, and see what this plugin would do to it.

Why another one

The popular plugins make you choose between control and convenience:

| | auto-sort-imports | @trivago/…sort-imports | @ianvs/…sort-imports | …organize-imports |

| Works with zero configuration | Yes | No | No | Yes | | Requires hand-written regexes | No | Yes | Yes | No | | Blank lines between groups | Yes | Yes | Yes | No | | Finds your aliases from tsconfig itself | Yes | No | No | No | | Groups your monorepo packages | Yes | No | No | No | | Needs TypeScript installed | No | No | No | Yes | | Removes unused imports | Opt-in | No | No | Always | | Prettier 2 and 3 | Both | Both | Both | Both |

With the regex-based plugins, a project using @core, @ui and @server has to declare and maintain something like:

Here you declare nothing. Those aliases are already in your tsconfig.json, so the plugin uses them.

Install

Usage

Prettier 3 (plugins must be listed explicitly):

Prettier 2 works with the same config.

That is the whole setup. Everything below is optional.

Live playground

prettier-plugin-sort-imports.vercel.app runs this plugin on a server and formats as you type. Pick one of the nine framework presets, edit the sample or paste your own file, and flip the options to see what each one changes.

Nothing there is a simulation: the page sends your code to the published package and prints what comes back.

Example

Input

Output

Groups

Imports are placed into these groups, in this order:

| Group | What lands there |

| builtin | Node builtins: node:fs, path, crypto | | library | Unscoped npm packages, plus any package you pinned as a priority | | scoped | Scoped npm packages such as @mui/material | | workspace | Packages from your own monorepo | | alias | Your own path aliases from tsconfig/jsconfig | | relative | ./foo, ../bar |

Within a group, packages are ordered by depth and then alphabetically. Depth is measured from the package name, so @mui/material ranks alongside axios rather than alongside lodash/debounce - a scope is part of the name, not a folder level. Relative paths count every slash, so ../shallow comes before ../../deep.

A scope is one family, so it is never split in two. Pinning @nestjs/common as a priority package brings @nestjs/swagger and the rest of @nestjs into the library group with it, instead of leaving them behind in the scoped group.

Side-effect imports stay where you put them

import './styles.css', import 'reflect-metadata', import './setup/dayjs' - an import with no bindings exists only to run code, so its position is part of how your program behaves. A stylesheet loaded later wins the cascade; a setup module has to run before whatever depends on it. Nothing about the import itself says which, so the plugin never moves them.

They act as boundaries instead, and the imports around them are sorted in the runs they define:

In practice you write these at the top or the bottom of the block anyway, and there they stay - which is why the example above puts ./styles.scss last.

Monorepos

Packages from your own repository are dependencies, so by default they would sort next to react and lodash even though they are your code. They get their own group instead, between third-party libraries and the aliases of the package you are editing:

Membership is detected from whichever of these your setup uses, so there is nothing to configure:

• a workspace: version range in package.json (pnpm, yarn berry, bun) • a workspaces field in the repository root package.json (npm, yarn classic) • pnpm-workspace.yaml

Aliases are resolved from the tsconfig nearest to the file being formatted, so each package in the monorepo gets its own. Set sortImportsDetectWorkspace: false to sort workspace packages among the libraries instead.

Frameworks

The auto preset reads the nearest package.json and picks defaults for React, Next.js, NestJS, Vue, Nuxt, Svelte, Angular or plain Node. This only affects which packages get pinned to the top of the library group, for example react and next for a Next.js app, or @nestjs/common and typeorm for a Nest service.

Single-file components work too. Prettier hands blocks to its JavaScript and TypeScript parsers, which is where this plugin attaches, so .vue, .svelte and .astro files are sorted alongside your regular sources.

Options

Everything is optional.

| Option | Type | Default |

| sortImportsPreset | auto \| react \| next \| nest \| node \| vue \| nuxt \| svelte \| angular \| none | auto | | sortImportsGroups | array of group ids | preset default | | sortImportsPriorityPackages | array of package names | preset default | | sortImportsAliases | array of alias prefixes | [] | | sortImportsSpecifierOrder | length \| alphabetical \| none | length | | sortImportsSeparator | boolean | true | | sortImportsGroupScoped | boolean | true | | sortImportsDetectWorkspace | boolean | true | | sortImportsRemoveUnused | boolean | false | | sortImportsIgnorePragma | string | @sort-imports-ignore |

Example:

sortImportsAliases is only needed for bundler aliases that are defined in Vite or webpack but not mirrored in your tsconfig.

Removing unused imports

Off by default. Deleting code while formatting should be a deliberate choice.

When enabled, the plugin skips whole files where the analysis could be wrong:…

Description from the npm listing.

  • prettier
  • prettier-plugin
  • plugin
  • sort
  • sort-imports
  • import-order
  • organize-imports
  • imports
  • formatting
  • typescript
  • javascript
  • react
  • next
  • vue
  • nuxt
  • svelte
  • nestjs
  • node
  • monorepo

Where prettier-plugin-auto-sort-imports sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,256 listings · 113 pages · page 95, #10 (overall #1890)
All npm: every listing in weekly downloads order
PNG SVG
Prettier plugins244 listings · 13 pages · page 6, #1 (overall #101)
Prettier plugins: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

prettier-plugin-auto-sort-imports weekly downloads on npm, last 90 days: 13 weekly downloads as of Oct 17, 2026.prettier-plugin-auto-sort-importsWeekly downloads on npm · Last 90 days13downloads / week0100200300400500Jul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 21, 2026 – Oct 17, 2026 · 89 observations · Updated Oc…pluginstats.com
prettier-plugin-auto-sort-imports weekly downloads on npm, last 90 days: 13 weekly downloads as of Oct 17, 2026.
PNG SVG

7/30/90-day growth

prettier-plugin-auto-sort-imports weekly downloads growth on npm: -63.9% over 7 days, -53.6% over 30 days, 90-day growth unavailable.prettier-plugin-auto-sort-importsWeekly downloads growth on npm13downloads / week now7-day growth-23 weekly downloads-63.9%30-day growth-15 weekly downloads-53.6%90-day growth+13 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
prettier-plugin-auto-sort-imports weekly downloads growth on npm: -63.9% over 7 days, -53.6% over 30 days, 90-day growth unavailable.
PNG SVG

Ranking history

prettier-plugin-auto-sort-imports npm ranking history: currently #1889 (by weekly downloads).prettier-plugin-auto-sort-importsnpm ranking · by weekly downloads · Last 90 days#1889current rank#1882#1884#1886#1888#1890#1892Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
prettier-plugin-auto-sort-imports npm ranking history: currently #1889 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (121)
Recent weekly downloads observations for prettier-plugin-auto-sort-imports
Date (UTC)Weekly downloadsChange vs. previous
13-10
23+2
21-3
24-7
310
31-3
34-2
36+8
28-2
30+1
29+3
26-8
34+5
29—

Similar npm Prettier plugins plugins

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-auto-sort-imports. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.