1. vite-plugin-eslint
ESLint plugin for vite.
vite-plugin-eslint
Package: vite-plugin-eslint
Created by: gxmari007
Last modified: Tue, 16 Aug 2022 13:24:34 GMT
Version: 1.8.1
License: MIT
Downloads: 1,916,993
Repository: https://github.com/gxmari007/vite-plugin-eslint

Install

npm install vite-plugin-eslint
yarn add vite-plugin-eslint

vite-plugin-eslint

npm
npm peer dependency version
npm peer dependency version
GitHub license

ESLint plugin for vite.

Install

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

Usage

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

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

Options

You can pass eslint options.

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin