Skip to content

javialcantaras/vite-plugin-eslint

 
 

Repository files navigation

vite-plugin-eslint

npm GitHub license

ESLint plugin for vite.

Install

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

Usage

import { defineConfig } from 'vite';
import eslintPlugin from 'vite-plugin-eslint';

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

Options

cache

  • Type: boolean
  • Default: true

Decrease execution time.

fix

  • Type: boolean
  • Default: false

Auto fix source code.

include

  • Type: string | string[]
  • Default: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*.ts', 'src/**/*.tsx', 'src/**/*.vue']

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
  • Default: stylish

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

throwOnWarning

  • Type: boolean
  • Default: true

The warings found will be emitted, default to true.

throwOnError

  • Type: boolean
  • Default: true

The errors found will be emitted, default to true.

License

MIT

About

🚨 ESLint plugin for vite

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 57.2%
  • Vue 21.8%
  • CSS 11.3%
  • HTML 8.1%
  • Shell 1.6%