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-repo-lint

v0.1.0

Published

Drop-in ESLint plugin that loads TypeScript rule files from a conventional .lints/ directory without a build step.

Readme

eslint-plugin-repo-lint

Add project-specific ESLint rules to a .lints/ folder. No build step, no plugin scaffolding. Great for cases ast-grep can't express.

Install

pnpm install --save-dev eslint-plugin-repo-lint

If you're writing rules in TypeScript, also install @typescript-eslint/utils:

pnpm install --save-dev @typescript-eslint/utils

Use

Flat config (ESLint 9+):

// eslint.config.js
const repoLint = require("eslint-plugin-repo-lint");

module.exports = [repoLint.configs["flat/all"]];

Or eslint.config.mjs:

import repoLint from "eslint-plugin-repo-lint";

export default [repoLint.configs["flat/all"]];

Opt in per rule instead of flat/all:

module.exports = [
  {
    plugins: { "repo-lint": require("eslint-plugin-repo-lint") },
    rules: {
      // requirement: you have a `.lints/sentry-tags-snake-case.{js,ts}` file
      "repo-lint/sentry-tags-snake-case": "error",
    },
  },
];

Legacy eslintrc (ESLint 8):

# .eslintrc.yml
extends: ["plugin:repo-lint/all"]

Write a rule

Drop a TypeScript file in .lints/. The filename becomes the rule name.

// .lints/sentry-tags-snake-case.ts
import type { TSESLint, TSESTree } from "@typescript-eslint/utils";

const rule: TSESLint.RuleModule<"snakeCase", []> = {
  meta: {
    type: "problem",
    fixable: "code",
    schema: [],
    messages: {
      snakeCase: "Tag '{{key}}' should be snake_case (suggested: '{{fixed}}').",
    },
  },
  defaultOptions: [],
  create(context) {
    return {
      CallExpression(node: TSESTree.CallExpression) {
        // ...rule logic...
      },
    };
  },
};

export default rule;

.lints/sentry-tags-snake-case.tsrepo-lint/sentry-tags-snake-case.

Plain JS files (.js) work too — they skip the transpile step.

Test a rule

Co-locate the test as <rule>.test.ts next to the rule. The loader ignores .test. and .spec. files, so it won't try to register the test as a rule.

// vitest.config.ts
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: { globals: true },
});
// .lints/sentry-tags-snake-case.test.ts
import { RuleTester } from "@typescript-eslint/rule-tester";

import rule from "./sentry-tags-snake-case";

new RuleTester().run("sentry-tags-snake-case", rule, {
  valid: ["Sentry.setTag('user_id', '42');"],
  invalid: [
    {
      code: "Sentry.setTag('userId', '42');",
      errors: [{ messageId: "snakeCase" }],
    },
  ],
});

Run:

pnpx vitest run .lints

Notes

  1. ESLint editor extensions typically cache loaded plugin modules. After adding or editing a rule, you might need to restart the ESLint server for your updated rule to get picked up by your editor.
  2. Rules written in TypeScript are not type-checked. Run tsc --noEmit against your .lints/ folder separately if you want to check types.
  3. The rule loader anchors on the first eslint.config.* (flat config) or .eslintrc.* with root: true it finds walking up from ESLint's working directory. The walk-up logic stops when it encounters a .git directory to try prevent breaking out of a repo boundary.