ESLint plugin for vite.
npm install vite-plugin-eslint --save-dev
# or
yarn add vite-plugin-eslint --dev
import { defineConfig } from 'vite';
import eslintPlugin from 'vite-plugin-eslint';
export default defineConfig({
plugins: [eslintPlugin()],
});
- Type:
boolean
- Default:
true
Decrease execution time.
- Type:
boolean
- Default:
false
Auto fix source code.
- 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.
- Type:
string | string[]
- Default:
'node_modules'
A single file, or array of files, to exclude when linting.
- Type:
string | ESLint.Formatter
- Default:
stylish
Custom error formatter or the name of a built-in formatter.
- Type:
boolean
- Default:
true
The warings found will be emitted, default to true.
- Type:
boolean
- Default:
true
The errors found will be emitted, default to true.
MIT