---
title: Getting Started
description: Install @zap-studio/oxlint, extend a preset, and override a single rule without forking it.
type: package
package: "@zap-studio/oxlint"
---

## Installation

<CodeGroup>

```bash npm
npm install --save-dev @zap-studio/oxlint oxlint
```

```bash yarn
yarn add -D @zap-studio/oxlint oxlint
```

```bash pnpm
pnpm add -D @zap-studio/oxlint oxlint
```

```bash bun
bun add -D @zap-studio/oxlint oxlint
```

```bash deno
deno add -D npm:@zap-studio/oxlint npm:oxlint
```

</CodeGroup>

`oxlint` is a peer dependency — install the version you want to run. If you use the `typeAware`/`typeCheck` options from `base` (on by default), also install `oxlint-tsgolint`.

## Extend a Preset

Start with `base` — it's the one bundled preset, and the only one every project wants regardless of framework. Import it by name from the package root:

```ts
import { defineConfig } from "oxlint";
import { base } from "@zap-studio/oxlint";

export default defineConfig({
  extends: [base],
});
```

## Combine Presets

Every other preset owns one plugin or one framework integration's slice of rules, and none of them imply another — `extends` accepts an array, and you list every preset your project needs. A React project on Next.js adds `react` (hooks), `react-a11y` (accessibility), `react-doctor` (the rest of React-Doctor's framework-agnostic rules), a JSX runtime preset, and `nextjs`:

```ts
import { defineConfig } from "oxlint";
import {
  base,
  react,
  reactA11y,
  reactDoctor,
  jsxRuntimeAutomatic,
  nextjs,
} from "@zap-studio/oxlint";

export default defineConfig({
  extends: [base, react, reactA11y, reactDoctor, jsxRuntimeAutomatic, nextjs],
});
```

This is more imports than one bundled preset would need — that's the tradeoff for never inheriting rules you didn't ask for. See [Presets](/oxlint/presets) for the full list and what each one owns.

Every preset is also reachable by its own subpath, e.g. `@zap-studio/oxlint/react`, if you'd rather import one preset per line instead of destructuring the root — both forms export the same value:

```ts
import { defineConfig } from "oxlint";
import react from "@zap-studio/oxlint/react";

export default defineConfig({
  extends: [react],
});
```

## Override a Rule

`extends` merges `rules` key-by-key and unions `plugins`/`jsPlugins`. Anything you set in your own `rules` after `extends` overrides the preset, so disabling or retuning a single rule doesn't require forking it:

```ts
import { defineConfig } from "oxlint";
import { react } from "@zap-studio/oxlint";

export default defineConfig({
  extends: [react],
  rules: {
    "sonarjs/cognitive-complexity": "off",
  },
});
```

:::note

Rule names from wrapped plugins are prefixed with the plugin's name (`sonarjs/...`, `regexp/...`, `github/...`, `e18e/...`, `react-doctor/...`), matching how they're registered as `jsPlugins`.

:::

## Cherry-Pick Pieces

Every preset is already just `plugins`/`jsPlugins`/`rules` under the hood — each also exports those pieces by name, so you can merge them by hand instead of taking the default export, useful for overriding one rule out of a large preset like `react-doctor`:

```ts
import { defineConfig } from "oxlint";
import { basePlugins, baseJsPlugins, baseRules } from "@zap-studio/oxlint/base";
import { reactDoctorJsPlugins, reactDoctorRulesFinal } from "@zap-studio/oxlint/react-doctor";

export default defineConfig({
  plugins: basePlugins,
  jsPlugins: [...baseJsPlugins, ...reactDoctorJsPlugins],
  rules: { ...baseRules, ...reactDoctorRulesFinal, "react-doctor/no-barrel-import": "off" },
});
```
