@vitest/eslint-plugin weekly downloads statistics
By vitest (2 listings) · npm · ESLint plugins
ESLint plugin for Vitest
@vitest/eslint-plugin has 1,787,196 recorded weekly downloads on npm, a decrease of 46.7% over the past 30 days.
It ranks #161 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -47.0%.
PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.
About @vitest/eslint-plugin
eslint-plugin-vitest
ESLint plugin for Vitest
Installation
You'll first need to install ESLint:
Next, install @vitest/eslint-plugin
Usage
Make sure you're running ESLint v9.0.0 or higher for the latest version of this plugin to work. The following example is how your eslint.config.js should be setup for this plugin to work for you.
If you're not using the latest version of ESLint (version v8.57.0 or lower) you can setup this plugin using the following configuration
Add vitest to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
Then configure the rules you want to use under the rules section.
If you're using old ESLint configuration, make sure to use legacy key like the following
Enabling with Type-Testing
Vitest ships with an optional type-testing feature, which is disabled by default.
If you're using this feature, you should also enabled typecheck in the settings for this plugin. This ensures that rules like expect-expect account for type-related assertions in tests.
Custom Fixtures
If you're using custom fixtures in a separate file and importing them in your tests, you can let the plugin know about them by adding them to the vitestImports setting. The property accepts an array of strings or regular expressions that match the module names where your custom fixtures are defined.
Shareable Configurations
Recommended
This plugin exports a recommended configuration that enforces good testing practices.
To enable this configuration with eslint.config.js, use vitest.configs.recommended:
All
If you want to enable all rules instead of only some you can do so by adding the all configuration to your eslint.config.js config file:
Rules
💼 Configurations enabled in.\ ⚠️ Configurations set to warn in.\ 🚫 Configurations disabled in.\ 🌐 Set in the all configuration.\ ✅ Set in the recommended configuration.\ 🔧 Automatically fixable by the --fix CLI option.\ 💡 Manually fixable by editor suggestions.\ 💭 Requires type information.\ ❌ Deprecated.
| Name | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 | 💭 | ❌ |
| consistent-each-for | enforce using .each or .for consistently | | 🌐 | | | | | | | consistent-test-filename | require test file pattern | | 🌐 | | | | | | | consistent-test-it | enforce using test or it but not both | | 🌐 | | 🔧 | | | | | consistent-vitest-vi | enforce using vitest or vi but not both | | 🌐 | | 🔧 | | | | | expect-expect | enforce having expectation in test body | ✅ | 🌐 | | | | | | | hoisted-apis-on-top | enforce hoisted APIs to be on top of the file | | 🌐 | | | 💡 | | | | max-expects | enforce a maximum number of expect per test | | 🌐 | | | | | | | max-nested-describe | require describe block to be less than set max value or default value | | 🌐 | | | | | | | no-alias-methods | disallow alias methods | | 🌐 | | 🔧 | | | | | no-commented-out-tests | disallow commented out tests | ✅ | 🌐 | | | | | | | no-conditional-expect | disallow conditional expects | ✅ | 🌐 | | | | | | | no-conditional-in-test | disallow conditional tests | | 🌐 | | | | | | | no-conditional-tests | disallow conditional tests | | 🌐 | | | | | | | no-disabled-tests | disallow disabled tests | | 🌐 ✅ | | | | | | | no-done-callback | disallow using a callback in asynchronous tests and hooks | | | | | 💡 | | ❌ | | no-duplicate-hooks | disallow duplicate hooks and teardown hooks | | 🌐 | | | | | | | no-focused-tests | disallow focused tests | ✅ | 🌐 | | 🔧 | | | | | no-hooks | disallow setup and teardown hooks | | 🌐 | | | | | | | no-identical-title | disallow identical titles | ✅ | 🌐 | | 🔧 | | | | | no-import-node-test | disallow importing node:test | ✅ | 🌐 | | 🔧 | | | | | no-importing-vitest-globals | disallow importing Vitest globals | | | 🌐 | 🔧 | | | | | no-interpolation-in-snapshots | disallow string interpolation in snapshots | ✅ | 🌐 | | 🔧 | | | | | no-large-snapshots | disallow large snapshots | | 🌐 | | | | | | | no-mocks-import | disallow importing from mocks directory | ✅ | 🌐 | | | | | | | no-restricted-matchers | disallow the use of certain matchers | | 🌐 | | | | | | | no-restricted-vi-methods | disallow specific vi. methods | | 🌐 | | | | | | | no-standalone-expect | disallow using expect outside of it or test blocks | ✅ | 🌐 | | | | | | | no-test-prefixes | disallow using the f and x prefixes in favour of .only and .skip | | 🌐 | | 🔧 | | | | | no-test-return-statement | disallow return statements in tests | | 🌐 | | | | | | | no-unneeded-async-expect-function | Disallow unnecessary async function wrapper for expected promises | ✅ | 🌐 | | 🔧 | | | | | padding-around-after-all-blocks | Enforce padding around afterAll blocks | | 🌐 | | 🔧 | | | | | padding-around-after-each-blocks | Enforce padding around afterEach blocks | | 🌐 | | 🔧 | | | | | padding-around-all | Enforce padding around vitest functions | | 🌐 | | 🔧 | | | | | padding-around-before-all-blocks | Enforce padding around beforeAll blocks | | 🌐 | | 🔧 | | | | | padding-around-before-each-blocks | Enforce padding around beforeEach blocks | | 🌐 | | 🔧 | | | | | padding-around-describe-blocks | Enforce padding around describe blocks | | 🌐 | | 🔧 | | | | | padding-around-expect-groups | Enforce padding around expect groups | | 🌐 | | 🔧 | | | | | padding-around-test-blocks | Enforce padding around test blocks | | 🌐 | | 🔧 | | | | | prefer-called-exactly-once-with | Prefer toHaveBeenCalledExactlyOnceWith over toHaveBeenCalledOnce and toHaveBeenCalledWith | ✅ | 🌐 | | 🔧 | | | | | prefer-called-once | enforce using toBeCalledOnce() or toHaveBeenCalledOnce() | | | 🌐 | 🔧 | | | | | prefer-called-times | enforce using toBeCalledTimes(1) or toHaveBeenCalledTimes(1) | | 🌐 | | 🔧 | | | | | prefer-called-with | enforce using toBeCalledWith() or toHaveBeenCalledWith() | | 🌐 | | 🔧 | | | | | prefer-comparison-matcher | enforce using the built-in comparison matchers | | 🌐 | | 🔧 | | | | | prefer-describe-function-title | enforce using a function as a describe…
Description from the npm listing.
- eslint
- eslintplugin
- eslint-plugin
- eslint plugin
- vitest
- vitest eslint plugin
Where @vitest/eslint-plugin sits in the listing
Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Recent observations
Full history (543)Similar npm ESLint plugins plugins
Data source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@vitest/eslint-plugin. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.