no-vitest-ui-in-config
Disallow committed test.ui: true in Vitest config.
Rule catalog ID: R037
Targeted pattern scopeโ
vitest.config.*vitest.workspace.*vite.config.*when Vitesttest.uiis configured
What this rule reportsโ
This rule reports explicit test.ui: true assignments.
Why this rule existsโ
Vitest UI mode is usually intended for local interactive debugging. Committing it as a default can cause inconsistent behavior across environments and CI.
โ Incorrectโ
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
ui: true,
},
});
โ Correctโ
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
ui: false,
},
});
Behavior and migration notesโ
- this rule reports only explicit
true - local UI workflows should prefer CLI flags or local-only overrides
ESLint flat config exampleโ
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.strict, vite.configs.vitest];
When not to use itโ
Disable this rule only if your repository intentionally enables Vitest UI mode in committed shared config.