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-mod-boundaries

v0.5.1

Published

An ESLint plugin to enforce module boundaries using module files.

Readme

eslint-plugin-mod-boundaries

ESLint plugin that enforces strict module encapsulation through barrel files (mod.ts/mod.js).

It automatically rewrites messy parent imports (../../) into clean alias paths (@/) while preserving standard local imports (./).

Import rules

This rule enforces a strict boundary logic based on your location in the folder tree:

  • Neighboring modules ➔ Use @/: You are not allowed to use parent traversal (../..) to reach into another module. Crossing over to a different parent or sibling module must go through the configured root alias.
  • Current module or subdirectories ➔ Use ./: When referencing boundaries within the current tree of the module or starting from the root ancestor, clean relative paths are enforced.

Installation

# deno
deno add npm:eslint-plugin-mod-boundaries
# npm
npm install --save-dev eslint-plugin-mod-boundaries

Configuration

The plugin automatically detects your alias settings from deno.json (looking for the "@/" import map). Alternatively, you can override this in your ESLint settings.

Flat config (eslint.config.js)

Using the built-in recommended preset is the easiest way to get started:

import modBoundaries from "eslint-plugin-mod-boundaries";

export default [
  ...modBoundaries.configs.recommended,
  {
    // Optional: Explicitly override settings if not using deno.json
    settings: {
      modBoundaries: {
        alias: "@/",
        aliasPath: "./src",
      },
    },
  },
];

Rule details

mod-boundaries/enforce-mod-boundaries

This rule analyzes the structural distance between the importing file and the target file and ensures it uses the correct barrel file (mod.ts/mod.js).

Incorrect

// Inside: src/utils/mod.ts

// Error: cannot use parent traversal to cross into a neighboring module.
import type { DenoConfig } from "../models/deno-config.ts";

// Error: deep-importing bypasses the boundary of the neighboring module (must use barrel file).
import type { DenoConfig } from "@/models/deno-config.ts";

Correct

// Inside: src/utils/mod.ts

// Correct: crosses to the neighboring module via its root barrel file.
import type { DenoConfig } from "@/models/mod.ts";

// Correct: internal module navigation uses clean relative paths.
import { resolveAlias } from "./resolve-alias.ts";

This rule is auto-fixable with eslint --fix.

Project layout

├── doc.go                     # Documentation for main
├── main.go                    # Application entry point
└── internal/                  # Internal application code
    ├── cli/                   # Binds Cobra commands and maps Viper flag schemas.
    ├── config/                # Loads configuration.
    ├── httpx/                 # HTTP response helpers and constants.
    ├── middleware/            # HTTP middleware (auth, cors, static).
    ├── pathsafe/              # Safe file path resolution and validation.
    ├── router/                # HTTP routing definitions and mapping.
    ├── server/                # HTTP server setup and middleware chaining.
    ├── storage/               # File storage management.
    ├── token/                 # HMAC bearer token pool management.
    └── units/                 # Defines file size units.

Contributing

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/name).
  3. Ensure all code passes deno task lint:fix.
  4. Open a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.