Skip to content

Latest commit

 

History

History

tsconfig

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

@latipun7/tsconfig 🥷🎯

discord-image workflow-image npm-image

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