The import order your diff and reviewer deserve.
Deterministic, configurable import organization for JavaScript and TypeScript. Run it as a Prettier plugin or a standalone CLI — same engine, same config.
pnpm add -D apothekeTwo ways to run it
Drop it into an existing Prettier setup as a plugin, or gate CI with the CLI. Both read the same configuration, so editors and pipelines never disagree.
Prettier plugin
Runs as a preprocess hook, so a single prettier --write organises imports and formats code in one pass.
Standalone CLI
No Prettier required. --write, --check and --diff share the same engine, the same config and CI-ready exit codes.
Monorepo aware
A root config defines shared groups and each package extends it. tsconfig path aliases are picked up automatically.
Groups you define
Imports land in the order you read them — not by where the module happens to live. Every group is named, ordered and commented the way your team already talks about the codebase.
import { useQuery } from '@tanstack/react-query';
import { useMemo } from 'react';
import { createRoute } from '@tanstack/react-router';
import { tsr } from '../api/tsr';
import useLoggedUser from '../hooks/use-logged-user';// React
import { useMemo } from 'react';
// Hooks
import useLoggedUser from '../hooks/use-logged-user';
// Api
import { tsr } from '../api/tsr';
import { useQuery } from '@tanstack/react-query';
// Navigation
import { createRoute } from '@tanstack/react-router';Ready when you are
Install it, point it at your globs and let CI hold the line. Start with the quick start, or read the source on GitHub.