# vite-plugin-eslint

> ESLint plugin for vite.

Latest version **1.8.1** (published 2022-08-16) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.8.1 |
| Published | 2022-08-16 |
| First published | 2021-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 280 |
| Author | Xiang Gao |
| Maintainers | gxmari007 |
| Keywords | eslint, vite-plugin |

## Links

- npm: https://www.npmjs.com/package/vite-plugin-eslint
- Repository: https://github.com/gxmari007/vite-plugin-eslint
- Issues: https://github.com/gxmari007/vite-plugin-eslint/issues
- npm.io page: https://npm.io/package/vite-plugin-eslint

## Dependencies (3)

- [rollup](https://npm.io/package/rollup.md) ^2.77.2
- [@types/eslint](https://npm.io/package/@types/eslint.md) ^8.4.5
- [@rollup/pluginutils](https://npm.io/package/@rollup/pluginutils.md) ^4.2.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
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.8.1 (latest) — 2022-08-16
- 1.8.0 — 2022-08-11
- 1.7.0 — 2022-07-19
- 1.6.1 — 2022-05-19
- 1.6.0 — 2022-04-25
- 1.5.2 — 2022-04-21
- 1.5.1 — 2022-04-20
- 1.5.0 — 2022-04-20
- 1.4.0 — 2022-04-11
- 1.3.0 — 2021-06-26
- 1.2.0 — 2021-06-22
- 1.1.3 — 2021-06-17
- 1.1.2 — 2021-06-10
- 1.1.1 — 2021-05-27
- 1.1.0 — 2021-02-22
- … 1 more at https://npm.io/package/vite-plugin-eslint/versions

## README

# vite-plugin-eslint

[![npm](https://img.shields.io/npm/v/vite-plugin-eslint)](https://www.npmjs.com/package/vite-plugin-eslint)
![npm peer dependency version](https://img.shields.io/npm/dependency-version/vite-plugin-eslint/peer/vite)
![npm peer dependency version](https://img.shields.io/npm/dependency-version/vite-plugin-eslint/peer/eslint)
[![GitHub license](https://img.shields.io/github/license/gxmari007/vite-plugin-eslint)](https://github.com/gxmari007/vite-plugin-eslint/blob/master/LICENSE)

ESLint plugin for vite.

## Install

```bash
npm install eslint vite-plugin-eslint --save-dev
# or
yarn add eslint vite-plugin-eslint -D
```

## Usage

```js
import { defineConfig } from 'vite'
import eslint from 'vite-plugin-eslint'

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

## Options

You can pass [eslint options](https://eslint.org/docs/developer-guide/nodejs-api#-new-eslintoptions).

### `cache`

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

Decrease execution time, `Beta` Cache now correctly recognizes file changes, you can try it out.

### `fix`

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

Auto fix source code.

### `eslintPath`

- Type: `string`
- Default: `eslint`

Path to `eslint` instance that will be used for linting.

### `lintOnStart`

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

Check all matching files on project startup, too slow, turn on discreetly.

### `include`

- Type: `string | string[]`
- Default: `['**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx', '**/*.vue', '**/*.svelte']`

A single file, or array of files, to include when linting.

### `exclude`

- Type: `string | string[]`
- Default: `['**/node_modules/**']`

A single file, or array of files, to exclude when linting.

### `formatter`

- Type: `string | ESLint.Formatter['format']`
- Default: `stylish`

Custom error formatter or the name of a built-in formatter.

### `emitWarning`

- Type: `boolean`
- Default: `true`

The warings found will be printed.

### `emitError`

- Type: `boolean`
- Default: `true`

The errors found will be printed.

### `failOnWarning`

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

Will cause the module build to fail if there are any warnings, based on `emitWarning`.

### `failOnError`

- Type: `boolean`
- Default: `true`

Will cause the module build to fail if there are any errors, based on `emitError`.

## License

MIT

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