@checkdigit/typescript-config

Check Digit standard Typescript configuration

Usage no npm install needed!

<script type="module">
  import checkdigitTypescriptConfig from 'https://cdn.skypack.dev/@checkdigit/typescript-config';
</script>

README

checkdigit/typescript-config

MIT License David

Copyright (c) 2021 Check Digit, LLC

Introduction

This module contains the standard Check Digit Typescript configuration.

  • requires Node 14 or above
  • emits ES2020
  • all compiler options set for maximum strictness

A note about versioning

Strict semver is a little complicated, as Typescript itself does not adhere to semver. So our "best effort" policy is:

  • Each new target (e.g. ES2019 to ES2020) will result in a new major version of this module. We coordinate this with whatever the latest LTS version of Node is currently supported by Amazon Lambda, Google Cloud Functions and Azure Functions.
  • Each new major version of Typescript (e.g. 4.2.x to 4.3.x) will result in a new minor version of this module.
  • Each new minor update of Typescript (e.g. 4.3.1 to 4.3.2) will result in a new patch version of this module.

Bear in mind, any update of Typescript can potentially break your build. But hopefully in a way that's useful.

Installation

npm add -D typescript
npm add -D @checkdigit/typescript-config

Make sure your project's tsconfig.json extends @checkdigit/typescript-config.

Example tsconfig.json

{
  "extends": "@checkdigit/typescript-config",
  "compilerOptions": {
    "rootDir": "src",
    "outDir": "build"
  },
  "exclude": [
    "node_modules",
    "build",
    "dist"
  ]
}

License

MIT