What is Deslop?
Deslop is an Oxlint plugin for JavaScript and TypeScript projects that flags code patterns it treats as low-evidence or low-signal, including patterns associated with AI-generated code. It combines anti-slop rules with additional checks under its own rule namespace, and provides a recommended configuration alongside opt-in rules. Teams can add it as a development dependency and run it through an Oxlint JavaScript-plugin runtime, including Bun, Deno, or Node.js.
Deslop Features:
Recommended Rules: The recommended configuration enables checks for type-safety problems, code patterns, test assertions, deprecated APIs, floating promises, and unreachable code.
Type Evidence: Rules flag patterns such as nested type assertions, unsafe dictionary types, unknown function inputs or returns, and assertions without an invariant justification.
Code Patterns: Checks cover adjacent array filter and map passes, reducer accumulator copies, global Reflect.apply and Reflect.get, and locally owned symbol names containing shape.
Test Checks: Test-focused rules flag module mocking, assertions that only check mock calls, poor substring tests, and adjacent expectations that repeat the same call.
Opt-In Rules: Optional checks include limits on boolean condition terms, duplicate constants or types, pass-through schemas, re-export placement, and unnecessary named-import aliases.
Tailwind Naming: An opt-in rule fixes non-canonical Tailwind CSS v4 class spellings.
Runtime Support: The package ships compiled JavaScript and works with Oxlint JavaScript-plugin runtimes in Bun, Deno, or Node.js.
Deslop Benefits:
Stronger Type Contracts: Flagging weak or misleading type boundaries helps teams keep contracts grounded in known evidence rather than relying on broad escape hatches.
More Focused Reviews: Automated checks for specific low-signal patterns can leave reviewers more time to assess behavior, architecture, and user-facing changes.
Useful Test Feedback: Finding tests that repeat calls or verify only mock interactions can help teams focus their test suites on meaningful outcomes.
Consistent Conventions: A shared recommended configuration gives contributors a common baseline for code and test quality across a project.
Selective Enforcement: Keeping some checks opt-in lets teams add stricter conventions when they fit their codebase without enabling every rule at once.
Use Cases:
AI Code Review: Run Deslop on a project that accepts AI-generated contributions to flag weak type assertions, generic escape hatches, and other configured patterns.
TypeScript Standards: Add the recommended rules to a TypeScript repository that wants to catch unsafe contracts and unnecessary CommonJS imports during linting.
Test Suite Cleanup: Use the test rules when revising a Vitest or Jest suite that relies on module mocks, repeated expectations, or checks limited to mock calls.
Repository Conventions: Enable selected opt-in checks in a multi-file codebase to identify duplicate constants, duplicate object contracts, or re-exports outside entrypoints.
Tailwind Class Review: Add the canonical class-name rule to a project using Tailwind CSS v4 when the team wants non-canonical spellings fixed.

