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:
Anton Gunnarsson
2025-03-28 07:07:24 +00:00
parent 45c992dcef
commit b535b53901
10 changed files with 73 additions and 61 deletions
+5 -27
View File
@@ -1,30 +1,8 @@
{
"compilerOptions": {
// Enable latest features
"lib": ["ESNext", "DOM"],
"target": "ESNext",
"module": "ESNext",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false,
"paths": {
"@/*": ["./src/*"]
}
"extends": "@scandic-hotels/typescript-config/bun.json",
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
+1
View File
@@ -104,6 +104,7 @@
"zustand": "^4.5.2"
},
"devDependencies": {
"@scandic-hotels/typescript-config": "workspace:*",
"@svgr/webpack": "^8.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
+1 -15
View File
@@ -1,20 +1,6 @@
{
"extends": "@scandic-hotels/typescript-config/nextjs.json",
"compilerOptions": {
"target": "es2022",
"lib": ["dom", "dom.iterable", "ES2022"],
"allowJs": true,
"checkJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleDetection": "force",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"