Monorepos

How to use Ultracite within a monorepo.

Ultracite is designed to work out of the box with monorepos. Here's how to use it with Turborepo.

Configuration

When initializing Ultracite, it will create a biome.jsonc file in the root of your repository. This file will be used to configure Ultracite for your entire monorepo.

my-turborepo/
├── apps
├── packages
├── turbo.json
└── biome.jsonc

Adding scripts

Because Biome is so fast, you can use a root script rather than creating separate scripts in each of your packages.

You can add the format and lint scripts to your package.json file.

package.json

{
  "scripts": {
    "format": "npx ultracite@latest format",
    "lint": "npx ultracite@latest lint"
  }
}

Optionally, you can also add the format and lint scripts to your turbo.json file.

turbo.json
{
  "tasks": {
    "//#format": {},
    "//#lint": {
      "cache": false
    }
  }
}

You'll now be able to run these scripts using turbo run format and turbo run lint.