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

eslint-plugin-catchpoint-playwright

v1.1.1

Published

ESLint plugin for Catchpoint Playwright tests

Readme

ESLint Plugin for Catchpoint Playwright

An ESLint plugin that enforces restrictions on Playwright APIs to ensure compatibility with Catchpoint's testing environment.

Features

This plugin provides two custom ESLint rules:

  1. no-restricted-catchpoint-playwright-imports - Prevents importing specific Playwright types that are not supported in Catchpoint tests
  2. no-restricted-catchpoint-playwright-properties - Prevents using specific page and browser properties that are not supported in Catchpoint tests

Installation

npm install eslint-plugin-catchpoint-playwright --save-dev

Compatibility

This plugin supports:

  • ESLint v7.x, v8.x, v9.x
  • Node.js 14+

Usage

ESLint v9+ (Flat Config)

For the new flat config format in ESLint 9+:

// eslint.config.js
import catchpointPlaywright from 'eslint-plugin-catchpoint-playwright';

export default [
  {
    plugins: {
      'catchpoint-playwright': catchpointPlaywright
    },
    rules: {
      ...catchpointPlaywright.configs['flat/recommended'].rules
    }
  }
];

ESLint v7 & v8 (Legacy Config)

For traditional .eslintrc.* configuration files:

{
  "plugins": ["catchpoint-playwright"],
  "extends": ["plugin:catchpoint-playwright/recommended"]
}

Or in .eslintrc.js:

module.exports = {
  plugins: ['catchpoint-playwright'],
  extends: ['plugin:catchpoint-playwright/recommended']
};

Manual Configuration

You can also configure individual rules:

{
  "plugins": ["catchpoint-playwright"],
  "rules": {
    "catchpoint-playwright/no-restricted-catchpoint-playwright-imports": "error",
    "catchpoint-playwright/no-restricted-catchpoint-playwright-properties": "error"
  }
}

Rules

no-restricted-catchpoint-playwright-imports

Prevents importing the following types from @playwright/test as they are not supported in Catchpoint tests:

  • Browser
  • BrowserContext
  • BrowserServer
  • BrowserType

❌ Invalid:

import { Browser, BrowserContext } from '@playwright/test';

✅ Valid:

import { test, expect, Page } from '@playwright/test';

no-restricted-catchpoint-playwright-properties

Prevents using the following page and browser properties that are not supported in Catchpoint tests:

Page properties:

  • addInitScript()
  • close()
  • pdf()
  • routeFromHAR()
  • screenshot()
  • setDefaultNavigationTimeout()
  • setDefaultTimeout()
  • video
  • workers
  • context

Browser properties:

  • newContext()

❌ Invalid:

await page.screenshot();
await page.close();
const context = browser.newContext();

✅ Valid:

await page.goto('https://example.com');
await page.click('button');
await page.fill('input', 'value');

Example

Here's a complete example of a Catchpoint-compatible Playwright test:

import { test, expect } from '@playwright/test';

test('example test', async ({ page }) => {
  // ✅ Supported operations
  await page.goto('https://example.com');
  await page.click('button#submit');
  await page.fill('input[name="username"]', 'testuser');

  const title = await page.title();
  expect(title).toBe('Example Page');

  // ❌ These would trigger ESLint errors:
  // await page.screenshot(); // Not supported in Catchpoint
  // await page.close(); // Not supported in Catchpoint
});

Development

This project uses:

  • TypeScript for type safety
  • Vitest for testing
  • ESLint for code quality

Running Tests

npm test

Building

npm run build

License

MIT

© 2025 - Jabran Rafique