ADR 0001 β Focus rules on Vite and Vitest runtime contracts
- Status: Accepted
- Date: 2026-03-21
Contextβ
This repository started from a general ESLint plugin template. Without a clear boundary, it would be easy for the project to drift into broad TypeScript style rules that overlap with existing ecosystems and dilute the value of a Vite-specific plugin.
Decisionβ
eslint-plugin-vite will prioritize rules that enforce real Vite, Vitest, and Vitest bench contracts, such as:
- config-file structure and migration safety
import.meta.envandimport.meta.glob()correctness- Vitest workspace composition and benchmark/test separation
- configuration hardening for server, preview, and related runtime surfaces
Consequencesβ
Positiveβ
- The plugin stays easy to explain: it exists to catch mistakes that matter specifically in Vite-based projects.
- Rule docs can link directly to Vite and Vitest concepts instead of generic JavaScript style guidance.
- Presets can be organized around practical Vite workflows: config files, client runtime, test projects, and benchmarks.
Negativeβ
- Some potentially useful generic rules are intentionally out of scope.
- Maintainers need to verify behavior against evolving Vite and Vitest documentation instead of relying only on generic ESLint conventions.
Rejected alternativesβ
Become a broad frontend-style pluginβ
Rejected because it would compete with established lint stacks while making the package identity less clear.
Only ship config-file rulesβ
Rejected because Vite-specific mistakes also happen in client runtime code and Vitest workspace organization, not just in vite.config.* files.