require-vitest-slow-test-threshold
Require explicit test.slowTestThreshold in committed Vitest config.
Rule catalog ID: R071
Targeted pattern scopeโ
test.slowTestThreshold
What this rule reportsโ
This rule reports Vitest-oriented config when test.slowTestThreshold is omitted.
Why this rule existsโ
An explicit slow-test threshold keeps performance expectations stable and avoids drifting defaults across projects.
โ Incorrectโ
export default {
test: {},
};
โ Correctโ
export default {
test: {
slowTestThreshold: 250,
},
};
Behavior and migration notesโ
- Applies to Vitest config files and Vite config files that define a
testblock. - Static and computed values are both accepted; this rule checks presence, not value range.
ESLint flat config exampleโ
import vite from "@typpi/eslint-plugin-vite";
export default [vite.configs.vitest];
When not to use itโ
Disable if your project intentionally relies on Vitest defaults and does not need explicit slow-test policy.