@tammergard/tsconfig
v3.0.2
Published
A sharable TypeScript config with personal preferences
Downloads
365
Maintainers
Readme
@tammergard/tsconfig
A sharable TypeScript config with personal preferences. Requires TypeScript 6 or later.
Installation
# npm
npm install --save-dev @tammergard/tsconfig
# pnpm
pnpm add -D @tammergard/tsconfig
# bun
bun add -d @tammergard/tsconfigUsage
The base config is environment-agnostic. For browser/React projects, extend
the DOM variant instead, which adds lib.dom and jsx.
{
"extends": "@tammergard/tsconfig"
}{
"extends": "@tammergard/tsconfig/dom"
}You can add additional options in your project, which will override the option
in @tammergard/tsconfig if it's defined there.
{
"extends": "@tammergard/tsconfig",
"compilerOptions": {
"outDir": "./dist",
"paths": {
"~/*": ["./src/*"]
}
}
}Enabled options
The most opinionated choices in the base config:
strictexactOptionalPropertyTypesnoFallthroughCasesInSwitchnoImplicitOverridenoImplicitReturnsnoUncheckedIndexedAccessnoUncheckedSideEffectImportserasableSyntaxOnlyverbatimModuleSyntaxisolatedModulesmoduleResolution: "bundler"module: "esnext"target: "es2022"lib: ["es2022"]noEmitskipLibChecknoErrorTruncation
The DOM variant additionally enables jsx: "react-jsx" and adds dom and
dom.iterable to lib.
See tsconfig.json and
tsconfig.dom.json for the full list.
License
MIT
