Merged in feat/shared-ts-config (pull request #1610)
Add typescript-config package with shared configs * Move web config to shared * Move design-system ts config to typescript-config package * Move redis-api tsconfig to typescript-config package * Sort tsconfig keys * Update react-library tsconfig Move declaration and declarationMap from base Add sourceMap This fixes Go-to-Definition, debugging and similar in packages/apps where it is consumed * Update base config module and moduleResolution Approved-by: Michael Zetterberg Approved-by: Christian Andolf
This commit is contained in:
@@ -1,25 +1,8 @@
|
||||
{
|
||||
"extends": "@scandic-hotels/typescript-config/react-library.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["example", "lib"],
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
|
||||
16
packages/typescript-config/base.json
Normal file
16
packages/typescript-config/base.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"incremental": false,
|
||||
"isolatedModules": true,
|
||||
"lib": ["es2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"moduleDetection": "force",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"strict": true,
|
||||
"target": "ES2022"
|
||||
}
|
||||
}
|
||||
11
packages/typescript-config/bun.json
Normal file
11
packages/typescript-config/bun.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "@scandic-hotels/typescript-config/base.json",
|
||||
"compilerOptions": {
|
||||
"allowImportingTsExtensions": true,
|
||||
"allowJs": true,
|
||||
"noEmit": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"target": "ESNext",
|
||||
"verbatimModuleSyntax": true
|
||||
}
|
||||
}
|
||||
12
packages/typescript-config/nextjs.json
Normal file
12
packages/typescript-config/nextjs.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"incremental": true,
|
||||
"jsx": "preserve",
|
||||
"noEmit": true,
|
||||
"plugins": [{ "name": "next" }]
|
||||
}
|
||||
}
|
||||
5
packages/typescript-config/package.json
Normal file
5
packages/typescript-config/package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "@scandic-hotels/typescript-config",
|
||||
"private": true,
|
||||
"version": "0.0.0"
|
||||
}
|
||||
13
packages/typescript-config/react-library.json
Normal file
13
packages/typescript-config/react-library.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "./base.json",
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"jsx": "react-jsx",
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"sourceMap": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user