@akistack/tsconfig
v0.0.7
Published
Typescript config presets for different scenes.
Readme
@akistack/tsconfig
TypeScript config presets for different scenes.
Visit https://aka.ms/tsconfig.json to read more about tsconfig.
Usage
Add @akistack/tsconfig as a devDependency to your project:
# pnpm
pnpm i -D @akistack/tsconfig
# yarn
yarn add -D @akistack/tsconfig
# npm
npm i -D @akistack/tsconfig
# rush
rush add -p @akistack/tsconfig --devAdd to your tsconfig.json:
// replace [base] with any other available presets
"extends": "@akistack/tsconfig/baseIf you'd like to import type declarations for static files, create a static.d.ts at ./src and add:
/// <reference types="@akistack/tsconfig/types/static" />Available Presets
Notes: This config presets use
esnext(for target and module) /bundler(for moduleResolution) by default. Typescript 5+ is required.
| Name | Package | Description |
| ------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| Base | @akistack/tsconfig @akistack/tsconfig/base | Recommended base config to be extended in most of scenes. |
| Strict | @akistack/tsconfig/strict | Base config with strictest type-checking options. |
| Web | @akistack/tsconfig/web | Web application oriented configs. |
| Node | @akistack/tsconfig/node | Node.js application oriented configs. Compatible for Node 16 and later. ESNext by default. |
| Node (Legacy) | @akistack/tsconfig/node10 | Node.js application oriented configs for legacy versions. CommonJS by default. |
| Lynx | @akistack/tsconfig/lynx | Lynx application oriented configs. |
Static File Declarations
This config preset comes with static file declarations.
| Name | Package | Description |
| ------ | --------------------------------- | --------------------------------------------------------------------------- |
| Static | @akistack/tsconfig/types/static | Common static files' type declarations (CSS, Image, Font, CSS Modules, ...) |
| SVGR | @akistack/tsconfig/types/svgr | Declaration for SVGR pre-processed React Components. |
