Type-check TS on CI and also turn off the strict setting useUnknownInCatchVariables

We don't follow it and I found that turning it on will have little benefit.
This commit is contained in:
Chayim Refael Friedman 2021-11-04 01:23:45 +02:00
parent 04f03a360a
commit 36bdb5c94d
4 changed files with 12 additions and 8 deletions

View file

@ -132,5 +132,8 @@ jobs:
run: npm --prefix ./editors/code test run: npm --prefix ./editors/code test
# working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8 # working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8
- run: npm run pretest
working-directory: ./editors/code
- run: npm run package --scripts-prepend-node-path - run: npm run package --scripts-prepend-node-path
working-directory: ./editors/code working-directory: ./editors/code

View file

@ -28,7 +28,7 @@
"glob": "^7.1.6", "glob": "^7.1.6",
"mocha": "^9.0.2", "mocha": "^9.0.2",
"tslib": "^2.3.0", "tslib": "^2.3.0",
"typescript": "^4.3.5", "typescript": "^4.4.4",
"typescript-formatter": "^7.2.2", "typescript-formatter": "^7.2.2",
"vsce": "^1.95.1", "vsce": "^1.95.1",
"vscode-test": "^1.5.1" "vscode-test": "^1.5.1"
@ -3541,9 +3541,9 @@
} }
}, },
"node_modules/typescript": { "node_modules/typescript": {
"version": "4.3.5", "version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"dev": true, "dev": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
@ -6647,9 +6647,9 @@
} }
}, },
"typescript": { "typescript": {
"version": "4.3.5", "version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"dev": true "dev": true
}, },
"typescript-formatter": { "typescript-formatter": {

View file

@ -32,7 +32,7 @@
"watch": "npm run build-base -- --sourcemap --watch", "watch": "npm run build-base -- --sourcemap --watch",
"lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests", "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests",
"fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix", "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix",
"pretest": "tsc && npm run build", "pretest": "tsc --noEmit && npm run build",
"test": "node ./out/tests/runTests.js" "test": "node ./out/tests/runTests.js"
}, },
"dependencies": { "dependencies": {

View file

@ -9,6 +9,7 @@
"sourceMap": true, "sourceMap": true,
"rootDir": ".", "rootDir": ".",
"strict": true, "strict": true,
"useUnknownInCatchVariables": false,
"noUnusedLocals": true, "noUnusedLocals": true,
"noUnusedParameters": true, "noUnusedParameters": true,
"noImplicitReturns": true, "noImplicitReturns": true,