gitwtfhub

wtf is anti-slop?

dmmulroy/anti-slop — explained in plain English

Analysis updated 2026-08-14

613TypeScriptAudience · developerComplexity · 2/5LicenseSetup · moderate

TL;DR

A set of fifteen linting rules for TypeScript and JavaScript that flag sloppy coding patterns like weak types and unsafe assertions. You copy the rules into your project and tweak them to fit your team's standards.

Mindmap

mindmap
  root((repo))
    What it does
      Flags sloppy code patterns
      Runs on Oxlint
      Fifteen custom rules
    How to use
      Copy rules into your repo
      Modify to fit your team
      Bundled agent for setup
    Rule examples
      Reject bare object type
      Block typeof checks
      Require safety comments
    Tech stack
      TypeScript
      Oxlint
      pnpm
    Audience
      TypeScript developers
      Teams wanting stricter code

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add stricter linting rules to a TypeScript project to catch weak type patterns.

REASON 2

Enforce safety comments on type assertions so forced conversions are always justified.

REASON 3

Prevent mocking modules in Vitest or Jest tests by flagging the pattern during linting.

REASON 4

Copy a set of opinionated rules into your repo and customize them for your team's coding standards.

What's in the stack?

TypeScriptOxlintpnpm

How it stacks up

dmmulroy/anti-sloplevy-street/world-of-claudecraftxw7872081123/wallpaper-engine-steam
Stars613614608
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasy
Complexity2/51/5
Audiencedevelopergeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires an existing Oxlint setup in your project and a manual step to vendor rule files into your repo rather than installing as a package dependency.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

anti-slop is a set of linting rules for TypeScript and JavaScript that catches coding patterns the author considers sloppy or weakly justified. Linting tools scan your code automatically and flag problems, similar to how a spell-checker highlights typos. In this case, the problems being flagged are programming habits that can hide bugs, weaken type safety, or make code harder to maintain. The rules run on top of Oxlint, a specific linter for JavaScript and TypeScript projects. The project includes fifteen individual rules, each targeting a specific pattern. For example, one rule rejects functions that accept the bare object type as a parameter, pushing you to describe your data more precisely. Another rule blocks the use of typeof checks at runtime, asking you to validate data at the edges of your program instead. A third requires you to write a safety comment explaining why a type assertion is safe, so that forced type conversions always come with a written justification from the developer. Several rules target testing practices. One forbids mocking modules in test frameworks like Vitest or Jest, arguing that you should restructure your code to use real dependency seams instead. Others reject vague types like unknown for function returns or dictionary values, and flag naming conventions like putting the word "shape" in a type name. Each rule comes with a short code example showing what gets rejected and, where relevant, a brief note on what to do instead. The author recommends you vendor the rules rather than install them as a standard package dependency. That means you copy the rule files directly into your own repository, read through them, and modify them to fit your team's preferences. A bundled agent skill can handle the initial copy and setup for you, installing the needed Oxlint dependencies and merging the rules into your existing configuration. After that, the copied files are yours to maintain and change as you see fit. The project is written in TypeScript, uses pnpm for development, and is released under the MIT license.

Yoink these prompts

Prompt 1
I want to add the anti-slop linting rules to my TypeScript project that already uses Oxlint. Show me how to vendor the rule files into my repo and merge them into my existing Oxlint config.
Prompt 2
Help me install anti-slop using the bundled agent skill so it copies the rules and sets up the Oxlint dependencies for me automatically.
Prompt 3
I have a TypeScript function that takes `object` as a parameter type and anti-slop is rejecting it. Help me rewrite the function to use a more precise type that describes my data shape.
Prompt 4
Anti-slop flagged a type assertion in my code and wants a safety comment. Show me how to write a proper justification comment explaining why the assertion is safe.
Prompt 5
I want to customize one of the anti-slop rules to be less strict for my team. Show me how to find and modify the copied rule file in my repo to allow `unknown` return types.

Frequently asked questions

wtf is anti-slop?

A set of fifteen linting rules for TypeScript and JavaScript that flag sloppy coding patterns like weak types and unsafe assertions. You copy the rules into your project and tweak them to fit your team's standards.

What language is anti-slop written in?

Mainly TypeScript. The stack also includes TypeScript, Oxlint, pnpm.

What license does anti-slop use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is anti-slop to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is anti-slop for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.