Add stricter linting rules to a TypeScript project to catch weak type patterns.
Enforce safety comments on type assertions so forced conversions are always justified.
Prevent mocking modules in Vitest or Jest tests by flagging the pattern during linting.
Copy a set of opinionated rules into your repo and customize them for your team's coding standards.
| dmmulroy/anti-slop | levy-street/world-of-claudecraft | xw7872081123/wallpaper-engine-steam | |
|---|---|---|---|
| Stars | 613 | 614 | 608 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | — | easy |
| Complexity | 2/5 | — | 1/5 |
| Audience | developer | general | general |
Figures from each repo's GitHub metadata at analysis time.
Requires an existing Oxlint setup in your project and a manual step to vendor rule files into your repo rather than installing as a package dependency.
anti-slop is a set of linting rules for TypeScript and JavaScript that catches coding patterns the author considers sloppy or weakly justified. Linting tools scan your code automatically and flag problems, similar to how a spell-checker highlights typos. In this case, the problems being flagged are programming habits that can hide bugs, weaken type safety, or make code harder to maintain. The rules run on top of Oxlint, a specific linter for JavaScript and TypeScript projects. The project includes fifteen individual rules, each targeting a specific pattern. For example, one rule rejects functions that accept the bare object type as a parameter, pushing you to describe your data more precisely. Another rule blocks the use of typeof checks at runtime, asking you to validate data at the edges of your program instead. A third requires you to write a safety comment explaining why a type assertion is safe, so that forced type conversions always come with a written justification from the developer. Several rules target testing practices. One forbids mocking modules in test frameworks like Vitest or Jest, arguing that you should restructure your code to use real dependency seams instead. Others reject vague types like unknown for function returns or dictionary values, and flag naming conventions like putting the word "shape" in a type name. Each rule comes with a short code example showing what gets rejected and, where relevant, a brief note on what to do instead. The author recommends you vendor the rules rather than install them as a standard package dependency. That means you copy the rule files directly into your own repository, read through them, and modify them to fit your team's preferences. A bundled agent skill can handle the initial copy and setup for you, installing the needed Oxlint dependencies and merging the rules into your existing configuration. After that, the copied files are yours to maintain and change as you see fit. The project is written in TypeScript, uses pnpm for development, and is released under the MIT license.
A set of fifteen linting rules for TypeScript and JavaScript that flag sloppy coding patterns like weak types and unsafe assertions. You copy the rules into your project and tweak them to fit your team's standards.
Mainly TypeScript. The stack also includes TypeScript, Oxlint, pnpm.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.