@agilgur5/tsconfig
v0.1.0
Published
My tsconfig base files, extending @tsconfig/strictest
Downloads
24
Maintainers
Readme
tsconfig
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
, andnoEmit
)library
adds tobase
config for libraries (declaration
,declarationMap
)library-build
adds tolibrary
config used if you compile to JS with a separate tool (e.g. Rollup, Babel), but usetsc
to output declarations (emitDeclarationOnly
)