Stack detection
Rule packs are bundles of lint rules for specific stacks (React, Drizzle, Elysia, BullMQ, Three.js, etc.). Before the gate runs, tsforge has to know which packs apply to your repo.
Stack detection is that step. tsforge reads package.json (and sometimes config files like drizzle.config.ts), matches what it finds against a built-in list, and turns on the matching packs. You do not maintain a pack list by hand for every session.
Example: if elysia and drizzle-orm are in your dependencies, tsforge enables the Elysia and Drizzle packs automatically. A three (or @react-three/fiber) dependency turns on the Three.js pack the same way.
Step by step
Section titled “Step by step”- Read
dependenciesanddevDependenciesfrompackage.json - Match package names (and optional file patterns) to known stacks
- Add always-on baseline packs for TypeScript projects
- Apply any overrides from tsforge.config.json
- Run the enabled rules when the gate executes
Detection runs when tsforge builds the gate and when it adds stack hints to the model prompt.
Tuning detection
Section titled “Tuning detection”Optional file at your repo root: tsforge.config.json.
| Field | What it does |
|---|---|
stack | Force a stack label and its packs even if detection is unsure |
packs.include | Turn on extra pack IDs after detection |
packs.exclude | Turn off specific pack IDs |
rules | Set individual rules to error, warn, or off |
plugins | Load your own ESLint rule-packs on top of the detected ones. See Config & external plugins. |
Full pack list
Section titled “Full pack list”See Rule packs for every pack ID and Rule catalog for individual rule text and fix hints.