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

@clipboard-health/playwright-flake-linter

v1.0.2

Published

Shared configurable checks for Playwright flake anti-patterns.

Readme

@clipboard-health/playwright-flake-linter

Shared, configurable TypeScript AST checks for Playwright flake anti-patterns. The rule implementation lives in this package; consuming repositories provide only their paths, helper names, mechanism names, and justified exceptions.

Install

npm install --save-dev @clipboard-health/playwright-flake-linter

TypeScript is a runtime dependency because the checker uses the compiler API; glob provides the repository-standard source discovery used by embedex. Both are actively maintained, commercially compatible (Apache-2.0 and ISC), already standardized in this monorepo, and the CLI is not included in application bundles.

Configure

Create playwright-flake-lint.config.mjs at the repository root:

export default {
  scanRoots: ["playwright"],
  hardenedIdentityHelperNames: ["generateRandomUserEmail"],
  identityHelperMinimumLengths: {
    generateRandomAlphaNumericString: 24,
    generateRandomString: 26,
  },
  retryHelperNames: ["retry"],
  specificRequestMatcherNames: ["isMatchingRequest"],
  transientClassifierNamePatterns: ["^isRetryable", "retryClassification"],
  undiscriminatingRetryHelperNames: ["retryUntilPassOrTimeout", "toPass"],
  sharedReadinessMechanisms: [
    {
      name: "Home Health response readiness",
      filePathPattern: "playwright/e2e/homeHealth/.*\\.spec\\.ts$",
      directCallNames: ["waitForResponse"],
      sharedHelperNames: ["waitForHomeHealthResponse"],
    },
  ],
};

The mobile repository can use its own genuine names without changing a rule:

export default {
  scanRoots: ["playwright"],
  identityHelperMinimumLengths: {
    mobileRandomSuffix: 32,
  },
  retryHelperNames: ["retryMobileAction"],
  specificRequestMatcherNames: ["matchesMobileRequest"],
  transientClassifierNamePatterns: ["^isTransientMobile"],
  sharedReadinessMechanisms: [
    {
      name: "BottomSheet readiness",
      filePathPattern: "playwright/e2e/sheets/.*\\.spec\\.ts$",
      directCallNames: ["waitForResponse"],
      sharedHelperNames: ["waitForBottomSheet"],
    },
  ],
};

All pattern fields are JavaScript regular-expression source strings. Optional configuration:

| Field | Purpose | | ---------------------------------- | ------------------------------------------------------------------- | | allowlist | Reason-required repository exceptions by rule and file pattern | | hardenedIdentityHelperNames | Identity helpers that are safe without a length argument | | identityHelperMinimumLengths | Repository random-helper names and their safe minimum lengths | | identityNamePattern | Names treated as parallel-worker-sensitive identities | | responseWaitCallNames | Repository response-wait utility names | | retryHelperNames | Retry utilities whose callbacks must classify transient failures | | sharedReadinessMechanisms | File/mechanism registry mapping direct gates to shared helpers | | specificRequestMatcherNames | Delegated helpers that fully discriminate a response request | | specFilePattern | Files where fixed-sleep checks apply | | transientClassifierNamePatterns | Classifier names accepted inside retry callbacks | | undiscriminatingRetryHelperNames | Utilities that inherently retry any failure and are always rejected |

sharedReadinessMechanisms[].name is the diagnostic label, so repositories can use their native terminology such as Dialog or BottomSheet.

Wire into CI

Add the executable to the repository's existing verification chain:

{
  "scripts": {
    "architecture:check": "existing-checks && playwright-flake-lint"
  }
}

Use a non-default config location with playwright-flake-lint --config path/to/config.mjs.

Rules

| Rule ID | Anti-pattern | Required alternative | | ---------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------------- | | fixed-sleep | waitForTimeout or setTimeout delays in specs | Rubric B2: use a deterministic readiness signal | | response-wait | Status/.ok() response predicates without specific request data | Rubric B2: match method, URL, and a discriminating request predicate | | retry-classification | Retry utilities invoked without transient-only classification | Rubric B1: classify transient failures and fail fast otherwise | | test-data-identity | Low-entropy identities or bypasses of hardened random helpers | Rubric A2: use configured hardened or UUID-backed identities | | shared-readiness | Per-spec readiness gates where a shared mechanism helper exists | Rubric A1: use or extend the configured shared helper |

Allowlisting

Prefer fixing a violation. A justified inline exception must immediately precede the violating statement and include a reason:

// flake-lint-allow fixed-sleep -- The timer fixture verifies elapsed product time.
await page.waitForTimeout(100);

A repository-level exception also requires a reason:

export default {
  scanRoots: ["playwright"],
  allowlist: [
    {
      ruleId: "fixed-sleep",
      filePathPattern: "playwright/e2e/legacy/timer\\.spec\\.ts$",
      reason: "The timer fixture verifies elapsed product time.",
    },
  ],
};

Comments or config entries without a non-empty reason do not suppress a violation.

Future shared rules

The existing per-repository Dialog/query-list checks are a candidate for this package. Their component-name difference (Dialog in admin and BottomSheet in mobile) belongs in repository config when that rule is migrated; this package does not change those checks yet.