npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gabroberge/eslint-plugin-vitest

v0.1.4

Published

Readme

@gabroberge/eslint-plugin-vitest

Nest/Vitest lint rules for how a spec is structured: suite vs scenario, arrange vs act, and what a test is allowed to assert.

The plugin registers as vitestExtended. Enable configs.recommended for the rules that are cheap to enforce automatically. configs.all also turns on the rules that need more judgment.

Install

npm install -D @gabroberge/eslint-plugin-vitest

Usage

ESLint flat config

import vitestExtended from "@gabroberge/eslint-plugin-vitest";

export default [vitestExtended.configs.recommended];

Oxlint

{
	"jsPlugins": ["@gabroberge/eslint-plugin-vitest"],
	"rules": {
		"vitestExtended/require-expect": "error"
	}
}

Configs

| Config | What it enables | | --------------------- | --------------------------------------------------------- | | configs.recommended | Rules marked recommended, at each rule's default severity | | configs.all | Every rule, at each rule's default severity |

Rules

| Rule | Recommended | Fix | Default | What it reports | | ---------------------------------------------------- | ----------- | --- | ------- | ------------------------------------------------------------------------- | | vitestExtended/no-identical-test-body | yes | | error | An it / test body that repeats an earlier test in the same describe | | vitestExtended/no-if-in-test-title | yes | | error | An it / test title that contains if | | vitestExtended/no-single-case-each | yes | | error | .each with exactly one statically known case | | vitestExtended/no-spy-on-outside-before-each | yes | | error | vi.spyOn created outside beforeEach | | vitestExtended/no-tautological-equality | yes | | error | Equality that compares a value with itself or a sole spread of itself | | vitestExtended/no-test-outside-describe | yes | | error | An it / test outside a describe nested below the suite | | vitestExtended/no-when-in-test-title | yes | yes | error | A when condition in an it / test title | | vitestExtended/require-expect | yes | | error | An it / test that never calls expect in its own body | | vitestExtended/no-arrange-in-test | | | error | Mock or spy setup inside it / test | | vitestExtended/no-generic-http-exception-assertion | | | warn | An assertion that only names a Nest HTTP exception type | | vitestExtended/no-inherited-property-test-matrix | | | error | A subclass test that covers one inherited property on its own | | vitestExtended/no-redundant-wiring-test | | yes | error | A minimal toBeDefined() wiring test beside another executable test | | vitestExtended/no-when-in-suite-title | | | error | A suite describe title that starts with when | | vitestExtended/ordered-dto-test-groups | | yes | error | A *.dto.spec.ts suite that is not setup, then when, then properties |

no-generic-http-exception-assertion accepts exceptionNames, exemptFilePatterns, matchers, and testFilePatterns.

The test grammar those rules assume is in docs/test-grammar.md.