From ec511e2c8b0f4e94e4156ea9bf620389ea58fb5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20J=C3=A4derberg?= Date: Thu, 6 Nov 2025 12:34:23 +0000 Subject: [PATCH] Merged in feature/tsgo (pull request #3069) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use tsgo for typechecking * switch to tsgo for type-checking * Merged in chore/remove-cypress (pull request #3066) chore: remove unused dependencies * chore: remove cypress * remove unused deps * update yarn.lock after removing unused deps Approved-by: Anton Gunnarsson * use tsgo for typechecking * use tsgo for type-checking * yarn install * fix(BOOK-496): Slowed down the MarqueeText component animation Approved-by: Matilda Landström * switch to tsgo for type-checking * use tsgo for typechecking * use tsgo for type-checking * yarn install * Merge branch 'feature/tsgo' of bitbucket.org:scandic-swap/web into feature/tsgo * switch to use yarn check-types in lint-staged * Merge branch 'master' of bitbucket.org:scandic-swap/web into feature/tsgo Approved-by: Linus Flood --- apps/partner-sas/lint-staged.config.js | 2 +- apps/partner-sas/package.json | 6 +- apps/scandic-web/lint-staged.config.js | 2 +- apps/scandic-web/package.json | 2 +- package.json | 1 + packages/booking-flow/lint-staged.config.mjs | 2 +- packages/booking-flow/package.json | 6 +- packages/common/lint-staged.config.js | 2 +- packages/common/package.json | 4 +- packages/design-system/lint-staged.config.js | 2 +- packages/design-system/package.json | 2 +- packages/design-system/tsconfig.json | 1 - packages/tracking/lint-staged.config.js | 2 +- packages/tracking/package.json | 4 +- packages/trpc/lint-staged.config.mjs | 2 +- packages/trpc/package.json | 6 +- yarn.lock | 82 ++++++++++++++++++++ 17 files changed, 105 insertions(+), 23 deletions(-) diff --git a/apps/partner-sas/lint-staged.config.js b/apps/partner-sas/lint-staged.config.js index d03436774..82bb8af36 100644 --- a/apps/partner-sas/lint-staged.config.js +++ b/apps/partner-sas/lint-staged.config.js @@ -13,7 +13,7 @@ const buildEslintCommand = (filenames) => { const config = { "*.{js,jsx,ts,tsx}": [buildEslintCommand], - "*.{ts,tsx}": () => "tsc -p tsconfig.json --noEmit", + "*.{ts,tsx}": () => "yarn check-types", "*.{js,jsx,ts,tsx,json,css}": "prettier --write", "i18n/dictionaries/*.json": "jsonsort", } diff --git a/apps/partner-sas/package.json b/apps/partner-sas/package.json index 0fe261424..fcdc13fea 100644 --- a/apps/partner-sas/package.json +++ b/apps/partner-sas/package.json @@ -7,9 +7,9 @@ "dev": "NODE_OPTIONS=--openssl-legacy-provider PORT=3001 NEXT_PUBLIC_PORT=3001 next dev", "build": "next build", "start": "node .next/standalone/server.js", - "lint": "next lint --max-warnings 0 && tsc --noEmit", - "lint:fix": "next lint --fix && tsc --noEmit", - "check-types": "tsc --noEmit", + "lint": "next lint --max-warnings 0 && tsgo --noEmit", + "lint:fix": "next lint --fix && tsgo --noEmit", + "check-types": "tsgo --noEmit", "clean": "rm -rf .next", "test": "vitest run --passWithNoTests", "test:watch": "vitest", diff --git a/apps/scandic-web/lint-staged.config.js b/apps/scandic-web/lint-staged.config.js index 0de8ce559..f398a3f72 100644 --- a/apps/scandic-web/lint-staged.config.js +++ b/apps/scandic-web/lint-staged.config.js @@ -13,7 +13,7 @@ const buildEslintCommand = (filenames) => { const config = { "*.{js,jsx,ts,tsx}": [buildEslintCommand], - "*.{ts,tsx}": () => "tsc -p tsconfig.json --noEmit", + "*.{ts,tsx}": () => "yarn check-types", "*.{js,jsx,ts,tsx,json,css}": "prettier --write", "i18n/dictionaries/*.json": "jsonsort", } diff --git a/apps/scandic-web/package.json b/apps/scandic-web/package.json index 8c248170f..d571cd06e 100644 --- a/apps/scandic-web/package.json +++ b/apps/scandic-web/package.json @@ -15,7 +15,7 @@ "test:watch": "vitest", "ci:build": "yarn lint && yarn test && yarn build", "clean": "rm -rf .next", - "check-types": "tsc --noEmit", + "check-types": "tsgo --noEmit", "include:shared": "jiti ../../scripts/copyFiles.ts ../../shared public/_static/shared", "format": "prettier --write ." }, diff --git a/package.json b/package.json index 37f4935c1..961ae62ce 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@formatjs/cli": "^6.7.1", "@types/react": "19.1.0", "@types/react-dom": "19.1.0", + "@typescript/native-preview": "^7.0.0-dev.20251104.1", "@yarnpkg/types": "^4.0.1", "commander": "^14.0.0", "husky": "^9.1.7", diff --git a/packages/booking-flow/lint-staged.config.mjs b/packages/booking-flow/lint-staged.config.mjs index ae7bcfcb5..5e9c0b863 100644 --- a/packages/booking-flow/lint-staged.config.mjs +++ b/packages/booking-flow/lint-staged.config.mjs @@ -1,7 +1,7 @@ const config = { "*.{ts,tsx}": [ () => "yarn lint", - () => "tsc -p tsconfig.json --noEmit", + () => "yarn check-types", "prettier --write", ], "*.{js,cjs,mjs}": "prettier --write", diff --git a/packages/booking-flow/package.json b/packages/booking-flow/package.json index 1c8c870a7..9494ff42b 100644 --- a/packages/booking-flow/package.json +++ b/packages/booking-flow/package.json @@ -4,9 +4,9 @@ "main": "index.ts", "type": "module", "scripts": { - "check-types": "tsc --noEmit", - "lint": "eslint . --max-warnings 0 && tsc --noEmit", - "lint:fix": "eslint . --fix && tsc --noEmit", + "check-types": "tsgo --noEmit", + "lint": "eslint . --max-warnings 0 && tsgo --noEmit", + "lint:fix": "eslint . --fix && tsgo --noEmit", "test": "vitest run --passWithNoTests", "test:watch": "vitest", "format": "prettier --write ." diff --git a/packages/common/lint-staged.config.js b/packages/common/lint-staged.config.js index 87a7ea8f8..eb5351d26 100644 --- a/packages/common/lint-staged.config.js +++ b/packages/common/lint-staged.config.js @@ -1,7 +1,7 @@ const config = { "*.{ts,tsx}": [ () => "yarn lint", - () => "tsc -p tsconfig.json --noEmit", + () => "yarn type-check", "prettier --write", ], "*.{json,md}": "prettier --write", diff --git a/packages/common/package.json b/packages/common/package.json index 80c69deca..c3d8f812c 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -7,8 +7,8 @@ "scripts": { "test": "vitest run", "test:watch": "vitest", - "check-types": "tsc --noEmit", - "lint": "eslint . --max-warnings 0 && tsc --noEmit", + "check-types": "tsgo --noEmit", + "lint": "eslint . --max-warnings 0 && tsgo --noEmit", "format": "prettier --write ." }, "exports": { diff --git a/packages/design-system/lint-staged.config.js b/packages/design-system/lint-staged.config.js index b5e8f3b6c..b51e1102d 100644 --- a/packages/design-system/lint-staged.config.js +++ b/packages/design-system/lint-staged.config.js @@ -1,7 +1,7 @@ const config = { '*.{ts,tsx}': [ () => 'yarn lint', - () => 'tsc -p tsconfig.json --noEmit', + () => 'yarn check-types', 'prettier --write', ], '*.{json,md}': 'prettier --write', diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 47ab4d5eb..cebe4a963 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -212,7 +212,7 @@ "test:watch": "vitest", "prepack": "yarn run build", "prepare": "husky && yarn run build", - "check-types": "tsc --noEmit", + "check-types": "tsgo --noEmit", "test:browser": "vitest --config=vitest.browser.config.ts", "include:shared": "jiti ../../scripts/copyFiles.ts ../../shared public/_static/shared" }, diff --git a/packages/design-system/tsconfig.json b/packages/design-system/tsconfig.json index 46b94c4d8..5d5240b85 100644 --- a/packages/design-system/tsconfig.json +++ b/packages/design-system/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "allowImportingTsExtensions": true, "noEmit": true, - "baseUrl": ".", "paths": {} }, "include": ["example", "lib"], diff --git a/packages/tracking/lint-staged.config.js b/packages/tracking/lint-staged.config.js index 87a7ea8f8..d7e5bd99f 100644 --- a/packages/tracking/lint-staged.config.js +++ b/packages/tracking/lint-staged.config.js @@ -1,7 +1,7 @@ const config = { "*.{ts,tsx}": [ () => "yarn lint", - () => "tsc -p tsconfig.json --noEmit", + () => "yarn check-types", "prettier --write", ], "*.{json,md}": "prettier --write", diff --git a/packages/tracking/package.json b/packages/tracking/package.json index 92ae5660a..67b5f7419 100644 --- a/packages/tracking/package.json +++ b/packages/tracking/package.json @@ -7,8 +7,8 @@ "scripts": { "test": "vitest run", "test:watch": "vitest", - "check-types": "tsc --noEmit", - "lint": "eslint . --max-warnings 0 && tsc --noEmit", + "check-types": "tsgo --noEmit", + "lint": "eslint . --max-warnings 0 && tsgo --noEmit", "format": "prettier --write ." }, "exports": { diff --git a/packages/trpc/lint-staged.config.mjs b/packages/trpc/lint-staged.config.mjs index ae7bcfcb5..5e9c0b863 100644 --- a/packages/trpc/lint-staged.config.mjs +++ b/packages/trpc/lint-staged.config.mjs @@ -1,7 +1,7 @@ const config = { "*.{ts,tsx}": [ () => "yarn lint", - () => "tsc -p tsconfig.json --noEmit", + () => "yarn check-types", "prettier --write", ], "*.{js,cjs,mjs}": "prettier --write", diff --git a/packages/trpc/package.json b/packages/trpc/package.json index e192f5cc6..be260ff03 100644 --- a/packages/trpc/package.json +++ b/packages/trpc/package.json @@ -4,9 +4,9 @@ "main": "index.ts", "type": "module", "scripts": { - "check-types": "tsc --noEmit", - "lint": "eslint . --max-warnings 0 && tsc --noEmit", - "lint:fix": "eslint . --fix && tsc --noEmit", + "check-types": "tsgo --noEmit", + "lint": "eslint . --max-warnings 0 && tsgo --noEmit", + "lint:fix": "eslint . --fix && tsgo --noEmit", "test": "vitest run", "test:watch": "vitest", "format": "prettier --write ." diff --git a/yarn.lock b/yarn.lock index e96c5f536..fa7d8cef2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6818,6 +6818,87 @@ __metadata: languageName: node linkType: hard +"@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20251104.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-darwin-x64@npm:7.0.0-dev.20251104.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-linux-arm64@npm:7.0.0-dev.20251104.1" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/native-preview-linux-arm@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-linux-arm@npm:7.0.0-dev.20251104.1" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@typescript/native-preview-linux-x64@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-linux-x64@npm:7.0.0-dev.20251104.1" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-win32-arm64@npm:7.0.0-dev.20251104.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/native-preview-win32-x64@npm:7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview-win32-x64@npm:7.0.0-dev.20251104.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@typescript/native-preview@npm:^7.0.0-dev.20251104.1": + version: 7.0.0-dev.20251104.1 + resolution: "@typescript/native-preview@npm:7.0.0-dev.20251104.1" + dependencies: + "@typescript/native-preview-darwin-arm64": "npm:7.0.0-dev.20251104.1" + "@typescript/native-preview-darwin-x64": "npm:7.0.0-dev.20251104.1" + "@typescript/native-preview-linux-arm": "npm:7.0.0-dev.20251104.1" + "@typescript/native-preview-linux-arm64": "npm:7.0.0-dev.20251104.1" + "@typescript/native-preview-linux-x64": "npm:7.0.0-dev.20251104.1" + "@typescript/native-preview-win32-arm64": "npm:7.0.0-dev.20251104.1" + "@typescript/native-preview-win32-x64": "npm:7.0.0-dev.20251104.1" + dependenciesMeta: + "@typescript/native-preview-darwin-arm64": + optional: true + "@typescript/native-preview-darwin-x64": + optional: true + "@typescript/native-preview-linux-arm": + optional: true + "@typescript/native-preview-linux-arm64": + optional: true + "@typescript/native-preview-linux-x64": + optional: true + "@typescript/native-preview-win32-arm64": + optional: true + "@typescript/native-preview-win32-x64": + optional: true + bin: + tsgo: bin/tsgo.js + checksum: 10c0/dce6ab5c1d265bc9a56a6a571a92222b63b43ae809bc240ebac4e838588891419f281ff81dce43d55bd52aa786f2a9fc1753fb7b071e2b272210ab05ebffe455 + languageName: node + linkType: hard + "@unhead/schema@npm:^1.11.11, @unhead/schema@npm:^1.9.5": version: 1.11.20 resolution: "@unhead/schema@npm:1.11.20" @@ -13752,6 +13833,7 @@ __metadata: "@formatjs/cli": "npm:^6.7.1" "@types/react": "npm:19.1.0" "@types/react-dom": "npm:19.1.0" + "@typescript/native-preview": "npm:^7.0.0-dev.20251104.1" "@yarnpkg/types": "npm:^4.0.1" commander: "npm:^14.0.0" husky: "npm:^9.1.7"