@stardust-configs/tsconfig
v0.4.0
Published
Shareable TypeScript config
Downloads
567
Readme
@stardust-configs/tsconfig
Shareable TypeScript config
Install
$ npm install @stardust-configs/tsconfig --save-dev
Usage
Edit tsconfig.json
.
{
"extends": "@stardust-configs/tsconfig"
}
{
"extends": "@stardust-configs/tsconfig/recommended.json"
}
{
"extends": "@stardust-configs/tsconfig/node12.json"
}
{
"extends": "@stardust-configs/tsconfig/node14.json"
}
{
"extends": "@stardust-configs/tsconfig/node16.json"
}
{
"extends": "@stardust-configs/tsconfig/node18.json"
}
{
"extends": "@stardust-configs/tsconfig/next.json",
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
Override
Override tsconfig.json
.
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"baseUrl": "./"
}
}
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"paths": {
"@foo/*": ["./src/foo/*"],
"@bar/*": ["./src/bar/*"],
"@baz/*": ["./src/baz/*"]
}
}
}
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"typeRoots": ["./node_modules/@types", "./src/@types"]
}
}
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"declaration": true
}
}
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"outDir": "./dist"
}
}
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"noEmit": true
}
}
{
"extends": "@stardust-configs/tsconfig",
"compilerOptions": {
"plugins": [{ "name": "foo" }, { "name": "bar" }, { "name": "baz" }]
}
}
FAQ
How decided target
of nodexx.json
?
Reference Node Target Mapping · microsoft/TypeScript Wiki.
Why compilerOptions
contains uppercase letters?
I know that developers are generally written in lowercase only. However, JSON Schema contains uppercase letters.
Author
License
MIT
Inspired by sindresorhus/tsconfig