# unplugin-oxlint

> A universal bundler plugin for integrating the Oxlint linter into your project.

Latest version **0.8.2** (published 2026-06-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install unplugin-oxlint
pnpm add unplugin-oxlint
yarn add unplugin-oxlint
bun add unplugin-oxlint
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.8.2 |
| Published | 2026-06-15 |
| First published | 2024-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 12 |
| Unpacked size | 86.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | tmg0 |
| Maintainers | tamagooooo |
| Keywords | eslint, oxlint, plugin, rolldown, rollup, esbuild, webpack, vite |

## Links

- npm: https://www.npmjs.com/package/unplugin-oxlint
- Repository: https://github.com/tmg0/unplugin-oxlint
- Homepage: https://github.com/tmg0/unplugin-oxlint#readme
- Issues: https://github.com/tmg0/unplugin-oxlint/issues
- npm.io page: https://npm.io/package/unplugin-oxlint

## Dependencies (12)

- [defu](https://npm.io/package/defu.md) ^6.1.7
- [nypm](https://npm.io/package/nypm.md) ^0.6.7
- [destr](https://npm.io/package/destr.md) ^2.0.5
- [execa](https://npm.io/package/execa.md) ^9.6.1
- [ohash](https://npm.io/package/ohash.md) ^2.0.11
- [eslint](https://npm.io/package/eslint.md) ^10.5.0
- [consola](https://npm.io/package/consola.md) ^3.4.2
- [chokidar](https://npm.io/package/chokidar.md) ^5.0.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.5
- [unplugin](https://npm.io/package/unplugin.md) ^3.0.0
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.3.3
- [local-pkg](https://npm.io/package/local-pkg.md) ^1.2.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 0.8.2 (latest) — 2026-06-15
- 0.8.0 — 2026-03-27
- 0.7.5 — 2025-06-10
- 0.7.4 — 2025-04-03
- 0.7.3 — 2024-10-28
- 0.7.2 — 2024-10-25
- 0.7.1 — 2024-10-22
- 0.7.0 — 2024-10-21
- 0.6.3 — 2024-09-22
- 0.6.2 — 2024-06-24
- 0.6.1 — 2024-05-17
- 0.6.0 — 2024-05-09
- 0.5.5 — 2024-05-06
- 0.5.4 — 2024-04-22
- 0.5.3 — 2024-04-02
- … 19 more at https://npm.io/package/unplugin-oxlint/versions

## README

# unplugin-oxlint

[![NPM version](https://img.shields.io/npm/v/unplugin-oxlint)](https://www.npmjs.com/package/unplugin-oxlint)

🌋 A universal bundler plugin for integrating the [Oxlint](https://oxc.rs/docs/guide/usage/linter.html#linter-oxlint) linter into your project.

## Features

🚀 A quick and simple way to use oxlint in your project.

🛠️ Support linting with both bundler plugin and Node.js API.

⚙️ Support common bundlers like Vite, Rollup, esbuild, and Webpack by [unplugin](https://github.com/unjs/unplugin).

🔍 Support mixed use in eslint projects by [eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint).

😊 Friendly output in terminal grouped by filepath.

⚡ Only lint the files that have changed for better performance by [chokidar](https://github.com/paulmillr/chokidar).

![screenshot](./assets/screenshot.png)

## Installation

```bash
# npm
npm i -D oxlint unplugin-oxlint

# pnpm
pnpm add -D oxlint unplugin-oxlint

# yar
yarn add -D oxlint unplugin-oxlint
```

## Usage

### `Bundler Plugin`

Recommended the bundler plugin way to use the full `options` of `unplugin-oxlint`.

<details>
<summary>Vite</summary><br>

```ts
// vite.config.ts
import Oxlint from 'unplugin-oxlint/vite'

export default defineConfig({
  plugins: [Oxlint()],
})
```

<br></details>

<details>
<summary>Rollup</summary><br>

```ts
// rollup.config.js
import Oxlint from 'unplugin-oxlint/rollup'

export default {
  plugins: [Oxlint()],
}
```

<br></details>

<details>
<summary>esbuild</summary><br>

```ts
// esbuild.config.js
import { build } from 'esbuild'

build({
  plugins: [require('unplugin-oxlint/esbuild')()],
})
```

<br></details>

<details>
<summary>Webpack</summary><br>

```ts
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [require('unplugin-oxlint/webpack')()],
}
```

<br></details>

### `Node.js API`

For cases that require execution in a Node.js environment, an API method is also provided to perform linting actions.

Tips: The Node.js API supports most `options` except for `watch`.

```ts
// scripts/lint.js
import { lint } from 'unplugin-oxlint'

lint({ includes: 'src/**/*.ts', glob: true })
```

If you're looking for a way to use `lint` in `scripts`.

```json
{
  "scripts": {
    "lint": "node scripts/lint.js"
  }
}
```

And the `lint` function can alse be used for creating integrations with other projects.

```ts
type Lint = (options: Omit<Options, 'watch'>) => Promise<LintResult[]>

interface LintResult {
  filename: string
  severity: 'off' | 'warning' | 'error'
  message: string
  linter: 'oxlint' | 'eslint'
  ruleId: string
}
```

## Playground

See [playground](./playground).

## ESLint

If you are looking for a way to use oxlint in projects that still need ESLint, You can use [eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint) to turn off ESLint rules that are already supported by oxlint.

The rules are extracted from [here](https://github.com/oxc-project/eslint-plugin-oxlint?tab=readme-ov-file)

`unplugin-oxlint` will automatically run the `eslint` script after `oxlint` when build start and file change.

```bash
# npm
npm i -D eslint eslint-plugin-oxlint

# pnpm
pnpm add -D eslint eslint-plugin-oxlint

# yarn
yarn add -D eslint eslint-plugin-oxlint
```

### Example

Use [eslint-plugin-oxlint](https://github.com/oxc-project/eslint-plugin-oxlint) with [@antfu/eslint-config](https://github.com/antfu/eslint-config)

```js
// eslint.config.js
import antfu from '@antfu/eslint-config'
import oxlint from 'eslint-plugin-oxlint'

export default [
  ...await antfu(),
  oxlint.configs['flat/all'],
]
```

## Options

For all options please refer to [docs](https://github.com/52-entertainment/vite-plugin-oxlint).

This plugin accepts most options of [vite-plugin-oxlint](https://github.com/52-entertainment/vite-plugin-oxlint), and some extra options that are specific to this plugin.

### ~~`options.path`~~

- ~~Type: `string | string[]`~~
- ~~Default: `'.'`~~

### `options.includes`

- Type: `string | string[]`
- Default: `'.'`

Paths to files or dirs to be watched, for more details see: [chokidar v4](https://github.com/paulmillr/chokidar?tab=readme-ov-file#upgrading)

And for those who wants to use glob pattern, `unplugin-oxlint` also provide `glob` options.

### `options.glob`

- Type: `boolean`
- Default: `false`

Watched by glob patterns

Example:

```ts
Oxlint({
  includes: ['src/**/*.ts'],
  glob: true,
})
```

### `options.excludes`

- Type: `RegExp[]`
- Default: `[/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/]`

### `options.rootDir`

- Type: `string`
- Default: `'.'`

### `options.fix`

- Type: `boolean`
- Default: `false`

Fix as many issues as possible. Only unfixed issues are reported in the output

### `options.watch`

- Type: `boolean`
- Default: `false`

Continue to watch for changes in any of the resolved path

### `options.config`

- Type: `string`
- Default: `''`

ESLint configuration file

### `options.noIgnore`

- Type: `boolean`
- Default: `false`

Disables excluding of files from .eslintignore files, `--ignore-path` flags and `--ignore-pattern` flags

### `options.quiet`

- Type: `boolean`
- Default: `false`

Disable reporting on warnings, only errors are reported

### `options.denyWarnings`

- Type: `boolean`
- Default: `false`

Ensure warnings produce a non-zero exit code

### `options.packageManager`

- Type: `'npm' | 'pnpm' | 'yarn' | 'bun'`

Declare the package manager which you want to use

Normally you don't need to modify this option. `unplugin-oxlint` will automatically detect `package.json` and lock file by [nypm](https://github.com/unjs/nypm)

## License

[MIT](./LICENSE) License © 2024-PRESENT [Tamago](https://github.com/tmg0)

---
_Source: https://npm.io/package/unplugin-oxlint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
