Install the package with one of the following commands below.
# For NPM
npm install --save-dev @aetherjs/ts-config
# For PNPM
pnpm add -D @aetherjs/ts-config
# For YARN
yarn add -D @aetherjs/ts-config
# For Bun
bun add -D @aetherjs/ts-config
Add the following to your tsconfig.json
file.
{
"extends": "@aetherjs/ts-config"
}
Below is a copy of the base configuration for easy viewing.
{
"compileOnSave": true,
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"alwaysStrict": true,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"importHelpers": false,
"incremental": true,
"lib": ["esnext"],
"module": "Node16",
"moduleResolution": "Node16",
"newLine": "lf",
"noEmitHelpers": false,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveConstEnums": true,
"pretty": true,
"removeComments": false,
"resolveJsonModule": true,
"sourceMap": true,
"strict": true,
"target": "ES2020",
"useDefineForClassFields": true,
"types": ["bun-types"]
}
}
This package was inspired by @sapphire/ts-config