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-import-boundary

v0.0.2

Published

ESLint rule that enforces import boundaries via index barrels and directory nesting

Readme

eslint-plugin-import-boundary

ESLint rule that turns directory nesting into import boundaries inside one package. By default only a parent may import a direct child’s public entry (index via publicEntryFiles)—skip-level, upward, and peer imports are denied. Use rootFiles to connect separate trees (almost always needed for sibling feature folders), and sharedFiles for shared logic under an owner.

Install

pnpm add -D eslint-plugin-import-boundary eslint

Usage

// eslint.config.js
import importBoundary, {
  extractDirectChildDirs,
} from "eslint-plugin-import-boundary";

export default [
  {
    files: ["src/**/*.{ts,tsx}"],
    // ignores: ["**/*.{test,spec}.{ts,tsx}", "**/__tests__/**", "**/*.stories.{ts,tsx}"],
    plugins: {
      "import-boundary": importBoundary,
    },
    rules: {
      "import-boundary/import-boundary": [
        "error",
        {
          sharedFiles: [
            "**/shared.ts",
            "**/shared.*.ts",
            "**/shared/**",
          ],
          // List every tree that should expose a public entry to other trees
          // (app/pages/features peers cannot import each other without this).
          rootFiles: [
            "src/app",
            "src/pages",
            ...extractDirectChildDirs("src/features"),
          ],
        },
      ],
    },
  },
];

Full boundary rules, diagrams, and allow/deny examples: docs.

Options

| Option | Type | Default | Meaning | |--------|------|---------|---------| | publicEntryFiles | string[] (optional) | ["**/index"] | File globs for each folder’s public entry (basename match is extension-agnostic). Directory globs are rejected. | | sharedFiles | string[] (optional) | [] | Glob patterns for shared resources. Matched targets may be imported by modules under the owning folder (parent of the shared entry). | | rootFiles | (string \| { path: string; allowedDependencies?: string[]; allowFreeInternal?: boolean })[] | [] | Directory paths for tree roots (e.g. src/features/auth). String entries may import each other’s public entry; object entries list outbound roots in allowedDependencies. Set allowFreeInternal: true to allow any import within that root while keeping cross-root public-entry-only. |

Helpers

| Export | Meaning | |--------|---------| | extractDirectChildDirs(parentPath, cwd?) | Immediate child directories of parentPath as cwd-relative posix paths—handy to spread into rootFiles. See docs. |

Release

Versioning and publishing use Changesets.

pnpm changeset            # record a change (patch / minor / major)
pnpm version-packages     # apply changesets → bump version + CHANGELOG
pnpm release              # build and publish to npm

On main, the Release workflow opens a version PR when changesets exist, and publishes after that PR is merged (requires repo secret NPM_TOKEN).

Development

pnpm install
pnpm build
pnpm test
pnpm lint
pnpm typecheck

| Script | Purpose | |--------|---------| | pnpm build | Compile src/ to dist/ | | pnpm test | Run tests | | pnpm test:coverage | Test with coverage | | pnpm dev | Test watch mode | | pnpm dev:docs | Serve docs locally | | pnpm lint | Lint | | pnpm typecheck | Typecheck |

To add a docs page, create {pageName}.md and list it in docs/_sidebar.md.