Skip to content

Anti-Slop

Rules to prevent common LLM slop. Ported from dmmulroy/anti-slop. Browse all 15 rules in this category.

Showing 15 rules

No Chained Type Assertions

Anti-Slop
no-chained-type-assertions

Disallow chained TypeScript as and angle-bracket assertions, including parenthesized chains.

  • Problem

No Conditional Empty Object Spread

Anti-Slop
no-conditional-empty-object-spread

Disallow object spreads that conditionally spread an empty object to omit fields.

  • Suggestion

No Known Value Widening

Anti-Slop
no-known-value-widening

Disallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.

  • Problem

No Module Mocking

Anti-Slop
no-module-mocking

Disallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.

  • Problem

No Object Parameters

Anti-Slop
no-object-parameters

Disallow object function parameters; inputs must use an owner-provided type and be parsed at their boundary.

  • Problem

No Reflect Apply

Anti-Slop
no-reflect-apply

Disallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.

  • Problem

No Reflect Get

Anti-Slop
no-reflect-get

Disallow Reflect.get; use typed property access or parse dynamic input into a domain type.

  • Problem

No Runtime Typeof

Anti-Slop
no-runtime-typeof

Disallow runtime typeof checks; external values must be decoded into meaningful types at their I/O boundary.

  • Problem

No Shape In Symbol Names

Anti-Slop
no-shape-in-symbol-names

Disallow the case-insensitive substring "shape" in JavaScript, TypeScript, private, and JSX symbol names.

  • Problem

No Unknown Parameters

Anti-Slop
no-unknown-parameters

Disallow explicitly unknown function parameters except `cause` and the parameter named by a type predicate; decode unknown input at its I/O boundary instead.

  • Problem

No Unknown Returns

Anti-Slop
no-unknown-returns

Disallow functions whose explicit return contract is unknown or Promise<unknown>.

  • Problem

No Unknown Type Aliases

Anti-Slop
no-unknown-type-aliases

Disallow type aliases whose resolved type is unknown; unknown must remain visible at an allowed boundary.

  • Problem

No Unsafe Dictionary Type

Anti-Slop
no-unsafe-dictionary-type

Disallow object-dictionary contracts whose direct value type is unknown, any, object, {}, or a union/alias containing one of those escape hatches.

  • Problem

No Widen Then Assert

Anti-Slop
no-widen-then-assert

Disallow local const flows that explicitly widen a known value before asserting the widened binding to a narrower type.

  • Problem

Require Safety Comment For Type Assertion

Anti-Slop
require-safety-comment-for-type-assertion

Require a nearby SAFETY comment (or a described Oxlint suppression of typescript/no-unsafe-type-assertion) for every TypeScript type assertion except const assertions.

  • Problem