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

pam-vitest-config

v1.0.0

Published

Pam AI vitest preset configuration

Readme

Table of Contents

Develop

Pre Requisites

To install dependencies and activate pre commit hooks

npm install
npx husky install

Debug

To run index.js and test the code in there

npm run debug

Prerequisites

Node.js: >=22 (tested on v22.14.0)

Required peer dependencies:

  • vitest >= 4.0.0

This package and its dependencies are installed directly from GitHub repositories. No special npm configuration is required.

Installation

Add this package to your package.json as a dependency:

{
  "dependencies": {
    "pam-vitest-config": "1.0.0"
  }
}

Or reference a specific version/tag:

{
  "dependencies": {
    "pam-vitest-config": "1.0.0"
  }
}

Then run npm install.

This package also includes linting and formatting configurations from pam-eslint-config.

Usage

Vitest Configuration

Create a vitest.config.ts file with following contents in the root folder of your project.

/// <reference types="vitest" />

import { defineConfig } from 'vitest/config';
import pamVitestConfig from 'pam-vitest-config';

// This configuration should be enough for most of the cases
// it will automatically detect if react is installed,
// and return an object configured for react testing library to be used as the testing suite

// Create an excludes array, to exclude folders from being tested and from coverage to be collected from them
const excludes = [
  '**/node_modules/**',
  '**/dist/**',
  '**/target/**',
  '**/build/**',
  './.husky/**',
  './.github/**',
];

export default defineConfig({
  ...pamVitestConfig,
  test: {
    ...pamVitestConfig.test,
    exclude: excludes,
    coverage: {
      ...pamVitestConfig.test.coverage,
      exclude: excludes,
    },
  },
});

ESLint Configuration

This package uses ESLint 9 with flat config format. Create an eslint.config.js file in your project root:

module.exports = require('pam-eslint-config');

Prettier Configuration

Create a .prettierrc.js file in your project root:

module.exports = {
  ...require('pam-eslint-config/prettierConfig'),
};

Other configs

React project are automatically detected by the base config, which also contains relevant rules and parameters.

This preset also exposes a few other configs that could be used separately.

  • vitestBaseConfig
  • vitestReactTestingLibraryConfig

You can use them standalone.

Configuration Examples

Please check the examples section of this repository to find each type of possible configuration.

Versioning

This is a public GitHub repository that is directly referenced by other projects. To create a new version:

  1. Update version in package.json
  2. Commit your changes:
    git add .
    git commit -m "v1.1.0: Description of changes"
  3. Create a git tag (optional but recommended):
    git tag v1.1.0
    git push origin main --tags

Projects reference this repo in their package.json:

{
  "dependencies": {
    "pam-vitest-config": "1.1.0"
  }
}