remove jsconfig templates and add new lib/scripts templates

This commit is contained in:
Hazelnoot 2025-10-07 00:35:22 -04:00
parent 6c3027fe7a
commit f6d5a2378a
11 changed files with 122 additions and 136 deletions

View file

@ -1,26 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Bundler",
"types": [],
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"noLib": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"incremental": true
},
"compileOnSave": false,
"exclude": [
"node_modules",
"built",
"coverage",
"**/*.ts"
]
}

View file

@ -1,11 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./jsconfig.web.json",
"compilerOptions": {
"lib": [
"ES2022",
"WebWorker",
"Webworker.Iterable"
]
}
}

View file

@ -0,0 +1,41 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
// Input
"allowJs": true,
"checkJs": true,
"noLib": false,
// Checking
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"strict": true,
"noImplicitReturns": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"noFallthroughCasesInSwitch": true,
"experimentalDecorators": true,
"verbatimModuleSyntax": true,
"isolatedModules": true,
"forceConsistentCasingInFileNames": true,
"allowUnreachableCode": false,
"noImplicitOverride": true,
"allowSyntheticDefaultImports": false,
"resolveJsonModule": false,
// Output
"esModuleInterop": true,
"noEmitOnError": true,
"incremental": true,
"removeComments": true,
},
"compileOnSave": false,
"exclude": [
"**/node_modules",
"**/built",
"**/built-test",
"**/js-built",
"**/temp",
"**/coverage"
]
}

View file

@ -0,0 +1,14 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.scripts.jsonc",
"#": [
"This is not a template!!!",
"Used for type-checking the shared JS/TS code; do not reference from other packages."
],
"include": [
"*.js",
"*.ts",
],
}

View file

@ -0,0 +1,22 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.common.jsonc",
"compilerOptions": {
// Target
// NodeNext should be used even for non-node libraries: https://stackoverflow.com/a/78087127
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"lib": ["ES2022"],
// Output
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"inlineSources": true,
"removeComments": false,
"noEmitOnError": false,
"noEmit": false,
"composite": true
}
}

View file

@ -1,42 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmitOnError": true,
// ES2025 is the earliest that supports our API uses: https://node.green/#ES2025
// But TS doesn't implement it yet: https://github.com/microsoft/TypeScript/issues/61735
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": ["node"],
"lib": ["ESNext"],
"noLib": false,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedParameters": false,
"noUnusedLocals": false,
"noFallthroughCasesInSwitch": true,
"declaration": false,
"sourceMap": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": false,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"experimentalDecorators": true,
"verbatimModuleSyntax": true,
"emitDecoratorMetadata": true,
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true
},
"compileOnSave": false,
"exclude": [
"node_modules",
"built",
"coverage"
]
}

View file

@ -1,28 +1,23 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.common.jsonc",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmit": true,
// Target
// ES2025 is the earliest that supports our API uses: https://node.green/#ES2025
// But TS doesn't implement it yet: https://github.com/microsoft/TypeScript/issues/61735
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"types": ["node"],
"lib": ["ESNext"],
"noLib": false,
// Checking
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"incremental": true
},
"compileOnSave": false,
"exclude": [
"node_modules",
"built",
"coverage",
"**/*.ts"
]
"resolveJsonModule": true,
"noUnusedLocals": false, // allow unused imports to avoid merge conflicts
"noUnusedParameters": false, // allow unused imports to avoid merge conflicts
// Output
"emitDecoratorMetadata": true,
"removeComments": false
}
}

View file

@ -0,0 +1,12 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.node.jsonc",
"compilerOptions": {
// Checking
"noImplicitAny": false,
"allowImportingTsExtensions": true,
// Output
"noEmit": true
}
}

View file

@ -1,39 +0,0 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"noEmitOnError": false,
// TODO should we support an older standard?
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Bundler",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"noLib": false,
"strict": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"noUnusedParameters": false,
"noUnusedLocals": false,
"noFallthroughCasesInSwitch": true,
"declaration": false,
"sourceMap": false,
"strictNullChecks": true,
"experimentalDecorators": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"useDefineForClassFields": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"incremental": true
},
"compileOnSave": false,
"exclude": [
"node_modules",
"built",
"coverage"
]
}

View file

@ -0,0 +1,20 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.common.jsonc",
"compilerOptions": {
// Target
// TODO should we target an older standard?
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "Bundler",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
// Checking
// TODO separate web/bundler profiles to account for stuff like this
"resolveJsonModule": true,
// Output
"sourceMap": true,
"inlineSources": true
}
}

View file

@ -1,6 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./tsconfig.web.json",
"extends": "./tsconfig.web.jsonc",
"compilerOptions": {
"lib": [
"ES2022",