Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank

Previous survey · No. 903 ·

Pricing
Open Source
Type
TOOL
Use case
Software Testing & Quality
Date

About

anti-slop is a set of 16 opinionated Oxlint rules for TypeScript and JavaScript that reject weak typing and low-evidence code patterns, such as unsafe type assertions and overly broad types on function contracts. Rather than being consumed as a pinned npm dependency, the rules are designed to be copied into a repository so a team can tune each one to its own standards.

What it does

A lint plugin for the Oxlint linter that flags code where a value's known type gets thrown away, then cast back without proof. It ships eighteen general checks plus five optional ones for codebases built on the Effect library. Examples: a cast must carry a written justification comment, test files may not swap out whole modules with mocks, and a value with a precise type cannot be stored into a slot typed as anything. You install it by copying the source into your own project, usually through a bundled coding-agent skill, and then you own and edit it.

Why it's ranked here

The case rests on discipline, not reach. Every rule has its own test file run in CI alongside lint and a typecheck, the README documents what each rule allows as well as what it rejects, and it states its own analysis limits plainly. It is MIT licensed. It also speaks directly to agent-written code: the install skill tells the agent not to weaken rules or add unchecked casts to make lint pass. That is a sharp, specific answer to a real problem in AI-assisted TypeScript.

What's good

The rules are precise about their exceptions. The cast rule ignores constant assertions and accepts a configurable comment marker, defaulting to SAFETY. The widening rule permits an empty dictionary used as an accumulator and records keyed by a finite set of names. The mocking rule recognises both Vitest and Jest, including when they are imported under the standard names. The array rule deliberately has no autofix because callback order, indexes and sparse arrays must be checked by a person. The install script refuses to overwrite an existing copy unless forced.

Tradeoffs

The author says plainly that this is a personal ruleset reflecting taste, not a universal standard, and there is no official npm package, so updates are a merge job you own. The rules read syntax and same-file scope only, with no TypeScript type checker: imported types and cross-file signatures are not inferred, so some violations slip through. Several rules are strong policy, such as banning plain typeof checks and the word shape in local names. The dependency on the Oxlint plugin package must be pinned to the exact Oxlint version.

How to use it well

Best fit is a TypeScript team already on Oxlint, or willing to adopt it, that wants agents and people held to evidence-backed typing. Install through the agent skill, then read each rule and turn off the ones that clash with your house style before enforcing them in CI. Turn on the Effect group only when Effect is a direct dependency. Record which upstream revision you copied so later updates can merge cleanly. It does not replace a type-aware linter for cross-file analysis.

Technical notes+

src/index.ts wraps 18 rules in eslintCompatPlugin from @oxlint/plugins under the name anti-slop; src/effect/index.ts registers five more under anti-slop-effect. package.json is private, MIT, pins @oxlint/plugins and oxlint at 1.78.0, and its test script runs one RuleTester file per rule via tsx; .github/workflows/ci.yml runs pnpm check (lint, test, tsc --noEmit, skill-asset sync check) on Node 24. src/rules/no-known-value-widening.ts unwraps parentheses, as, satisfies and non-null expressions, follows stable const bindings through resolveVariable, and also checks arguments passed to local type predicates with an unknown parameter. src/rules/require-safety-comment-for-type-assertion.ts builds a Unicode regex from configured markers requiring a colon and non-empty text. skills/install-anti-slop/scripts/install.mjs copies to tools/oxlint/anti-slop by default and exits 1 if the target exists without --force.

Observed

License
MIT (LICENSE)
Language
TypeScript, ESM module
Interface
Oxlint JS plugin registered through jsPlugins in the Oxlint or Vite+ config
Packaging
Vendored source copy; package.json is private and README states there is no official npm package
Install surface
Agent skill via npx skills add dmmulroy/anti-slop --skill install-anti-slop, or manual copy of src/
Rule count
18 generic rules in src/index.ts, 5 opt-in Effect rules in src/effect/index.ts
Analysis scope
ESTree and lexical scope only, no TypeScript type checker (README)
Tests
One RuleTester file per rule listed in the package.json test script
CI
GitHub Actions runs pnpm check on push to main and pull requests (.github/workflows/ci.yml)

Read from README.md, package.json, LICENSE, AGENTS.md, src/index.ts, src/effect/index.ts, src/rules/no-known-value-widening.ts, src/rules/no-known-value-widening.test.ts, src/rules/require-safety-comment-for-type-assertion.ts, src/rules/no-module-mocking.ts, skills/install-anti-slop/SKILL.md, skills/install-anti-slop/scripts/install.mjs, .github/workflows/ci.yml.

Tags

lintingoxlinttypescriptjavascriptcode-qualitystatic-analysis

Tech Stack

Node.jsTypeScript

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.