# r/reactjs
**Title: CI tool that enforces architectural decisions and drives legacy patterns to zero over time**
built a linter for the stuff ESLint can't express. the thing that drove it: refactoring large codebases where you're migrating off old patterns but can't touch everything at once. new code keeps following the old patterns and you're back where you started.
the killer feature is ratcheting. 200 calls to legacyFetch()? set the ceiling at 200. migrate some next sprint, lower it. CI blocks any PR that adds new ones. ESLint is pass/fail -- it can't do this.
other things it does:
- ban patterns in specific paths -- no `db.select()` in page files, no raw `fetch()` outside your api client
- ban imports (`moment`, `enzyme`, whatever you've moved off)
- ban dependencies in package.json before anything even imports them
- AST rules -- flags components over 150 lines, nested component definitions, too many useState calls, cascading setState in useEffect
```toml
[[rule]]
id = "no-db-in-pages"
type = "banned-pattern"
pattern = "db."
glob = "app/**/page.tsx"
message = "Use the repository layer"
```
ships presets: `ai-codegen`, `react`, `nextjs`, `security`.
```
npx code-baseline scan
```
Rust, single binary, fast. open source MIT: https://github.com/stewartjarod/baseline