@tofrankie/tsconfig
v0.2.1
Published
Shared TypeScript configuration
Maintainers
Readme
@tofrankie/tsconfig
Shared TypeScript configuration.
[!IMPORTANT] Before 1.0.0, releases may include breaking changes. Read the CHANGELOG before upgrading.
Install
$ pnpm add typescript @tofrankie/tsconfig -DInstall additional dependencies based on your scenario:
- Node projects usually need:
@types/node - Vitest projects usually need:
vitest,@types/node - Vite projects usually need:
vite
Quick Start
Choose one preset based on your project:
@tofrankie/tsconfig/web.app.json- Web App (framework-agnostic)@tofrankie/tsconfig/react.app.json- React Web App@tofrankie/tsconfig/react.lib.json- React Library (npm package)@tofrankie/tsconfig/vue.app.json- Vue Web App@tofrankie/tsconfig/vue.lib.json- Vue Library (npm package)@tofrankie/tsconfig/node.app.json- Node Application/Script@tofrankie/tsconfig/node.lib.json- Node Library (npm package)@tofrankie/tsconfig/vitest.web.json- Vitest (Web)@tofrankie/tsconfig/vitest.node.json- Vitest (Node)@tofrankie/tsconfig/strict.json- Strict
Then extend it from your tsconfig.json. For example, for a React web app:
{
"extends": "@tofrankie/tsconfig/react.app.json",
"compilerOptions": {
// your custom compiler options
// ...
},
}CLI
An interactive CLI is included to scaffold your tsconfig files quickly. After generation, adjust the output files to match your project needs.
$ npx @tofrankie/tsconfigLicense
MIT License © Frankie
