@agilgur5/tsconfig

0.1.0 • Public • Published

tsconfig

package-json releases commits

My tsconfig base files, extending @tsconfig/strictest.

Installation

npm i -D @agilgur5/tsconfig

Usage

tsconfig.json:

{
  // https://github.com/agilgur5/tsconfig
  "extends": "@agilgur5/tsconfig/library",
  // exclude node_modules (the default), dist dir, coverage dir
  "exclude": ["node_modules/", "dist/", "coverage/"],
  // see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
  "compilerOptions": {
    // output to dist/ dir
    "outDir": "dist/",
  },
}

NOTE: Due to microsoft/TypeScript#48665, TypeScript versions older than v5 must import from @agilgur5/tsconfig/src instead of the shortened package.json#exports.

NOTE: Due to microsoft/TypeScript#29172, we repeat some configurations (files, include, exclude, outDir) from the base config as relative paths are currently resolved within node_modules.

Directory

The configs here do not change any of the type-checking from the @tsconfig/strictest base. They only add a handful more simple, common configurations:

  • base adds to @tsconfig/strictest config around resolution (moduleResolution, resolveJsonFile) and emit (sourceMap, jsx, and noEmit)
  • library adds to base config for libraries (declaration, declarationMap)
  • library-build adds to library config used if you compile to JS with a separate tool (e.g. Rollup, Babel), but use tsc to output declarations (emitDeclarationOnly)

Package Sidebar

Install

npm i @agilgur5/tsconfig

Weekly Downloads

4

Version

0.1.0

License

Apache-2.0

Unpacked Size

16.6 kB

Total Files

6

Last publish

Collaborators

  • agilgur5