Formatter Preset
Adopt the Shaaban opinionated Prettier configuration for consistent formatting across projects.
What you get
The formatter item installs a pair of
configuration files that align all Shaaban codebases:
.prettierrcwith Tailwind-aware sorting, import grouping, and a 120 character line length..prettierignoretuned for monorepos, generated artifacts, and package manager stores.
These defaults mirror the setup we maintain in the shaaban/registry
repository so update diffs stay minimal across teams.
Installation
Ensure the development dependencies are present (the CLI does not install them automatically):
pnpm add -D prettier prettier-plugin-tailwindcss @ianvs/prettier-plugin-sort-importsGenerate the files from the registry root of your project:
pnpm shadcn add formatterCommit
.prettierrcand.prettierignoreso that build and lint pipelines pick up the new rules.
The CLI installs the files to ~/,
matching the upstream registry behaviour. If you prefer project-scoped configuration, move the files into the
repository root after generation.
Usage tips
Add
"format": "prettier --write ."to yourpackage.jsonscripts and run it before committing.Use
pnpm format:checkin CI for a fast validation step.Combine with
editor.formatOnSave(VS Code) to match the automated pipeline behaviour locally.
When the registry ships an updated configuration, rerun pnpm shadcn add formatter
to pull the latest files and review the diff.