Skip to content

tsconfigs 0.1.1-sha.a49a8f53843772f36dff33e22108685a9a801a95

Install from the command line:
Learn more about npm packages
$ npm install @darkpatternsdigital/tsconfigs@0.1.1-sha.a49a8f53843772f36dff33e22108685a9a801a95
Install via package.json:
"@darkpatternsdigital/tsconfigs": "0.1.1-sha.a49a8f53843772f36dff33e22108685a9a801a95"

About this version

@darkpatternsdigital/tsconfigs

Provides a standard set of TypeScript configs commonly used with projects.

Usage

All configs are intended for use with "composite" structures, with one TypeScript project structure config for the full repository.

  1. Install @darkpatternsdigital/tsconfigs via your npm client.

  2. Set up your tsconfig with:

    • a reference to the corresponding config
    • compilerOptions.outDir
    • compilerOptions.rootDir
    • Any other settings you need, such as references.

    See an example below:

    {
    	"extends": "@darkpatternsdigital/tsconfigs/configs/tsconfig.base.json",
    	"compilerOptions": {
    		"outDir": "./dist",
    		"rootDir": "./src"
    	}
    }

Configs

Intended to be a common baseline for most tsconfigs.

  • Composite project structure
  • Targets ESNext with a bundler
  • skipLibCheck to improve performance
  • forceConsistentCasingInFileNames to avoid deployment issues later
  • Uses strict mode but disables some things normally checked by eslint.

Intended for the root project of a monorepo.

  • Based on @darkpatternsdigital/tsconfigs/configs/tsconfig.base.json
  • Disables build outputs

Intended for maximum legacy compatibility.

  • Based on @darkpatternsdigital/tsconfigs/configs/tsconfig.base.json
  • Switches to ES5-compatible output, commonjs, and node module resolution.
  • Adds type reference to @types/node.

Intended for modern node work, such as libraries or server utilities.

  • Based on @darkpatternsdigital/tsconfigs/configs/tsconfig.base.json
  • Adds type reference to @types/node.

Alias for @darkpatternsdigital/tsconfigs/configs/tsconfig.node-esm.json.

A starting point for a React project as used with Vite.

  • Based on @darkpatternsdigital/tsconfigs/configs/tsconfig.base.json
  • Uses the React JSX runtime
  • Enables libraries for browsers, including the DOM and web workers.