Skip to content
PluginStats

eslint-plugin-vitest-globals weekly downloads statistics

By saqqdy · npm · ESLint plugins

ESLint plugin for Vitest globals

View on npm Stale · Oct 18, 2026

eslint-plugin-vitest-globals has 83,111 recorded weekly downloads on npm, a decrease of 46.1% over the past 30 days, ranking #498 of 2,391 tracked listings.

Weekly downloads
83,111
Official API · Oct 18, 2026
7-day growth
-51.1%
-87K weekly downloads
30-day growth
-46.1%
-71.2K weekly downloads
90-day growth
-53.8%
-96.9K weekly downloads
Rank
#498
Among tracked npm listings

About eslint-plugin-vitest-globals

<div style="text-align: center;" align="center">

eslint-plugin-vitest-globals

ESLint plugin for Vitest globals

[![NPM version][npm-image]][npm-url] [![Codacy Badge][codacy-image]][codacy-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][download-url] [![License][license-image]][license-url]

[![Sonar][sonar-image]][sonar-url]

<div style="text-align: center; margin-bottom: 20px;" align="center">
Change Log
</div> </div>

Installation

# pnpm
pnpm add -D eslint-plugin-vitest-globals

# npm
npm install -D eslint-plugin-vitest-globals

# yarn
yarn add -D eslint-plugin-vitest-globals

Usage

Classic Config (ESLint 8 and below)
Option 1: Apply to all files
{
  "extends": ["plugin:vitest-globals/recommended"]
}
Option 2: Apply only to test files (Recommended)
{
  "overrides": [
    {
      "files": ["**/__tests__/**/*.[jt]s?(x)", "**/*.test.[jt]s?(x)", "**/*.spec.[jt]s?(x)"],
      "extends": ["plugin:vitest-globals/recommended"]
    }
  ]
}
Option 3: Using environment only

If you only need the globals without the base config:

{
  "plugins": ["vitest-globals"],
  "env": {
    "vitest-globals/env": true
  }
}
Option 4: With overrides and environment
{
  "overrides": [
    {
      "files": ["**/*.test.js", "**/*.spec.js"],
      "plugins": ["vitest-globals"],
      "env": {
        "vitest-globals/env": true
      }
    }
  ]
}
Flat Config (ESLint 9+)
Option 1: Using the recommended config
// eslint.config.js
import vitestGlobals from 'eslint-plugin-vitest-globals'

export default [
  {
    files: ['**/*.test.js', '**/*.spec.js'],
    ...vitestGlobals.configs['flat/recommended']
  }
]
Option 2: Using the base config
// eslint.config.js
import vitestGlobals from 'eslint-plugin-vitest-globals'

export default [
  {
    files: ['**/*.test.js', '**/*.spec.js'],
    ...vitestGlobals.configs['flat/base']
  }
]
Option 3: With TypeScript files
// eslint.config.js
import vitestGlobals from 'eslint-plugin-vitest-globals'

export default [
  {
    files: ['**/*.test.ts', '**/*.spec.ts'],
    ...vitestGlobals.configs['flat/recommended']
  }
]
Option 4: With JavaScript and TypeScript
// eslint.config.js
import vitestGlobals from 'eslint-plugin-vitest-globals'

export default [
  {
    files: ['**/*.test.{js,ts}', '**/*.spec.{js,ts}', '**/__tests__/**/*.{js,ts}'],
    ...vitestGlobals.configs['flat/recommended']
  }
]
Option 5: Custom configuration
// eslint.config.js
import vitestGlobals from 'eslint-plugin-vitest-globals'

export default [
  {
    files: ['tests/**/*.js'],
    plugins: {
      'vitest-globals': vitestGlobals
    },
    languageOptions: {
      globals: {
        ...vitestGlobals.environments.env.globals
      }
    }
  }
]

Supported Globals

The plugin provides the following Vitest globals:

