An open API service indexing awesome lists of open source software.

https://github.com/ttionya/tsconfig

Shared TypeScript config for my projects.
https://github.com/ttionya/tsconfig

ts tsconfig typescript

Last synced: 6 months ago
JSON representation

Shared TypeScript config for my projects.

Awesome Lists containing this project

README

          

# @ttionya/tsconfig

[![npm](https://img.shields.io/npm/v/@ttionya/tsconfig?label=NPM&logo=npm)](https://www.npmjs.com/package/@ttionya/tsconfig) [![npm](https://img.shields.io/npm/dm/@ttionya/tsconfig?label=Downloads&logo=npm)](https://www.npmjs.com/package/@ttionya/tsconfig) [![npm](https://img.shields.io/npm/l/@ttionya/tsconfig?label=License&logo=npm)](https://github.com/ttionya/tsconfig/blob/master/LICENSE)

> Shared TypeScript config for my projects.

Configure grouping by category, see full configuration options [here](https://www.typescriptlang.org/tsconfig).


## Required

- NodeJS `>=20.9.0`
- TypeScript `^5.0.0`

**IMPORTANT:** This branch supports Node 20 LTS or higher and TypeScript 5. For Node 18 LTS and TypeScript 5, switch to the [`v2`](https://github.com/ttionya/tsconfig/tree/v2) branch; for Node 14 LTS and TypeScript 4.7, choose the [`v1`](https://github.com/ttionya/tsconfig/tree/v1) branch.


## Install

```bash
# 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`.

```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.

```json
{
"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.

```json
{
"extends": "@ttionya/tsconfig/tsconfig.classic.json",

"compilerOptions": {
"outDir": "./lib"
}
}
```


## License

MIT