README
@latipun7/tsconfig 🥷🎯
Latipun TypeScript Configuration
🥷 Nerdy Ninja's shareable TypeScript configuration 🎯
Getting Started
yarn add -D @latipun7/tsconfig typescript
NodeJS ESModule target
// tsconfig.json { "extends": "@latipun7/tsconfig/esm", "include": ["src/**/*", "**/*.config.ts"], "exclude": ["**/node_modules", "**/dist"], "compilerOptions": {} }
NextJS apps
// tsconfig.json { "extends": "@latipun7/tsconfig/next", "include": ["src/**/*", "**/*.config.ts"], "exclude": ["**/node_modules", "**/dist"], "compilerOptions": {} }
NodeJS CommonJS target
// tsconfig.json { "extends": "@latipun7/tsconfig/cjs", "include": ["src/**/*", "**/*.config.ts"], "exclude": ["**/node_modules", "**/dist"], "compilerOptions": {} }
Note: Since typescript's extends
has behavior that properties with relative paths found in the configuration file, which aren't excluded from inheritance, will be resolved relative to the configuration file they originated in.
This means, files
, include
, exclude
, and other properties that accept relative path like compilerOptions.baseUrl
, compilerOptions.paths
, etc, you need to specify it yourself.
Hacking to the Gate~! 🧑💻🎶
MIT License © Latif Sulistyo