Use Shareable Configurations: Recommended and All
mainThe plugin provides two main pre-configured sets of rules:
- Recommended: Enforces good testing practices. Use
vitest.configs.recommended. - All: Enables every available rule in the plugin. Use
vitest.configs.all.
In ESLint Flat Config, you can spread these directly into your configuration object.
// Recommended
import vitest from '@vitest/eslint-plugin'
export default defineConfig({
...vitest.configs.recommended,
})
// All
import vitest from '@vitest/eslint-plugin'
export default defineConfig({
...vitest.configs.all,
})