From 2ffc08a078f5676f618f6b53adb865d59fca34a0 Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Tue, 12 Mar 2024 13:00:16 +0100 Subject: [PATCH] add check-ts step to github ci --- .github/workflows/test-and-release.yml | 3 +++ package.json | 4 +++- src/tsconfig.json | 3 ++- tsconfig.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index e99dac7b9..171ec0b03 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -40,6 +40,9 @@ jobs: - name: Build run: NODE_OPTIONS=--max_old_space_size=8192 npm run build + - name: Test TypeScript + run: npm run check-ts + - name: Run local tests run: npm run test-gui diff --git a/package.json b/package.json index 0d9cfcedf..b84205d8b 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,13 @@ "@alcalzone/release-script-plugin-iobroker": "^3.7.0", "@alcalzone/release-script-plugin-license": "^3.7.0", "@iobroker/vis-2-widgets-testing": "^1.0.0", - "@tsconfig/node16": "^16.1.1", + "@tsconfig/node18": "^18.2.2", "@types/mocha": "^10.0.6", "chai": "^4.3.10", "gulp": "^4.0.2", "iobroker.web": "*", "mocha": "^10.3.0", + "typescript": "^5.4.2", "unzipper": "^0.10.14" }, "bugs": { @@ -57,6 +58,7 @@ "main.js" ], "scripts": { + "check-ts": "tsc --project src/tsconfig.json", "start": "cd src && npm run start", "test": "mocha ./test/*.engine.js --exit", "test-gui": "mocha ./test/*.gui.js --exit", diff --git a/src/tsconfig.json b/src/tsconfig.json index c8e0b1e42..0c1702b64 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -1,9 +1,10 @@ { "extends": "../tsconfig.json", "compilerOptions": { + "module": "ES2020", "moduleResolution": "Bundler", "baseUrl": ".", - "checkJs": true, + "checkJs": false, "noEmit": false, "outDir": "./build", "sourceMap": true, diff --git a/tsconfig.json b/tsconfig.json index 358f6a885..c3ce17910 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ // Root tsconfig to set the settings and power editor support for all TS files { - "extends": "@tsconfig/node16/tsconfig.json", + "extends": "@tsconfig/node18/tsconfig.json", "compilerOptions": { // do not compile anything, this file is just to configure type checking "noEmit": true,