@kikiutils/tsconfigs v5.0.4
@kikiutils/tsconfigs
Preconfigured TypeScript config files for stricter type checking and multi-environment support.
Features
- โ๏ธ Preconfigured
tsconfigwithstrictmode, stricter type checking (isolatedModules,noUncheckedSideEffectImports), and clean ESM support - ๐งฌ Easy inheritance via the
extendsfield intsconfig - ๐ Multiple
tsconfigvariants to support differentmoduleandtargetsettings - ๐งช Shared Jest testing config for consistent test setup
- ๐ Includes official Bun settings for seamless integration
Installation
Using pnpm:
pnpm add -D @kikiutils/tsconfigsYou can also use yarn, npm, or bun.
Usage
The base configuration is tsconfig.base.json.
You can extend it directly or pick one that matches your desired module and target.
Here's an example of a typical tsconfig.json setup:
{
"extends": "@kikiutils/tsconfigs/esnext/es2022.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"declarationMap": true,
"emitDeclarationOnly": true
},
"include": ["./src"]
}The extends path is structured as:
@kikiutils/tsconfigs/<module>/<target>.jsonFor example, to use CommonJS as the module and ES2021 as the target, set:
"extends": "@kikiutils/tsconfigs/commonjs/es2021.json"For unit testing with Jest, you can extend the shared Jest config:
"extends": "@kikiutils/tsconfigs/jest.json"!NOTE All paths and file names are lowercase.
๐ If you're using the Bun runtime, simply use:
"extends": "@kikiutils/tsconfigs/bun.json"
Available modules
- AMD
- CommonJS
- ES6
- ES2015
- ES2020
- ES2022
- ESNext
- Node16
- Node18
- NodeNext
- None
- Preserve
- System
- UMD
Available targets
- ES3
- ES5
- ES6
- ES2015
- ES2016
- ES2017
- ES2018
- ES2019
- ES2020
- ES2021
- ES2022
- ES2023
- ES2024
- ESNext
License
5 months ago
6 months ago
6 months ago
7 months ago
7 months ago
8 months ago
7 months ago
7 months ago
7 months ago
7 months ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago