Skip to content
ƒtsforgev0.52.0
19

Stack detection

2 min read

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.

  1. Read dependencies and devDependencies from package.json
  2. Match package names (and optional file patterns) to known stacks
  3. Add always-on baseline packs for TypeScript projects
  4. Apply any overrides from tsforge.config.json
  5. 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.

Optional file at your repo root: tsforge.config.json.

FieldWhat it does
stackForce a stack label and its packs even if detection is unsure
packs.includeTurn on extra pack IDs after detection
packs.excludeTurn off specific pack IDs
rulesSet individual rules to error, warn, or off
pluginsLoad your own ESLint rule-packs on top of the detected ones. See Config & external plugins.

See Rule packs for every pack ID and Rule catalog for individual rule text and fix hints.

Big picture · How tsforge builds the gate