Oxlint has acquired a new set of opinionated rules designed to reject low-evidence, low-signal code patterns increasingly produced by AI coding assistants. The project, deslop, ships as the npm package ai-deslop and provides a curated collection of lint rules vendored from dmmulroy/anti-slop alongside additional rules developed specifically for this context. All rules operate under the deslop/* namespace and the entire source is MIT licensed.

Getting started requires only an npm install. The command npm install --save-dev ai-deslop pulls in the package, which brings @oxlint/plugins as a runtime dependency that must stay in sync with the user's oxlint version. The package ships compiled JavaScript and works with any oxlint JavaScript-plugin runtime—Bun, Deno, or Node.js.

Configuration is straightforward for oxlint users. The following example enables the recommended rule set:

import { defineConfig } from "oxlint";
import { configs as deslopConfigs } from "ai-deslop";

export default defineConfig({
  jsPlugins: ["ai-deslop"],
  options: deslopConfigs.recommended.options,
  rules: deslopConfigs.recommended.rules
});

Recommended rules

The recommended config enables a broad set of rules that target specific low-signal patterns. no-chained-type-assertions rejects nested as or angle-bracket assertions that fabricate evidence. no-conditional-empty-object-spread reports object spreads that use a conditional {} branch to omit fields. no-known-value-widening rejects known expressions flowing into explicit unknown, object, or open dictionaries.

no-object-parameters rejects object types on function inputs, while no-runtime-typeof requires boundary parsing instead of ad hoc typeof narrowing. no-unknown-parameters and no-unknown-returns reject unknown on function inputs and return contracts resolving to unknown, respectively. no-unknown-type-aliases rejects type aliases whose resolved type is unknown, and no-unsafe-dictionary-type rejects dictionary values based on unsafe escape hatches.

no-widen-then-assert rejects widening known evidence before narrowing assertions. require-safety-comment-for-type-assertion requires an invariant justification for non-const assertions. no-pass-through-type-alias disallows aliases that only rename another type.

Pipeline patterns get attention from no-array-filter-map, which rejects adjacent eager array filter/map passes in favor of lazy iterator pipelines. no-reduce-accumulator-copy rejects non-spread accumulator copies inside reducers; the author notes this should be enabled alongside native oxc/no-accumulating-spread. no-reflect-apply and no-reflect-get reject uses of Reflect.apply and Reflect.get. no-shape-in-symbol-names rejects shape characters in locally owned symbol names.

Test-quality rules include no-call-only-assertions, which flags tests whose assertions only check mock calls; no-module-mocking, which rejects Vitest and Jest module mocks; no-poor-substring-tests, which rejects testing that a constant string contains substrings; and no-repeated-expect-call, which flags adjacent assertions that repeat the same call in test files, suggesting the result be reused instead. None of these rules include an automatic fixer.

Opt-in rules

A separate category of opt-in rules is also available. no-duplicate-consts reports all-caps constants with the same static value appearing in different files. no-duplicate-types reports exact duplicate object contracts, and notably does not include a fixer. no-renamed-imports fixes unnecessary named-import aliases when the original name has no module-level conflict. canonical-class-names fixes non-canonical Tailwind CSS v4 class spellings.

Standard lint rules

In addition to the deslop-specific rules, the recommended config activates several standard TypeScript lint rules. typescript/no-deprecated disallows using code marked with @deprecated and requires type-aware linting. typescript/no-require-imports disallows CommonJS require() imports. typescript/no-floating-promises disallows floating promises, also requiring type-aware linting. typescript/no-unnecessary-condition disallows always truthy/falsy/nullish conditions under the same requirement. Finally, no-unreachable disallows unreachable code.

Origins and licensing

Many of the rules in deslop are generic rules verbatim from dmmulroy/anti-slop, a project by Dillon Mulroy, and are distributed under the MIT license. The deslop project vendors those rules and adds its own, renaming them under the deslop/* namespace. The vendored source, including the shared utility files under src/shared/*, carries the MIT license attribution to © Dillon Mulroy.