5.0.4 โ€ข Published 5 months ago

@kikiutils/tsconfigs v5.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@kikiutils/tsconfigs

npm version npm downloads License

Preconfigured TypeScript config files for stricter type checking and multi-environment support.

Features

  • โš™๏ธ Preconfigured tsconfig with strict mode, stricter type checking (isolatedModules, noUncheckedSideEffectImports), and clean ESM support
  • ๐Ÿงฌ Easy inheritance via the extends field in tsconfig
  • ๐Ÿ”€ Multiple tsconfig variants to support different module and target settings
  • ๐Ÿงช Shared Jest testing config for consistent test setup
  • ๐Ÿž Includes official Bun settings for seamless integration

Installation

Using pnpm:

pnpm add -D @kikiutils/tsconfigs

You 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>.json

For 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

MIT License

5.0.4

5 months ago

5.0.3

6 months ago

5.0.2

6 months ago

5.0.1

7 months ago

5.0.0

7 months ago

3.0.3

8 months ago

4.1.0

7 months ago

4.0.1

7 months ago

4.0.0

7 months ago

4.1.1

7 months ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago