Migrate from Stylelint
Replace standalone Stylelint setup with Ultracite while keeping CSS linting standards aligned with the rest of your frontend tooling.
If you’re already using Stylelint and want to switch to Ultracite’s preconfigured setup, this guide will help you migrate while preserving your styling 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 Stylelint
- Node.js 20.19+ (or 22.13+ on Node 22)
- A Stylelint configuration file (e.g.,
.stylelintrc,stylelint.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, Ultracite automatically removes the existing Stylelint configuration. Biome lints CSS itself, but Oxlint doesn’t lint CSS at all (Oxfmt only formats it), so pick Biome or ESLint + Prettier + Stylelint if you still need CSS linting. Switching 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 Stylelint alongside ESLint with a stylelint.config.mjs that re-exports Ultracite’s config. An existing config that doesn’t reference ultracite/stylelint is replaced (JSON, YAML, and CommonJS configs, and a "stylelint" key in package.json, move to stylelint.config.mjs), and a warning names the file so you can re-add your own rules. A config that already references ultracite/stylelint, for example one that extends it and adds rules, is left as it is.
Option 2: Manual Migration
If you prefer more control over the process, follow the Setup steps and manually remove Stylelint and its configuration files.
After the migration, restart your editor to ensure the new configuration is applied.