# @rollup/plugin-eslint

> Verify entry point and all imported files with ESLint

Latest version **9.2.0** (published 2025-10-28) · MIT license · 0 weekly downloads

## Install

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

## Health

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

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

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 9.2.0 |
| Published | 2025-10-28 |
| First published | 2020-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14.0.0 |
| Dependencies | 1 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3759 |
| Author | Bogdan Chadkin |
| Maintainers | shellscape, rich_harris, guybedford, lukastaegert |
| Keywords | rollup, plugin, rollup-plugin, eslint, es2015, es6, lint |

## Links

- npm: https://www.npmjs.com/package/@rollup/plugin-eslint
- Repository: https://github.com/rollup/plugins
- Homepage: https://github.com/rollup/plugins/tree/master/packages/eslint#readme
- Issues: https://github.com/rollup/plugins/issues
- npm.io page: https://npm.io/package/@rollup/plugin-eslint

## Dependencies (1)

- [@rollup/pluginutils](https://npm.io/package/@rollup/pluginutils.md) ^5.0.1

## 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
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 9.2.0 (latest) — 2025-10-28
- 9.1.0 — 2025-10-04
- 9.0.5 — 2023-10-05
- 9.0.4 — 2023-05-12
- 9.0.3 — 2023-01-20
- 9.0.2 — 2023-01-13
- 9.0.1 — 2022-10-21
- 8.0.5 — 2022-10-13
- 9.0.0 — 2022-10-07
- 8.0.4 — 2022-10-07
- 8.0.3 — 2022-10-07
- 8.0.2 — 2022-04-11
- 8.0.1 — 2020-11-30
- 8.0.0 — 2020-10-26

## README

[npm]: https://img.shields.io/npm/v/@rollup/plugin-eslint
[npm-url]: https://www.npmjs.com/package/@rollup/plugin-eslint
[size]: https://packagephobia.now.sh/badge?p=@rollup/plugin-eslint
[size-url]: https://packagephobia.now.sh/result?p=@rollup/plugin-eslint

[![npm][npm]][npm-url]
[![size][size]][size-url]
[![libera manifesto](https://img.shields.io/badge/libera-manifesto-lightgrey.svg)](https://liberamanifesto.com)

# @rollup/plugin-eslint

🍣 A Rollup plugin to lint entry points and all imported files with ESLint.

## Requirements

This plugin requires an [LTS](https://github.com/nodejs/Release) Node version (v14.0.0+) and Rollup v1.20.0+.

## Install

Using npm:

```console
npm install @rollup/plugin-eslint --save-dev
# or
yarn add -D @rollup/plugin-eslint
```

## Usage

```js
import eslint from '@rollup/plugin-eslint';

export default {
  input: 'main.js',
  plugins: [
    eslint({
      /* your options */
    })
  ]
};
```

## Options

This plugin takes a configuration object intended for the [ESLint constructor](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions) with the addition of a `throwOnWarning`, `throwOnError`, `formatter`, `include` and `exclude` prop.

You can also use eslint configuration in the form of a `.eslintrc.*` file in your project's root. It will be loaded automatically.

### exclude

Type: `String | String[]`<br>
Default: `node_modules/**`

A single [`picomatch`](https://github.com/micromatch/picomatch) pattern or an array of patterns controlling which files this plugin should explicitly exclude. Gets forwarded to the [`createFilter`](https://github.com/rollup/plugins/tree/master/packages/pluginutils#createfilter) method of `@rollup/pluginutils`.

### fix

Type: `Boolean`<br>
Default: `false`

If true, will auto fix source code.

### formatter

Type: `Function<String> | Function<Promise<String>> | String`<br>
Default: `stylish`

Custom error formatter, the name of a built-in formatter, or the path to a custom formatter.

### include

Type: `String | String[]`<br>
Default: `[]`

A single [`picomatch`](https://github.com/micromatch/picomatch) pattern or an array of patterns controlling which files this plugin should explicitly include. Gets forwarded to the [`createFilter`](https://github.com/rollup/plugins/tree/master/packages/pluginutils#createfilter) method of `@rollup/pluginutils`.

### throwOnError

Type: `Boolean`<br>
Default: `false`

If true, will throw an error and exit the process when ESLint reports any errors.

### throwOnWarning

Type: `Boolean`<br>
Default: `false`

If true, will throw an error and exit the process when ESLint reports any warnings.

## Meta

[CONTRIBUTING](/.github/CONTRIBUTING.md)

[LICENSE (MIT)](/LICENSE)

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