← all repositories
dmmulroy/anti-slop

Oxlint rules that demand receipts for every type assertion

A vendored Oxlint plugin that rejects low-evidence TypeScript patterns like chained assertions, `unknown` contracts, and ad hoc `typeof` checks.

3.1k stars TypeScript Coding Assistants
anti-slop
Collecting fresh signals — velocity needs a few days of history.
star history

What it does

anti-slop is a set of custom Oxlint rules for TypeScript and JavaScript that flag patterns the author considers weakly typed or evidentially sloppy. It targets things like chained type assertions, unknown function parameters and return types, runtime typeof narrowing, and even Vitest or Jest module mocks. The whole package is designed to be copied—vendored—directly into your repository rather than installed as a traditional dependency.

The interesting bit

The project treats linting as a team standard you should own outright. A bundled agent skill automates the initial copy-and-configure ritual, but the README insists you then read the rules, change them, and maintain the vendored code yourself. It is less a library and more a manifesto against both loose typing and invisible upstream updates.

Key highlights

  • Fifteen opinionated rules, including bans on Reflect.apply, object parameters, shape in symbol names, and widening a value only to assert it back later.
  • Requires a // SAFETY: comment justifying every non-const type assertion, forcing explicit documentation of invariants.
  • Offers an escape hatch for no-runtime-typeof via allowInTypeGuards, acknowledging that schema-free projects sometimes need pragmatic boundaries.
  • Ships with a skills.sh agent skill to handle the initial vendoring, Oxlint dependency installation, and config merging.

Verdict

Best for teams using Oxlint who want an aggressive, opinionated baseline against TypeScript’s more permissive patterns. If your codebase relies heavily on unknown, module mocking, or ad hoc type assertions, expect a fight.

Frequently asked

What is dmmulroy/anti-slop?
A vendored Oxlint plugin that rejects low-evidence TypeScript patterns like chained assertions, `unknown` contracts, and ad hoc `typeof` checks.
Is anti-slop open source?
Yes — dmmulroy/anti-slop is open source, released under the MIT license.
What language is anti-slop written in?
dmmulroy/anti-slop is primarily written in TypeScript.
How popular is anti-slop?
dmmulroy/anti-slop has 3.1k stars on GitHub.
Where can I find anti-slop?
dmmulroy/anti-slop is on GitHub at https://github.com/dmmulroy/anti-slop.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.