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.
npm install vite-plugin-checkerVerified import paths — ran on the pinned version, not inferred.
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`.
Ensure your `vite.config.js` or `vite.config.ts` uses ESM syntax (e.g., `import` statements) and your `package.json` specifies `"type": "module"` or uses `.mjs` files for configuration if needed.
Ensure your Node.js version meets the minimum requirement (`>=16.11`). Update `vite-plugin-checker` and related dependencies to their latest compatible versions.
Always install peer dependencies explicitly at compatible versions. Refer to `package.json`'s `peerDependencies` range or the plugin's documentation for the exact compatible versions.
Review any custom file watching configurations you might have. If issues arise, consult `chokidar`'s v4 migration guide and `vite-plugin-checker`'s documentation. Ensure `vite-plugin-checker` is updated to a version compatible with your `chokidar` setup, or let the plugin manage `chokidar` versions.
If upgrading ESLint to v10, ensure all your ESLint configurations and plugins are also compatible with v10. Consult the ESLint v10 migration guide. Update `vite-plugin-checker` to version 0.13.0 or newer for official support.
Migrate your Vite configuration file (`vite.config.js` or `vite.config.ts`) to use ES module syntax (`import ... from '...'`). Ensure `package.json` has `"type": "module"` if not using `.mjs` file extension.
Verify ESLint is installed (`npm install -D eslint`). Check your `.eslintrc.*` configuration. Ensure the `lintCommand` in `vite-plugin-checker` accurately targets your source files (e.g., `eslint "./src/**/*.{js,jsx,ts,tsx,vue}"`).Install TypeScript (`npm install -D typescript`). Ensure a `tsconfig.json` file exists in your project root with correct configuration.
Ensure `vue-tsc` is installed (`npm install -D vue-tsc`). Check the `peerDependencies` of `vite-plugin-checker` for compatible `vue-tsc` versions. Try enabling `vueTsc: true` in the checker options.
Ensure all ESLint/Stylelint/Biome configurations and their respective plugins are correctly installed as dev dependencies. For example, `npm install -D eslint-config-prettier` if that's the missing piece. Double-check your config files (`.eslintrc`, `.stylelintrc`, `biome.json`) for correct `extends` paths.