0.1.6 • Published 9 months ago

@12deg/tsconfig v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@12deg/tsconfig

A shared TypeScript configuration for consistent and reliable type-checking across projects.

Install

Install the required dependencies:

$ npm i -D @12deg/tsconfig

Usage

In the root directory of your project, create or update a tsconfig.json file to extend the base configuration that fits your project type:

  • For general typescript project:

    {
      "extends": "@12deg/tsconfig",
      // add custom options here if needed
    }
  • For api server:

    {
      "extends": "@12deg/tsconfig/api.json",
      // add custom options here if needed
    }
  • For react app:

    {
      "extends": "@12deg/tsconfig/react-app.json",
      // add custom options here if needed
    }
  • For react library:

    {
      "extends": "@12deg/tsconfig/react.json",
      // add custom options here if needed
    }
  • For vue app:

    {
      "extends": "@12deg/tsconfig/vue-app.json",
      // add custom options here if needed
    }
  • For vue library:

    {
      "extends": "@12deg/tsconfig/vue.json",
      // add custom options here if needed
    }

Adding typescript checking scripts

In your package.json, include a script for running typescript checks without emitting compiled files:

{
  "scripts": {
    "typecheck": "tsc --noEmit -p tsconfig.json --composite false"
  }
}

Running typescript checks

Use the following command to type-check your code:

npm run typecheck
0.1.6

9 months ago

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

9 months ago