Skip to content

vite-plugin-checker

Catch type errors and lint issues while Vite runs

Run TypeScript, vue-tsc, svelte-check, ESLint, Biome, oxlint, and Stylelint in worker threads. Problems show up in your terminal and browser as you work, and a failing check fails vite build.

$ vite

  VITE ready in 312 ms

  ➜  Local:   http://localhost:5173/

 ERROR(TypeScript)  Cannot find name 'titel'. Did you mean 'title'?
 FILE  src/App.tsx:7:15

    6 |   const title = 'Hello'
  > 7 |   return <h1>{titel}</h1>
      |               ^
    8 | }

[TypeScript] Found 1 error. Watching for file changes.
[ESLint] Found 0 errors and 1 warning

Use the tools you already have

Each checker wraps an existing tool and reads its usual config file, so results match your editor and CI. Enable as many as you need.

vite

While you develop

  • Doesn't slow Vite down. Each checker runs in its own worker thread, in watch mode, so transforms and HMR stay fast.
  • Shows problems where you're looking. Diagnostics appear in the terminal and in an overlay in the browser, including on pages rendered by SSR frameworks.
  • Takes you to the fix. Click a location to open it in your editor, or a rule name to read its docs.
Overlay and terminal →

vite build

When you build

  • Runs the same checks as CI. Each checker runs its own CLI, such as tsc or eslint, with your config.
  • Runs alongside bundling. Checks start with the build and run in parallel with it.
  • Fails broken builds. If a check fails, the build exits with its exit code. Set enableBuild: false to check in dev only.
Dev and build modes →

Set it up

Install the plugin with the tools you want to run, then enable them in your Vite config.

Using Nuxt, Vitest, or a backend framework? See the recipes.

Read the guide
bash
pnpm add -D vite-plugin-checker typescript
bash
npm install -D vite-plugin-checker typescript
bash
yarn add -D vite-plugin-checker typescript
bash
bun add -d vite-plugin-checker typescript
ts
// vite.config.ts
import { defineConfig } from 'vite'
import checker from 'vite-plugin-checker'

export default defineConfig({
  plugins: [
    checker({
      typescript: true,
    }),
  ],
})

Released under the MIT License.