UltraciteUltracite
Dashboard

Configuration

Ultracite's default linting configuration and how to modify it.

One of Ultracite's best features is that it's zero-config out of the box — you can just extend the base preset and get going. However, every project is different, and you might want to customize certain rules or adapt Ultracite for different frameworks.

Framework Presets

Ultracite provides framework-specific configurations that you can extend in addition to the base core configuration. This allows you to add framework-specific linting rules without bloating the base config or dealing with irrelevant rules.

The pattern is the same across all supported linters — import the core preset, then add any framework presets you need:

ultracite/{linter}/core
ultracite/{linter}/{framework}

For example, if you're using Biome with React and Next.js, you can pull in the following presets:

biome.jsonc
{
  "extends": [
    "ultracite/biome/core",
    "ultracite/biome/react",
    "ultracite/biome/next"
  ]
}

Default Configuration

When you include the core preset, you're pulling in Ultracite's base configuration. This preset includes framework-agnostic rules and settings. Some notable aspects:

  • TypeScript strictness: Enables strict checks and lint rules requiring robust typing. Discourages use of any, requires handling of null/undefined, and prefers explicit types where needed.
  • Best practices: Common rules like no unused vars, no explicit eval, no prototype pollution, etc.
  • Accessibility: ARIA attributes, semantic HTML, keyboard navigation, and other a11y rules are enabled by default.
  • Formatting conventions: 2-space indentation, 80-character line width, semicolons, trailing commas, and single quotes (varies slightly by linter).

All these defaults aim to enforce consistent style and prevent common errors without manual configuration.

Overriding Rules

Each linter has its own way to disable or modify rules. For example, to disable the noAutofocus rule for Biome, you can do the following:

biome.jsonc
{
  "extends": ["ultracite/biome/core"],
  "linter": {
    "rules": {
      "a11y": {
        "noAutofocus": "off"
      }
    }
  }
}

How is this guide?

On this page