@factory/config
Shared toolchain configuration for AI Software Factory. One source of truth for compiler strictness, Prettier, and ESLint so the 11 packages + 2 apps + 2 test suites never drift from each other.
Source-first:
main/typespoint atsrc/index.ts— no build step. A tsc →dist/build is part of the Phase 0 completion checklist.
Contents
| Artifact | Format | Used by |
|---|---|---|
src/tsconfig.base.json |
JSON | Reference for the strict TS settings every package compiles under (packages extend the ROOT tsconfig.json, which mirrors these options) |
src/prettier.base.json |
JSON | Mirrors ROOT .prettierrc.json exactly |
src/eslint.base.js |
CJS (eslintrc format) | Base parser/plugins/extends/rules for every package and app, matching ROOT .eslintrc.json conventions |
src/index.ts |
TS | Programmatic access: baseCompilerOptions, prettierBase, eslintBaseConfig, newPackageTsconfig |
Usage
// apps/web/eslintrc.json (legacy eslintrc, like the root)
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [/* same extends as the base */],
"rules": { /* app-specific overrides only */ }
}
// a tool that needs the shared settings
import { baseCompilerOptions, newPackageTsconfig } from "@factory/config";
console.log(baseCompilerOptions.target); // "ES2022"
Adding a new package: copy packages/shared/tsconfig.json (one extends
line) — the compiler options are already pinned by the root.
What is pinned (strictness)
strict,noUncheckedIndexedAccess,exactOptionalPropertyTypes,noImplicitOverride(see tsconfig.base.json — an exact mirror of the root)- ES2022 target, NodeNext module + resolution (relative ESM imports use
.jsspecifiers — e.g.import { LIMITS } from "./constants.js"). - Prettier: double quotes, semicolons,
trailingComma: "all", 100 cols. - ESLint:
eslint:recommended+@typescript-eslint/recommended+prettiercompat;no-evalfamily hard errors (AGENTS.md: formulas never run as JS);anyis a warning.
ROADMAP phases that build on this
- Phase 0 (Foundation): this package is the foundation — CI (lint → typecheck → unit → integration → build → security scan → E2E) consumes these settings.
- All phases 1–15: any new package/app inherits the same strictness; the per-package tsconfigs in this repo are the living examples.
Notes
- The root currently uses legacy
.eslintrc.json(per the existing scaffold);eslint.base.jsmatches that format. Migrating the repo to ESLint flat config is a Phase 0 cleanup, not part of this package's surface. @typescript-eslint/*is a devDependency of the ROOT (hoisted by pnpm); this package intentionally adds no runtime deps.