Migrate from Prettier
Replace standalone Prettier setup with Ultracite while preserving formatting expectations and aligning the rest of your linting stack.
If you’re already using Prettier and want to switch to Ultracite’s preconfigured setup, this guide will help you migrate while preserving your formatting standards.
Why Migrate to Ultracite?
- Multiple Providers: Choose between Biome, ESLint + Prettier + Stylelint, or Oxlint
- Zero Configuration: Ultracite provides highly configured presets for each provider
- Editor Integration: Built-in support for AI-powered editors (Cursor, Windsurf, GitHub Copilot)
- Consistent Workflow: Standardized setup across projects and teams
- Maintained Rules: Regular updates with new best practices
Before You Start
Make sure you have:
- An existing project using Prettier
- Node.js 20.19+ (or 22.13+ on Node 22)
- A Prettier configuration file (e.g.,
.prettierrc,prettier.config.js)
Migration Options
Option 1: Quick Migration (Recommended)
The fastest way is to run the automatic setup script.
npx ultracite initpnpm dlx ultracite inityarn dlx ultracite initbunx ultracite initnubx ultracite initaube dlx ultracite initThis will:
- Prompt you to choose a linting provider (Oxlint, Biome, or ESLint)
- Install Ultracite and the necessary dependencies
- Create your linter configuration from Ultracite’s presets (see below for what happens to your existing config)
- Add
checkandfixscripts topackage.json(an existingcheckorfixscript that doesn’t run Ultracite is kept, with a warning) - Update your
.vscode/settings.jsonin place, keeping your settings and comments (if you set up a VS Code-based editor) - Enable
strictNullChecksin yourtsconfig.jsonfiles, unless it’s already on (directly or throughextends) or explicitly set tofalse, which init leaves alone with a warning - Set up editor integrations
If you switch to Biome or Oxlint (which have built-in formatters), Ultracite automatically removes the existing Prettier setup. This will:
- Remove the ESLint, Prettier, and Stylelint packages Ultracite installs from
devDependencies(anything independenciesorpeerDependencies, and plugins Ultracite doesn’t install, are left alone) - Remove any ESLint, Prettier, and Stylelint configuration files (including legacy
.eslintrc*files) and the"prettier"and"stylelint"keys inpackage.json
Your .vscode/settings.json is merged rather than replaced, so settings for your previous tools (such as a default formatter) may remain; remove any that conflict with the new toolchain.
If you choose ESLint as your provider, Ultracite configures Prettier alongside ESLint with a config that builds on Ultracite’s Prettier preset. An ES module config is updated in place; a JSON, YAML, TOML, or CommonJS config, or a "prettier" key in package.json, is replaced by prettier.config.mjs. A config that doesn’t use Ultracite’s preset yet has its options replaced, and a warning names the file, so re-add anything you need. Once it spreads ultracite/prettier, re-running init keeps your own options and plugins. A config init can’t parse is left unchanged with a warning.
Option 2: Manual Migration
If you prefer more control over the process, follow the Setup steps and manually remove Prettier and its configuration files.
After the migration, restart your editor to ensure the new configuration is applied.