Getting started
July 3, 2026 ยท View on GitHub
eslint-plugin-vite is a flat-config-first ESLint plugin for catching Vite and Vitest configuration mistakes before they become runtime or build failures.
Installation
npm install --save-dev @typpi/eslint-plugin-vite eslint
If your repository already uses Vite or Vitest, you do not need to change how those tools run just to adopt this plugin.
Quick start
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.recommended];
That preset already configures @typescript-eslint/parser for the files it targets.
Common compositions
Vite app with client-side env and glob usage
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.recommended, vite.configs.client];
Vitest monorepo with workspaces
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.recommended, vite.configs.vitest];
Repository with dedicated benchmark files
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.recommended, vite.configs.vitest - bench];
Stricter rollout after the baseline is clean
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.strict];
Choosing a preset
recommended: best default starting pointstrict: adds stricter env and workspace guidanceconfigs: focused only on config filesclient: focused onimport.meta.envandimport.meta.globvitest: focused on Vitest config and workspacesvitest-bench: focused on benchmark file hygiene
Next steps
- Read the overview.
- Review the preset selection strategy.
- Open the individual rule docs for the parts of Vite or Vitest your repository uses most.