Shaaban Registry

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:

  • .prettierrc with Tailwind-aware sorting, import grouping, and a 120 character line length.

  • .prettierignore tuned 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

  1. Ensure the development dependencies are present (the CLI does not install them automatically):

    pnpm add -D prettier prettier-plugin-tailwindcss @ianvs/prettier-plugin-sort-imports
  2. Generate the files from the registry root of your project:

    pnpm shadcn add formatter
  3. Commit .prettierrc and .prettierignore so 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 your package.json scripts and run it before committing.

  • Use pnpm format:check in 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.