@stardust-configs/tsconfig

    0.1.1 • Public • Published

    @stardust-configs/tsconfig

    Shareable TypeScript config

    Install

    $ npm install @stardust-configs/tsconfig --save-dev

    Usage

    Edit tsconfig.json.

    Default
    {
      "extends": "@stardust-configs/tsconfig"
    }
    Recommended
    {
      "extends": "@stardust-configs/tsconfig/recommended.json"
    }
    Node.js v12
    {
      "extends": "@stardust-configs/tsconfig/node12.json"
    }
    Node.js v14
    {
      "extends": "@stardust-configs/tsconfig/node14.json"
    }
    Next.js
    {
      "extends": "@stardust-configs/tsconfig/next.json",
      "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
      "exclude": ["node_modules"]
    }

    Override

    Override tsconfig.json.

    declaration
    {
      "extends": "@stardust-configs/tsconfig",
      "compilerOptions": {
        "declaration": true
      }
    }
    outDir & baseUrl
    {
      "extends": "@stardust-configs/tsconfig",
      "compilerOptions": {
        "outDir": "./dist",
        "baseUrl": "./"
      }
    }
    paths
    {
      "extends": "@stardust-configs/tsconfig",
      "compilerOptions": {
        "paths": {
          "@foo/*": ["./src/foo/*"],
          "@bar/*": ["./src/bar/*"]
        }
      }
    }
    typeRoots
    {
      "extends": "@stardust-configs/tsconfig",
      "compilerOptions": {
        "typeRoots": ["./node_modules/@types", "./src/@types"]
      }
    }
    experimentalDecorators & emitDecoratorMetadata
    {
      "extends": "@stardust-configs/tsconfig",
      "compilerOptions": {
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true
      }
    }

    FAQ

    How decided target of nodexx.json?

    Reference Node Target Mapping · microsoft/TypeScript Wiki.

    Why compilerOptions contains uppercase letters?

    I know that developers are generally written in lowercase only. However, JSON Schema contains uppercase letters.

    Author

    @p-chan

    License

    MIT


    Inspired by sindresorhus/tsconfig

    Install

    npm i @stardust-configs/tsconfig

    DownloadsWeekly Downloads

    12

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    5.42 kB

    Total Files

    9

    Last publish

    Collaborators

    • avatar