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.
- Host: GitHub
- URL: https://github.com/ttionya/tsconfig
- Owner: ttionya
- License: mit
- Created: 2023-02-05T13:45:14.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T16:11:53.000Z (about 1 year ago)
- Last Synced: 2024-10-16T09:32:25.572Z (about 1 year ago)
- Topics: ts, tsconfig, typescript
- Language: JavaScript
- Homepage:
- Size: 85 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @ttionya/tsconfig
[](https://www.npmjs.com/package/@ttionya/tsconfig) [](https://www.npmjs.com/package/@ttionya/tsconfig) [](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