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

@buildkitgg/oxlint-plugin-anti-slop

v0.1.0

Published

An Oxlint plugin that rejects low-evidence TypeScript patterns, with a recommended rule set. Vendored from anti-slop.

Readme

@buildkitgg/oxlint-plugin-anti-slop

anti-slop by Dillon Mulroy, published to npm. Upstream is meant to be copied into each project and has no npm package, so this package is that copy at a pinned commit, without its Effect rules.

anti-slop is an Oxlint plugin that rejects patterns that make TypeScript harder to trust, such as unchecked type assertions, unknown passed around instead of decoded, and conditional empty spreads. It works on its own, without Buildkit's other lint rules.

pnpm add -D @buildkitgg/oxlint-plugin-anti-slop

Oxlint 1.89 or later is required. Vite+ 1.4 includes it.

Recommended rule set

@buildkitgg/oxlint-plugin-anti-slop/recommended registers the plugin and turns on every rule below as an error. With Vite+, extend it from the lint block of vite.config.ts:

import antiSlop from "@buildkitgg/oxlint-plugin-anti-slop/recommended"
import { defineConfig } from "vite-plus"

export default defineConfig({
  lint: { extends: [antiSlop] }
})

With Oxlint on its own, extend it from oxlint.config.ts:

import antiSlop from "@buildkitgg/oxlint-plugin-anti-slop/recommended"
import { defineConfig } from "oxlint"

export default defineConfig({
  extends: [antiSlop]
})

The rule set needs a TypeScript config rather than .oxlintrc.json, because .oxlintrc.json can only extend files by path and the plugin is located at runtime.

To change a rule, set it after extends. Later settings win:

export default defineConfig({
  extends: [antiSlop],
  rules: {
    "anti-slop/require-readable-spacing": "off",
    "anti-slop/no-runtime-typeof": ["error", { allowInTypeGuards: true }]
  },
  overrides: [{ files: ["**/*.test.ts"], rules: { "anti-slop/no-module-mocking": "off" } }]
})

Choosing rules yourself

Register the plugin by package name under jsPlugins and turn on only the rules you want. This works from .oxlintrc.json too:

{
  "jsPlugins": [{ "name": "anti-slop", "specifier": "@buildkitgg/oxlint-plugin-anti-slop" }],
  "rules": {
    "anti-slop/no-array-filter-map": "error",
    "anti-slop/no-chained-type-assertions": "error"
  }
}

Rules

| Rule | What it reports | | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | anti-slop/no-array-filter-map | A filter followed by a map. Use one transformation or lazy iterator helpers | | anti-slop/no-reduce-accumulator-copy | Reducers that copy their growing accumulator with Object.assign, Array.from or array copy methods | | anti-slop/no-chained-type-assertions | Chained as or angle-bracket assertions, such as value as unknown as User | | anti-slop/no-conditional-empty-object-spread | ...(condition ? { field } : {}) and similar spreads used to leave fields out | | anti-slop/no-known-value-widening | Known values passed into broad or anonymous types that throw away what was known about them | | anti-slop/no-module-mocking | vi.mock and jest.mock. Replace dependencies through real interfaces instead | | anti-slop/no-object-parameters | Parameters typed with the broad object type. Accept a named type, and parse external input at its boundary | | anti-slop/no-reflect-apply | Reflect.apply. Call typed functions directly | | anti-slop/no-reflect-get | Reflect.get. Use typed property access, or parse dynamic input into a domain type | | anti-slop/no-runtime-typeof | Runtime typeof checks. Decode external values at their I/O boundary. allowInTypeGuards permits them inside type guards | | anti-slop/no-unsafe-dictionary-type | Dictionary types whose values are unknown, any, object or {} | | anti-slop/no-shape-in-symbol-names | Names containing "shape" | | anti-slop/no-unknown-parameters | Parameters typed unknown, other than cause and type guard subjects | | anti-slop/no-unknown-returns | Functions declared to return unknown or Promise<unknown> | | anti-slop/no-unknown-type-aliases | Type aliases that resolve to unknown | | anti-slop/no-widen-then-assert | A known value widened to a broader type and then asserted back to a narrower one | | anti-slop/require-readable-spacing | Missing blank lines between declarations and groups of statements. Fixable with oxlint --fix | | anti-slop/require-safety-comment-for-type-assertion | Type assertions without a nearby SAFETY: comment explaining why they hold. as const is exempt. markers changes the comment tag | | oxc/no-accumulating-spread | Spreading an accumulator inside reduce or a loop, which copies it on every pass |

oxc/no-accumulating-spread is a built-in Oxlint rule that the recommended rule set turns on alongside the plugin's.

Upstream is MIT licensed, and its license ships with this package. See vendored anti-slop for how the copy is updated.

Oxlint JS plugins are in alpha and outside semver, so a new Oxlint release may need a matching release of this package.