@latipun7/tsconfig

1.2.1 • Public • Published

@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

Package Sidebar

Install

npm i @latipun7/tsconfig

Weekly Downloads

9

Version

1.2.1

License

MIT

Unpacked Size

5.12 kB

Total Files

6

Last publish

Collaborators

  • latipun7