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-is-kit

v0.1.0

Published

Type-aware ESLint rules for precise TypeScript predicates.

Readme

eslint-plugin-is-kit

Type-aware ESLint rules for precise TypeScript predicates.

eslint-plugin-is-kit finds array predicates that are ambiguous, redundant, or weaker than a reusable type guard. It suggests predicates from is-kit only when they preserve runtime behavior and improve intent or type narrowing.

// Ambiguous: this also removes "", 0, false, and NaN when present.
values.filter(Boolean);

// Explicit: remove only null and undefined.
values.filter(isNotNil);

The plugin is separate from the zero-dependency is-kit runtime package and does not depend on it. Install is-kit when adopting predicates suggested by the stylistic rules.

Installation

Install the plugin alongside ESLint and typed-linting support:

pnpm add -D eslint-plugin-is-kit eslint typescript@^6.0.3 typescript-eslint@^8.69.0

Equivalent npm, yarn, and bun commands work as well.

If you enable the stylistic rules or use the suggested replacements, install is-kit as a runtime dependency:

pnpm add is-kit

Configuration

All rules require TypeScript type information. Enable typed linting and start with the correctness-focused recommended preset:

// eslint.config.js
import isKit from "eslint-plugin-is-kit";
import tseslint from "typescript-eslint";

export default [
  {
    files: ["**/*.ts"],
    ...isKit.configs.recommended,
    languageOptions: {
      parser: tseslint.parser,
      parserOptions: {
        projectService: true,
      },
    },
  },
];

Use strict to enable every rule:

export default [
  {
    files: ["**/*.ts"],
    ...isKit.configs.strict,
    languageOptions: {
      parser: tseslint.parser,
      parserOptions: {
        projectService: true,
      },
    },
  },
];

Presets

| Preset | Purpose | | --------------------------- | ----------------------------------------------- | | isKit.configs.recommended | Correctness rules suitable as a starting point. | | isKit.configs.stylistic | Opt-in preferences for reusable is-kit guards. | | isKit.configs.strict | Every correctness and stylistic rule. |

Individual rules

Rules can also be configured individually:

{
  plugins: { "is-kit": isKit },
  rules: {
    "is-kit/prefer-is-non-nullish": "warn",
  },
}

CommonJS

The package includes a CommonJS build. Its default export is available through the generated module namespace:

// eslint.config.cjs
const { default: isKit } = require("eslint-plugin-is-kit");

Rules

| Rule | What it reports | Recommended | | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------- | | no-ambiguous-filter-boolean | filter(Boolean) when nullish and other falsy values can both be removed. | Yes | | no-redundant-predicate | An is-kit filter predicate that already accepts every array element. | Yes | | prefer-is-non-nullish | Inline nullish-removal filters that can use isNotNil. | No | | prefer-type-guard | Equivalent inline checks in filter, find, findLast, and every. | No |

The rules are deliberately conservative. They inspect built-in array methods, use TypeScript's type information, and skip cases where a replacement could change runtime behavior or weaken useful narrowing. They do not replace native checks in ordinary control flow.

No rule currently provides an autofix. Adding or changing imports is an intentional user decision, and filter(Boolean) can sometimes mean “keep only truthy values.”

Compatibility

| Dependency | Supported versions | | --------------------------- | --------------------------------- | | Node.js | ^22.13.0 or >=24.0.0 | | ESLint | ^8.57.0, ^9.0.0, or ^10.0.0 | | TypeScript | >=5.7.0 <6.1.0 | | @typescript-eslint/parser | ^8.69.0 |

The package ships ESM and CommonJS builds with declarations for both entry points.

Development

pnpm install
pnpm check
pnpm smoke

pnpm smoke packs the package, installs the tarball in an isolated consumer project, and verifies its imports, declarations, and ESLint behavior.

License

MIT