ttionya / tsconfig

Shared TypeScript config for my projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@ttionya/tsconfig

npm npm npm

Shared TypeScript config for my projects.

Configure grouping by category, see full configuration options here.


Required

  • NodeJS >=18.12.0
  • TypeScript ^5.0.0

IMPORTANT: This branch only supports Node 18 LTS or higher and TypeScript 5. Switch to the v1 branch that supports Node 14 LTS and TypeScript 4.7+.


Install

# NPM
npm i -D @ttionya/tsconfig

# PNPM
pnpm add -D @ttionya/tsconfig

Usage

Node (ESM)

Enabling ECMAScript Modules (ESM) by setting "type": "module" in package.json.

{
  "extends": "@ttionya/tsconfig/tsconfig.esm.json",
  
  "compilerOptions": {
    "outDir": "./esm"
  }
}

Node (CommonJS)

Using CommonJS and automatically detecting the appropriate algorithm to resolve modules. Supporting the exports field in the package.json file.

{
  "extends": "@ttionya/tsconfig/tsconfig.commonjs.json",
  
  "compilerOptions": {
    "outDir": "./lib"
  }
}

Node (Classic CommonJS)

Using CommonJS but not supporting the exports field in the package.json file.

{
  "extends": "@ttionya/tsconfig/tsconfig.classic.json",
  
  "compilerOptions": {
    "outDir": "./lib"
  }
}

License

MIT

About

Shared TypeScript config for my projects.

License:MIT License


Languages

Language:JavaScript 100.0%