Vite Plugin Checker

0.13.0 · active · verified Sun Apr 19

vite-plugin-checker is a Vite plugin designed to offload various code health checks, such as TypeScript type checking, ESLint linting, Biome formatting/linting, Stylelint, Oxlint, and Vue-specific checks (VLS, vue-tsc), into a separate worker process. This architecture prevents these potentially time-consuming checks from blocking the main Vite development server, thereby improving HMR performance and overall developer experience. The current stable version is 0.13.0, with minor releases occurring frequently to add new features, support newer versions of linters, and address bug fixes. Its key differentiators include its multi-tool support, its use of worker threads for performance, and its integration with Vite's overlay for displaying issues. It's an essential tool for maintaining code quality in large Vite projects, especially those using TypeScript or Vue.js.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to integrate `vite-plugin-checker` into a Vite project with Vue and TypeScript, enabling both TypeScript type checking and ESLint linting. It shows the basic configuration for adding the plugin to `vite.config.ts`.

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { checker } from 'vite-plugin-checker';

export default defineConfig({
  plugins: [
    vue(),
    checker({
      typescript: true, // Enable TypeScript type checking
      eslint: {
        lintCommand: 'eslint "./src/**/*.{js,jsx,ts,tsx,vue}"', // ESLint command
      },
      // biome: {
      //   lintCommand: 'biome check --write --no-errors-on-unmatched --files-ignore-unknown=true .',
      // },
      // stylelint: {
      //   lintCommand: 'stylelint "./src/**/*.{css,scss,vue}"',
      // },
      // vueTsc: true, // Enable vue-tsc if using Vue 3
    }),
  ],
  server: {
    // Optional: Configure the server to display overlay for errors
    overlay: {
      initialIsOpen: false,
      // Make sure the checker overlay doesn't conflict with Vite's own overlay
    },
  },
});

view raw JSON →