no-empty-vitest-project-name
Disallow empty test.name values in Vitest config and workspace project entries.
Rule catalog ID: R026
Targeted pattern scopeโ
vitest.config.*vitest.workspace.*vite.config.*when a Vitesttestblock is used- root and inline project
test.name
What this rule reportsโ
This rule reports test.name values that are empty or whitespace-only static strings.
Why this rule existsโ
Project names appear in Vitest output, filtering, and workspace-level workflows. Empty names make project reporting ambiguous and often indicate an unfinished config edit.
โ Incorrectโ
import { defineWorkspace } from "vitest/config";
export default defineWorkspace([
{
test: {
name: "",
},
},
]);
โ Correctโ
import { defineWorkspace } from "vitest/config";
export default defineWorkspace([
{
test: {
name: "unit",
},
},
]);
Behavior and migration notesโ
- this rule checks static strings only
- computed names are not evaluated
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 project intentionally derives names dynamically at runtime and committed static placeholders may be empty during generation.