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-zappie

v0.10.4

Published

Flat ESLint rules for Zappie storefront projects.

Readme

eslint-plugin-zappie

ESLint rules for Zappie storefronts. They catch the mistakes that break a storefront quietly: pricing outside the SDK, calling Zappie around it, building your own sign-in or checkout, sending analytics elsewhere, or leaving out the markers zappie verify looks for.

npm install --save-dev eslint-plugin-zappie eslint

ESLint 9 is a peer dependency. The plugin uses flat config.

Use it

// eslint.config.js
import zappie from "eslint-plugin-zappie";

export default [...zappie.configs.recommended];

recommended makes literal unlisted request hosts errors. Computed request URLs use the companion no-unlisted-fetch-dynamic diagnostic at warning severity because their hosts cannot be proved statically. verify-markers and cacheable-menu-routes also warn. strict makes every warning an error.

Rules

| Rule | What it asks for | | ---------------------------------- | ------------------------------------------------------------------ | | zappie/no-direct-api | Call Zappie through the SDK. | | zappie/no-money-literals | Use SDK prices and totals in your storefront. | | zappie/use-format-money | Format SDK Money with format.money() or <Money>. Fixable. | | zappie/cart-via-sdk | Keep your cart state in the SDK. | | zappie/checkout-via-sdk | Open checkout through the Zappie SDK. | | zappie/no-custom-auth | Sign customers in through the Zappie SDK. | | zappie/no-tracking-scripts | Forward analytics through Zappie. | | zappie/overlay-primitive | Use Overlay to keep dialogs and sheets in the URL. | | zappie/verify-markers | Mark shopping actions so verify can find them. Fixable. | | zappie/no-lazy-overlay | Load overlays with deferred(), not React.lazy or Suspense. | | zappie/no-unsafe-html | Sanitize rich text before inserting HTML. | | zappie/no-eval | Do not execute strings as code. | | zappie/no-external-scripts | Ship scripts in the storefront bundle. | | zappie/safe-external-links | Protect new tabs and validate redirect targets. Fixable. | | zappie/no-unlisted-fetch | List external request hosts in outbound.allow. | | zappie/no-unlisted-fetch-dynamic | Review computed request hosts. | | zappie/no-server-env-in-client | Keep server environment values out of client bundles. | | zappie/cacheable-menu-routes | Keep the session out of menu page loaders so caches can keep them. | | zappie/no-offsite-navigation | Keep shoppers on the site unless they follow a link themselves. | | zappie/no-global-indirection | Reach window, document and location by name. | | zappie/no-document-write | Render markup with React, not document.write. | | zappie/no-remote-import | Load code from the storefront bundle only. |

Security rules

zappie check runs the security rules as errors on every source file outside build, dist and node_modules, with only Zappie's security config. Your eslint.config.mjs, its ignores and eslint-disable comments can't turn them off. They are no-offsite-navigation, no-global-indirection, no-document-write, no-remote-import, no-eval, no-external-scripts, no-unsafe-html and safe-external-links.

Code may send the shopper to a path on the site, to a URL from safeRedirect in @zappie/sdk/redirect, or to Zappie's checkout and accounts. Open a checkout session with redirectToCheckout from @zappie/sdk/redirect. Link to any other site with an <a href> the shopper clicks.

recommended also turns on the recommended jsx-a11y rules as the accessibility baseline. zappie check fails a project that turns any of them down.

Typed rules use TypeScript's project service when it's available, and fall back to syntax checks when it isn't.

The rules give early feedback. They aren't a security boundary. Server-side validation, response headers and runtime network policy must still enforce the same constraints.

The zappie-internal config disables no-external-scripts only for packages/foundations/src/branch-map/loader.ts. That reviewed Google Maps loader must create the provider script from a runtime browser key; general storefront code does not get the exemption. Phase 3 CSP must allow its provider host explicitly.

Docs

Status

The plugin is at 0.x. Rules can be added or tightened in a minor release while it settles. Each change is listed in CHANGELOG.md.

License

MIT