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 check
and fix
scripts to your package.json
file.
{
"scripts": {
"check": "npx ultracite@latest check",
"fix": "npx ultracite@latest fix"
}
}
Optionally, you can also add the check
and fix
scripts to your turbo.json
file.
{
"tasks": {
"//#check": {},
"//#fix": {
"cache": false
}
}
}
You'll now be able to run these scripts using turbo run check
and turbo run fix
.