For AI agents: the complete documentation index is available at https://mfeflow.github.io/mfeflow/llms.txt, the full documentation bundle is available at https://mfeflow.github.io/mfeflow/llms-full.txt, and this page is available as Markdown at https://mfeflow.github.io/mfeflow/features/tsconfig.md.

tsconfig

Every app in a micro-frontend platform should be held to the same TypeScript rules, and changing a rule should be a one-line edit rather than a change in a dozen files. This feature makes every app extend one shared set of presets.

What you get

Each app gets a small tsconfig.json that extends a preset from @mfeflow/tsconfig, and a typecheck script. The presets turn on the strict checks that catch real bugs, such as unchecked array access and optional properties that are really undefined.

It is already there

You do not add this one. It is part of every project, so mfeflow init applies it and it is not offered as a choice. Features such as lint-oxlint and http list it as a requirement.

What it wrote:

tsconfig.json               # project root, for scripts and end-to-end tests
apps/
├── shell/tsconfig.json     # extends a preset
└── <remote>/tsconfig.json  # extends a preset

Dev dependencies and scripts:

@mfeflow/tsconfig   # the presets
typescript 7.0.2    # the compiler
typecheck           # a script in each app and one at the root

Use it

An app's file extends the preset and lists what to check.

apps/cart/tsconfig.json
{
  "extends": "@mfeflow/tsconfig/react-app.json",
  "compilerOptions": { "types": ["node"] },
  "include": ["src", "rsbuild.config.ts", "env.ts", "vitest.config.ts"]
}

The root file uses the Node preset.

tsconfig.json
{
  "extends": "@mfeflow/tsconfig/node.json",
  "include": ["*.ts", "scripts", "e2e"]
}

Run the checks from the root. Each app runs tsc --noEmit, and the root script fans out through Turborepo.

pnpm typecheck

Configure it

There are no install options. You choose a preset, and you override single compiler options in the app's own file.

PresetExtendsAdds
base.jsonnoneThe strict settings below
react-app.jsonbaseDOM libs, jsx: react-jsx, noEmit
react-library.jsonbaseDOM libs, jsx: react-jsx, declaration files with isolatedDeclarations
node.jsonbaseNode types, noEmit

Generated apps use react-app.json and the root uses node.json. The library preset is there for packages you publish.

How it works

The base preset targets ES2022 with bundler module resolution, and turns on these checks beyond strict:

@mfeflow/tsconfig/base.json
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"verbatimModuleSyntax": true,
"isolatedModules": true

Rsbuild does the building, so TypeScript only checks, which is why the app presets are noEmit. The package needs TypeScript 7 or newer as a peer dependency.

Gotchas

OptionWhat you hitFix
noUncheckedIndexedAccessitems[0] may be undefinedCheck it, or destructure with a default
exactOptionalPropertyTypesPassing undefined to an optional property is rejectedLeave the key out instead
verbatimModuleSyntaxType-only imports must use import typeWrite import type

Add a new file or folder to include in the app's tsconfig.json, or the check will not see it.

Reference