Skip to main content

๐ŸŽฏ Preset selection strategy

Choose presets by where the risk lives in your repository.

Start hereโ€‹

If you are unsure, start with:

import vite from "@typpi/eslint-plugin-vite";

export default [vite.configs.recommended];

Add focused presets by repository shapeโ€‹

App code uses import.meta.env or import.meta.globโ€‹

Add vite.configs.client.

Vitest configs or workspaces are central to the repoโ€‹

Add vite.configs.vitest.

Benchmarks live alongside testsโ€‹

Add vite.configs.vitest-bench.

You want the broadest safety netโ€‹

Move to vite.configs.strict or vite.configs.all.

Preset intentโ€‹

  • recommended: common pitfalls with low false-positive risk
  • strict: stricter client-env and workspace guidance
  • all: every rule
  • configs: only config-file safety rules
  • client: only runtime/client rules
  • vitest: only Vitest-focused rules
  • vitest-bench: only benchmark-focused rules

Further readingโ€‹