๐ Adoption checklist
Use this checklist when introducing eslint-plugin-vite to an existing codebase.
Baseline rolloutโ
- Start with
vite.configs.recommended. - Fix any config-file errors first.
- Add
vite.configs.clientonly after client bundles are already usingimport.meta.envandimport.meta.globconsistently. - Add
vite.configs.vitestonly if your repository actually uses Vitest configs or workspaces. - Add
vite.configs.vitest-benchonly if benchmark files live next to test files and contributors could accidentally mix them.
Config-file reviewโ
- Check
vite.config.*exports. - Check
vitest.config.*exports. - Check
vitest.workspace.*project names. - Check
resolve.aliasvalues for relative replacement strings. - Check
envPrefixfor accidental empty strings.
Client code reviewโ
- Search for
import.meta.env[...]. - Search for
import.meta.glob(with variables or interpolated template strings. - Review any env keys that do not use your public prefix.
Team process reviewโ
- Decide whether benchmark files should be linted with
vite.configs.vitest-bench. - Decide whether
vite.configs.strictshould be opt-in or the default. - Document any custom public env prefixes so the env rule can be configured explicitly.