ts-base

Strict tsconfig presets that build on each other. Pick a config, trace each setting to its file, then switch a flag and see the code that tsc refuses.

The chain and the merged config

Config --config

Chain of files

    tsc applies the files from top to bottom, and a later file wins. Select a file to see only its settings.

    Merged config tsc --showConfig
    OptionValueSet by

    Flags against code

    Switch a flag to see which code it refuses. Each result is a real run of the TypeScript compiler on this sample, made at build time with the preset of your config. The page shows the errors of all compiler phases together.

      
                    
      These flags in your project

      Refusals

        What init writes

        This panel calls the real createPackageTemplate, merge and validate of the package in your browser. It writes no file.

          How it works

          1. 1

            One file has the rules

            shared.json has the strict flags. Each other preset gets them through extends.

          2. 2

            Small files add one concern

            esm.json and commonjs.json set the module system. lib.json sets the paths.

          3. 3

            Your project extends one preset

            init writes a tsconfig.json with one extends line. Paths with ${configDir} resolve from your project.

          4. 4

            This page reads the real files

            The build reads tsconfig/, starts the real CLI and starts tsc. The page shows that record and types none of it by hand.

          Install

          npm install --save-dev @mark1russell7/ts-base
          npx @mark1russell7/ts-base init my-lib
          # Change the config of an existing project.
          npx @mark1russell7/ts-base set-tsconfig frontend

          The package needs Node.js 25 or later.