Overview
ai-deslop is an opinionated collection of Oxlint rules for identifying low-evidence and low-signal code patterns. It combines vendored anti-slop checks with additional rules in the deslop namespace and provides a recommended configuration.
The package ships as compiled JavaScript and is designed to work with Oxlint JavaScript-plugin runtimes on Bun, Deno, or Node.js.
Type Safety and Evidence
The recommended configuration emphasizes explicit type evidence and safer boundaries. Its checks reject patterns such as chained type assertions, known values widened into unknown or open dictionaries, object or unknown function parameters, unknown return contracts, and aliases that resolve to unknown.
It also requires invariant explanations for non-const assertions, discourages ad hoc runtime typeof narrowing, and catches cases where a known value is widened before being narrowed through an assertion.
Code Quality and Testing
ai-deslop includes rules aimed at inefficient or indirect implementation patterns. These cover adjacent eager filter and map passes, reducer accumulator copies, Reflect.apply and Reflect.get usage, and locally owned symbol names that include shape.
Test-focused checks flag assertions that only verify mock calls, Vitest or Jest module mocking, weak constant-substring tests, and adjacent expectations that repeat the same call.
Configuration Options
Most documented rules are enabled by the recommended configuration. Additional opt-in rules can detect duplicate constants or object contracts, remove unnecessary named-import aliases, constrain re-exports to configured entrypoints, and normalize Tailwind CSS v4 class names.
The recommended setup also enables standard Oxlint rules for deprecated TypeScript APIs, CommonJS require imports, and floating promises, with type-aware linting required for relevant checks.