# IanVS/prettier-plugin-sort-imports

An opinionated but flexible prettier plugin to sort import statements

Repository: https://github.com/IanVS/prettier-plugin-sort-imports
Canonical: https://ross.abutalabs.com/products/ianvs-prettier-plugin-sort-imports
Language: TypeScript
License: Apache-2.0
License Family: permissive
Last push: 2026-02-04T12:46:13+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 65, release rhythm 69, longevity 100
- inputs: {"age_days": 1650, "days_push": 210, "days_rel": 210, "gap_med": 19.5, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1373, forks 37 (observed 2026-08-28T04:04:32.889767+00:00)

## What it is
A Prettier plugin that sorts import declarations according to a configurable regular-expression-based order while preserving side-effect import ordering. It is a maintained fork of @trivago/prettier-plugin-sort-imports with extra features like combining imports from the same source and grouping type imports.

## Use cases
- sort javascript imports with prettier
- organize import statements in typescript projects
- group type imports separately from value imports
- keep side-effect imports in their original order while sorting others
- combine duplicate imports from the same module
- enforce a consistent import order across a codebase

## When to choose
- you already use Prettier and want automatic, consistent import ordering
- you need fine-grained control over import group order via regex patterns
- your codebase has side-effect imports whose order must not change
- you work with TypeScript and want type imports grouped separately

## When to avoid
- you don't use Prettier and want a standalone import sorter
- you need ESLint-based import linting with autofix rather than formatting
- you need sorting for languages other than JavaScript/TypeScript

## Facets
- artifact type: plugin
- maturity: active
- function: formatter, plugin-system, developer-tools
- domain: developer-tools, frontend, web-development
- platform: cli, cross-platform
- tags: prettier-plugin, import-sorting, code-style, typescript, nodejs

## Member repositories
- IanVS/prettier-plugin-sort-imports (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:32.889767+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:40.062365+00:00, confidence not recorded.
  - readme: https://github.com/IanVS/prettier-plugin-sort-imports (fetched 2026-08-28T04:04:32.889767+00:00, sha 1a5b2b46b7db)
- Data as of 2026-08-30T08:39:29.467469+00:00.
