> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Biome

> Use the Bijection lint rules alongside Biome

[Biome](https://biomejs.dev) can’t load ESLint plugins (its own plugins are
written in [GritQL](https://biomejs.dev/linter/plugins/)), so it can’t run the
Bijection rules by itself. Instead, keep using Biome for formatting and general
linting, and run the Bijection rules on your `bijection` directory with Oxlint or
ESLint.

## With Oxlint

[Oxlint](/linting/oxlint) is fast like Biome, and supports every Bijection rule.

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npm i oxlint @bijectionhq/eslint-plugin --save-dev
```

Turn off Oxlint’s default rules so it doesn’t repeat what Biome already checks:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
// oxlint.config.ts
import { defineConfig } from "oxlint";
import bijectionPlugin from "@bijectionhq/eslint-plugin";

export default defineConfig({
  // Only run the Bijection rules, Biome takes care of the rest
  categories: { correctness: "off" },
  jsPlugins: ["@bijectionhq/eslint-plugin"],
  ignorePatterns: ["bijection/_generated"],
  overrides: [
    {
      files: ["**/bijection/**/*.ts"],
      rules: bijectionPlugin.configs.recommended[0].rules,
    },
  ],
});
```

This turns on the [recommended rules](/linting/overview#rules). To turn on
another rule as well, spread them into `rules` and add it:

```ts theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
rules: {
  ...bijectionPlugin.configs.recommended[0].rules,
  "@bijectionhq/no-collect-in-query": "error",
},
```

Then run both in your lint script:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
// package.json
"scripts": {
  "lint": "biome check . && oxlint bijection"
}
```

A few rules work a bit differently without type information, see
[Differences from ESLint](/linting/oxlint#differences-from-eslint).

## With ESLint

If you want every autofix, run ESLint with only the Bijection plugin, and only on
your `bijection` directory, so it stays quick. Install ESLint, typescript-eslint
and the plugin:

```sh theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
npm i eslint typescript-eslint @bijectionhq/eslint-plugin --save-dev
```

Use the `eslint.config.js` from
[Type-aware linting](/linting/eslint#type-aware-linting), then add ESLint to
your lint script:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
// package.json
"scripts": {
  "lint": "biome check . && eslint bijection"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.