Перейти до вмісту

Quick start

Цей контент ще не доступний вашою мовою.

Go from a project without Biome to your first biome check in three steps. You need a project with a package.json and a package manager such as npm, pnpm, Yarn, Bun, or Deno.

If you do not use Node.js, or you want to see every installation method, go to the Install Biome page instead.

  1. Install Biome as a development dependency of your project:

    npm i -D -E @biomejs/biome
  2. Create a configuration file. Biome works without one, but a biome.json lets you share settings with your team and your code editor:

    npx biome init

    The generated file enables the formatter, the linter, and assist actions with their recommended settings, and references the JSON Schema so your editor can complete and document every option:

    biome.json
    {
    "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
    "vcs": {
    "enabled": false,
    "clientKind": "git",
    "useIgnoreFile": false
    },
    "files": { "ignoreUnknown": false },
    "formatter": { "enabled": true, "indentStyle": "tab" },
    "linter": {
    "enabled": true,
    "rules": { "preset": "recommended" }
    },
    "javascript": { "formatter": { "quoteStyle": "double" } },
    "assist": {
    "enabled": true,
    "actions": { "source": { "organizeImports": "on" } }
    }
    }
  3. Check your project. Run the formatter, the linter, and assist actions in one pass:

    npx biome check

    Biome lists every file that is not formatted and every diagnostic it found. To apply formatting, safe lint fixes, and assist actions, add --write to the command:

    npx biome check --write

    Any diagnostics that remain either have no fix or have a fix that is unsafe to apply automatically, so they need your attention.

Success! You’re now ready to use Biome. 🥳