Package Exports
- eslint-plugin-vitest
Readme
eslint-plugin-vitest
Eslint plugin for vitest
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-vitest
:
npm install eslint-plugin-vitest --save-dev
Usage
Add vitest
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["vitest"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"vitest/max-nested-describe": [
"error",
{
"max": 3
}
]
}
}
List of supported rules
🔧 Automatically fixable by the --fix
CLI option.
Name | Description | 🔧 |
---|---|---|
expect-expect | Enforce having expectation in test body | 🔧 |
lower-case-title | Enforce lowercase titles | 🔧 |
max-nested-describe | Disallow nested describes | 🔧 |
no-conditional-tests | Disallow conditional tests | 🔧 |
no-focused-tests | Disallow focused tests | 🔧 |
no-identical-title | Disallow identical titles | 🔧 |
no-skipped-tests | Disallow skipped tests | 🔧 |