# @nabla/vite-plugin-eslint

> Plugs ESLint into Vite dev server

Latest version **3.0.1** (published 2026-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nabla/vite-plugin-eslint
pnpm add @nabla/vite-plugin-eslint
yarn add @nabla/vite-plugin-eslint
bun add @nabla/vite-plugin-eslint
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2026-03-18 |
| First published | 2021-06-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 143 |
| Author | Arnaud Barré |
| Maintainers | pierre127, martinraison, amseddi, benoitletondor |
| Keywords | vite, eslint, vite-plugin |

## Links

- npm: https://www.npmjs.com/package/@nabla/vite-plugin-eslint
- Repository: https://github.com/nabla/vite-plugin-eslint
- Homepage: https://github.com/nabla/vite-plugin-eslint#readme
- Issues: https://github.com/nabla/vite-plugin-eslint/issues
- npm.io page: https://npm.io/package/@nabla/vite-plugin-eslint

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^4
- [debug](https://npm.io/package/debug.md) ^4
- [@types/eslint](https://npm.io/package/@types/eslint.md) *

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 3.0.1 (latest) — 2026-03-18
- 3.0.0 — 2026-02-27
- 2.0.6 — 2025-07-25
- 2.0.5 — 2024-11-27
- 2.0.4 — 2024-04-17
- 2.0.3 — 2024-04-17
- 2.0.2 — 2023-11-18
- 2.0.1 — 2023-11-18
- 2.0.0 — 2023-11-18
- 1.6.0 — 2023-11-16
- 1.5.0 — 2022-12-22
- 1.4.2 — 2022-12-09
- 1.4.1 — 2022-07-19
- 1.4.0 — 2022-01-31
- 1.3.5 — 2021-11-27
- … 9 more at https://npm.io/package/@nabla/vite-plugin-eslint/versions

## README

# @nabla/vite-plugin-eslint [![npm](https://img.shields.io/npm/v/@nabla/vite-plugin-eslint)](https://www.npmjs.com/package/@nabla/vite-plugin-eslint)

Plugs ESLint into Vite dev server.

## Differences with [vite-plugin-eslint](https://github.com/gxmari007/vite-plugin-eslint)

- Keeps HMR fast: linting is done asynchronously and doesn't block the transform process
- Reduces noise: Display results via console logs

![logs.png](logs.png)

Because of this, the plugin can't fail the build and is only applied in dev. Like typechecking, linting should be done before or in parallel of the build command.

## Install

`yarn add --dev @nabla/vite-plugin-eslint`

## Usage

```ts
import { defineConfig } from "vite";
import eslintPlugin from "@nabla/vite-plugin-eslint";

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

## Options

### eslintOptions

- Type: [ESLint.Options](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions)
- Default: `{ cache: true }`

Note: the `fix` option is only supported from `1.3.4`

### shouldLint

- Type: `(path: string) => boolean`
- Default: `(path) => path.match(/\/src\/[^?]*\.(vue|svelte|m?[jt]sx?)$/)`

You can use `DEBUG=eslint node_modules/.bin/vite` to debug this option (available in `1.4.0`)

### formatter

- Type: `string | ((result: ESLint.LintResult) => void)`
- Default: Custom format with one line per warning/error.

If provided, the value is passed to `eslint.loadFormatter`. Use `stylish` to get a CRA like output. Async formatters are supported in `1.5.0`. Function support was added in `2.0.2`.

---
_Source: https://npm.io/package/@nabla/vite-plugin-eslint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
