Anti-Slop
Rules to prevent common LLM slop. Ported from dmmulroy/anti-slop. Browse all 16 rules in this category.
Showing 16 rules
No Chained Type Assertions
no-chained-type-assertionsDisallow chained TypeScript as and angle-bracket assertions, including parenthesized chains.
- Problem
No Conditional Empty Object Spread
no-conditional-empty-object-spreadDisallow object spreads that conditionally spread an empty object to omit fields.
- Suggestion
No Known Value Widening
no-known-value-wideningDisallow syntactically established values from flowing into explicitly broad or anonymous target types that discard useful evidence.
- Problem
No Module Mocking
no-module-mockingDisallow Vitest and Jest module mocking; tests must replace dependencies through real interfaces.
- Problem
No Object Parameters
no-object-parametersDisallow object function parameters; inputs must use an owner-provided type and be parsed at their boundary.
- Problem
No Reduce Accumulator Copy
no-reduce-accumulator-copyDisallow copying growing reducer accumulators with Object.assign, Array.from, or array copy methods.
- Problem
No Reflect Apply
no-reflect-applyDisallow Reflect.apply; call typed functions directly or model dynamic dispatch behind an interface.
- Problem
No Reflect Get
no-reflect-getDisallow Reflect.get; use typed property access or parse dynamic input into a domain type.
- Problem
No Runtime Typeof
no-runtime-typeofDisallow runtime typeof checks; external values must be decoded into meaningful types at their I/O boundary.
- Problem
No Shape In Symbol Names
no-shape-in-symbol-namesDisallow the case-insensitive substring "shape" in JavaScript, TypeScript, private, and JSX symbol names.
- Problem
No Unknown Parameters
no-unknown-parametersDisallow 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
no-unknown-returnsDisallow functions whose explicit return contract is unknown or Promise<unknown>.
- Problem
No Unknown Type Aliases
no-unknown-type-aliasesDisallow type aliases whose resolved type is unknown; unknown must remain visible at an allowed boundary.
- Problem
No Unsafe Dictionary Type
no-unsafe-dictionary-typeDisallow 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
no-widen-then-assertDisallow 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
require-safety-comment-for-type-assertionRequire a nearby safety-marker comment (or a described Oxlint suppression of typescript/no-unsafe-type-assertion) for every TypeScript type assertion except const assertions.
- Problem