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-eslint-config

v2.0.0

Published

Pam AI ESLint preset rules - ESLint 9 flat config

Downloads

1,625

Readme

Table of Contents

Overview

This package provides Pam AI's ESLint configuration using the modern ESLint 9 flat config system. It includes:

  • Base config: Core JavaScript/TypeScript linting rules
  • React config: React-specific rules with hooks support
  • Vitest config: Testing rules for Vitest
  • Testing Library config: React Testing Library best practices
  • Prettier integration: Consistent code formatting

Prerequisites

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

Required peer dependencies:

  • eslint >= 9.0.0

Installation

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

{
  "devDependencies": {
    "pam-eslint-config": "2.0.0",
    "eslint": "^9.0.0"
  }
}

Or reference a specific version/tag:

{
  "devDependencies": {
    "pam-eslint-config": "2.0.0",
    "eslint": "^9.0.0"
  }
}

Then run npm install.

Usage

Automatic Configuration (Recommended)

The main export automatically detects your project setup and includes the appropriate presets:

Create eslint.config.mjs in your project root:

import pamConfig from 'pam-eslint-config';

export default [
  ...pamConfig,
  {
    // Your custom rules here
    rules: {
      // Override or extend rules
    },
  },
];

The config will automatically include:

  • ✅ Base config (always included)
  • ✅ Vitest config (if vitest is installed)
  • ✅ React config (if react is installed)
  • ✅ Testing Library config (if @testing-library/react is installed)

Manual Preset Selection

You can also import specific presets for more control:

import baseConfig from 'pam-eslint-config/base';
import reactConfig from 'pam-eslint-config/react';
import vitestConfig from 'pam-eslint-config/vitest';

export default [
  ...baseConfig,
  ...reactConfig,
  ...vitestConfig,
  {
    rules: {
      // Your custom rules
    },
  },
];

Available Presets

Base

Core JavaScript and TypeScript linting rules.

import baseConfig from 'pam-eslint-config/base';

Includes:

  • TypeScript support with @typescript-eslint
  • Prettier integration
  • Import ordering
  • Code quality rules
  • Best practices enforcement

React

React and JSX specific rules.

import reactConfig from 'pam-eslint-config/react';

Includes:

  • React 19+ support (no React import needed)
  • React Hooks rules
  • JSX accessibility (a11y) warnings
  • Component best practices

Vitest

Testing rules for Vitest test files.

import vitestConfig from 'pam-eslint-config/vitest';

Applies to:

  • **/__tests__/**/*.[jt]s?(x)
  • **/?(*.)+(spec|test).[jt]s?(x)

Testing Library

React Testing Library best practices.

import testingLibraryConfig from 'pam-eslint-config/testingLibrary';

Use with React + Testing Library projects.

Configuration Examples

Next.js Project

import pamConfig from 'pam-eslint-config';

export default [
  ...pamConfig,
  {
    ignores: ['.next/**', 'out/**', 'public/**'],
  },
  {
    rules: {
      'react/jsx-props-no-spreading': 'off', // Common in Next.js
    },
  },
];

TypeScript Library

import baseConfig from 'pam-eslint-config/base';

export default [
  ...baseConfig,
  {
    languageOptions: {
      parserOptions: {
        project: './tsconfig.json',
      },
    },
  },
];

React + Vitest Project

import pamConfig from 'pam-eslint-config';

export default [
  ...pamConfig,
  {
    ignores: ['dist/**', 'build/**', 'coverage/**'],
  },
];

Migration Guide

Migrating from ESLint 8 to ESLint 9

If you're upgrading from an older version of this config:

  1. Update ESLint:

    npm install --save-dev eslint@^9.0.0
  2. Delete old config files:

    • Remove .eslintrc.js, .eslintrc.json, or .eslintrc.yml
  3. Create eslint.config.mjs:

    import pamConfig from 'pam-eslint-config';
    
    export default pamConfig;
  4. Update package.json scripts:

    {
      "scripts": {
        "lint": "eslint .",
        "lint:fix": "eslint --fix ."
      }
    }
  5. Remove legacy ignore file:

    • ESLint 9 doesn't use .eslintignore
    • Add ignores in your config instead:
    export default [
      ...pamConfig,
      {
        ignores: ['node_modules/**', 'dist/**'],
      },
    ];

Migrating from Jest to Vitest

This config now only supports Vitest. If you're still using Jest:

  1. Migrate tests to Vitest (recommended)
  2. Or use v1.x of this package (deprecated, ESLint 8 only)

Sharing Prettier Configuration

This package also exports a Prettier configuration.

In your package.json:

{
  "name": "my-project",
  "prettier": "pam-eslint-config/prettierConfig"
}

Or create .prettierrc.js:

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

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 "v2.1.0: Description of changes"
  3. Create a git tag (optional but recommended):
    git tag v2.1.0
    git push origin main --tags

Projects reference this repo in their package.json:

{
  "devDependencies": {
    "pam-eslint-config": "2.1.0"
  }
}

Package Information

  • Version: 2.0.0
  • Node Version: >=22 (tested on v22.14.0)
  • ESLint: ^9.0.0
  • License: See repository

Support

For issues or questions, please open an issue in the GitHub repository.