@selfage/tsconfig

1.0.7 • Public • Published

@selfage/tsconfig

Overview

Provides a opinionated but consistent tsconfig file across all @selfage packages.

Highlight

  1. Compile to ES6 and compile incrementally.
  2. No --strictNullChecks because it might give false impression that we are safe from null pointer exceptions at runtime. I.e., every type is implicitly an union with undefined | null.
  3. Inline source map and inline source to avoid serving source map/source files when mapping is requested from browsers, with the downside of larger JS file.

Usage

Add extends: "@selfage/tsconfig" to your tsconfig.json.

Full compiler options

{
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "alwaysStrict": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "inlineSourceMap": true,
    "inlineSources": true,
    "skipLibCheck": true,
    "declaration": true,
    "incremental": true
  }
}

Note to dependents

You might want to add "skipLibCheck": true to your tsconfig.json, if you are depending on @selfage packages and not depending on @selfage/tsconfig, in case of incompatible compiler options.

Readme

Keywords

none

Package Sidebar

Install

npm i @selfage/tsconfig

Weekly Downloads

1

Version

1.0.7

License

GPL-3.0-or-later

Unpacked Size

37.3 kB

Total Files

4

Last publish

Collaborators

  • teststaybaka