Test Functions
GlobalDescription
suiteDefine a test suite
testDefine a test
describeDefine a test suite (alias)
itDefine a test (alias)
xtestSkip a test
xitSkip a test (alias)
xdescribeSkip a suite
benchDefine a benchmark
benchmarkDefine a benchmark (alias)
Assertions
GlobalDescription
expectAssertion function
assertAssert function
chaiChai assertion library
Type Checking
GlobalDescription
expectTypeOfRuntime type checking
assertTypeType assertion
Utilities
GlobalDescription
viVitest mock utility
vitestVitest instance
Hooks
GlobalDescription
beforeAllRun before all tests
afterAllRun after all tests
beforeEachRun before each test
afterEachRun after each test
onTestFinishedCallback when test finishes
onTestFailedCallback when test fails

Compatibility

ESLint VersionConfig TypeSupported
ESLint 8.xClassic Config✅
ESLint 8.xFlat Config✅
ESLint 9.xFlat Config✅
Prettier VersionCompatible
Prettier 2.x✅
Prettier 3.x✅

TypeScript Support

This plugin includes TypeScript type definitions. No additional @types package is needed.

// example.test.ts
// No imports needed - globals are automatically available

describe('TypeScript test', () => {
  it('should work with types', () => {
    expect(1 + 1).toBe(2)
  })
})

Vitest Configuration

To enable Vitest globals, add globals: true to your Vitest config:

// vitest.config.js
import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    globals: true
  }
})

Example with Prettier

This plugin works seamlessly with Prettier:

{
  "extends": ["plugin:vitest-globals/recommended", "prettier"]
}

Support & Issues

Please open an issue here.

License

MIT…

Description from the npm listing.

  • vitest
  • vitest-globals
  • vitest-env
  • vitest-eslint
  • eslint-plugin
  • eslint-plugin-vitest
  • eslint-plugin-vitest-globals
  • eslint
  • eslint-config
  • eslint-extends
  • flat-config
  • testing
  • unit-test
  • benchmark
  • saqqdy

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

eslint-plugin-vitest-globals weekly downloads on npm, last 90 days: 83,111 weekly downloads as of Oct 18, 2026, -53.8% over 90 days.eslint-plugin-vitest-globalsWeekly downloads on npm · Last 90 days83,111downloads / week-53.8% over 90 days050K100K150K200K250KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
eslint-plugin-vitest-globals weekly downloads on npm, last 90 days: 83,111 weekly downloads as of Oct 18, 2026, -53.8% over 90 days.

7/30/90-day growth

eslint-plugin-vitest-globals weekly downloads growth on npm: -51.1% over 7 days, -46.1% over 30 days, -53.8% over 90 days.eslint-plugin-vitest-globalsWeekly downloads growth on npm83,111downloads / week now7-day growth-86,954 weekly downloads-51.1%30-day growth-71,185 weekly downloads-46.1%90-day growth-96,858 weekly downloads-53.8%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
eslint-plugin-vitest-globals weekly downloads growth on npm: -51.1% over 7 days, -46.1% over 30 days, -53.8% over 90 days.

Ranking history

eslint-plugin-vitest-globals npm ranking history: currently #498 (by weekly downloads).eslint-plugin-vitest-globalsnpm ranking · by weekly downloads · Last 90 days#498current rank#486#488#490#492#494#496#498#500Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
eslint-plugin-vitest-globals npm ranking history: currently #498 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,196 shown · page 25, #18 (overall #498)
All npm: every listing in weekly downloads order

Listing placement

ESLint plugins258 listings · 13 pages · page 6, #14 (overall #114)
ESLint plugins: every listing in weekly downloads order

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.

Each band is one page of 20. Weekly downloads on a linear 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.

Recent observations

Full history (122)
Recent weekly downloads observations for eslint-plugin-vitest-globals
Date (UTC)Weekly downloadsChange vs. previous
83,111+10.7K
72,368-12K
84,401+148
84,253-39.5K
123,750-38.5K
162,2210
162,221-7.8K
170,065+782
169,283-1.3K
170,626-2.9K
173,533-13.5K
187,006-1.9K
188,926-40.5K
229,422—

Similar npm ESLint plugins plugins

All 20 eslint-plugin-vitest-globals alternatives

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/eslint-plugin-vitest-globals. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.