add shared tsconfig files
This commit is contained in:
parent
95a8eb687a
commit
83455f137c
7 changed files with 158 additions and 0 deletions
28
packages/shared/jsconfig.node.json
Normal file
28
packages/shared/jsconfig.node.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"noEmit": 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,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"skipDefaultLibCheck": true,
|
||||
"incremental": true
|
||||
},
|
||||
"compileOnSave": false,
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"built",
|
||||
"coverage",
|
||||
"**/*.ts"
|
||||
]
|
||||
}
|
||||
26
packages/shared/jsconfig.web.json
Normal file
26
packages/shared/jsconfig.web.json
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"$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"
|
||||
]
|
||||
}
|
||||
11
packages/shared/jsconfig.webworker.json
Normal file
11
packages/shared/jsconfig.webworker.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./jsconfig.web.json",
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"WebWorker",
|
||||
"Webworker.Iterable"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -2,5 +2,6 @@
|
|||
"type": "module",
|
||||
"devDependencies": {
|
||||
"@misskey-dev/eslint-plugin": "2.1.0",
|
||||
"typescript": "5.9.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
42
packages/shared/tsconfig.node.json
Normal file
42
packages/shared/tsconfig.node.json
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"$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"
|
||||
]
|
||||
}
|
||||
39
packages/shared/tsconfig.web.json
Normal file
39
packages/shared/tsconfig.web.json
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"$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"
|
||||
]
|
||||
}
|
||||
11
packages/shared/tsconfig.webworker.json
Normal file
11
packages/shared/tsconfig.webworker.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./tsconfig.web.json",
|
||||
"compilerOptions": {
|
||||
"lib": [
|
||||
"ES2022",
|
||||
"WebWorker",
|
||||
"Webworker.Iterable"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue