1.0.0 • Published 8 months ago

@julr/typescript-configs v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

@julr/typescript-configs

In TypeScript, the configuration file can extend from a base file. This package provided a few common base configuration files to simplify TypeScript project setup.

Installation

pnpm add -D @julr/typescript-configs

Usage

All projects

The base configuration file is tsconfig.base.json. It contains the common configuration for all projects. Enable all strictness options.

{
  "extends": "@julr/typescript-configs/tsconfig.base.json",
  "compilerOptions": {
    //
  }
}

Node project

{
  "extends": "@julr/typescript-configs/node-18-cjs.json",
  // Can also be `node-18-esm.json` for ESM project
  // "extends": "@julr/typescript-configs/node-18-esm.json",
  "compilerOptions": {
    "baseUrl": ".",
    "rootDir": "."
  }
}