diff --git a/nx.json b/nx.json index 48d660bc4b..b95619d1e2 100644 --- a/nx.json +++ b/nx.json @@ -15,24 +15,24 @@ "dependsOn": ["^build:lib"], "inputs": [ "^prod", - "{workspaceRoot}/tsconfig.json", + "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tsconfig.lib.json" ], "outputs": ["{projectRoot}/lib", "{projectRoot}/build"], "cache": true }, "type-check": { - "dependsOn": ["^build:lib", "^type-check"], + "dependsOn": ["^build:lib", "^type-check", "build:lib"], "inputs": [ "^prod", - "{workspaceRoot}/tsconfig.json", + "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tsconfig.lib.json" ], "outputs": ["{projectRoot}/libDev"], "cache": true }, "test:unit": { - "dependsOn": ["^build:lib"], + "dependsOn": ["^build:lib", "build:lib"], "inputs": [ "^prod", "{workspaceRoot}/jest.config.base.js", @@ -42,13 +42,12 @@ }, "lint:js": { "inputs": ["default", "{workspaceRoot}/.eslintrc.js"], + "outputs": ["{projectRoot}/.eslintcache"], "cache": true }, "lint:styles": { "inputs": ["default"], - "cache": true - }, - "lint": { + "outputs": ["{projectRoot}/.stylelintcache"], "cache": true } }, diff --git a/package.json b/package.json index c49fefab8f..f6f07bbd9d 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "nx:lint:styles": "yarn nx affected --target=lint:styles", "_______ Commands _______": "Useful commands and scripts.", "patch": "yarn patch-package", - "update-project-references": "yarn tsx ./scripts/updateProjectReferences.js", + "update-project-references": "yarn tsx ./scripts/updateProjectReferences.ts", "verify-project-references": "yarn update-project-references --test", "check-workspace-resolutions": "yarn tsx ./scripts/check-workspace-resolutions.ts", "generate-package": "yarn tsx ./scripts/generatePackage.js", diff --git a/packages/analytics/tsconfig.json b/packages/analytics/tsconfig.json index 33d84b1b31..e536cc9704 100644 --- a/packages/analytics/tsconfig.json +++ b/packages/analytics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "include": ["src/**/*", "package.json"], "compilerOptions": { "outDir": "libDev" }, "references": [ diff --git a/packages/auth-server/tsconfig.json b/packages/auth-server/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/auth-server/tsconfig.json +++ b/packages/auth-server/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/blockchain-link-types/tsconfig.json b/packages/blockchain-link-types/tsconfig.json index c19246de06..7954b4991c 100644 --- a/packages/blockchain-link-types/tsconfig.json +++ b/packages/blockchain-link-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../type-utils" }, diff --git a/packages/blockchain-link-utils/tsconfig.json b/packages/blockchain-link-utils/tsconfig.json index b5549b9e19..5c0c3c97f0 100644 --- a/packages/blockchain-link-utils/tsconfig.json +++ b/packages/blockchain-link-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../utils" }, diff --git a/packages/blockchain-link/tsconfig.json b/packages/blockchain-link/tsconfig.json index e74e63eb9a..223a2160e4 100644 --- a/packages/blockchain-link/tsconfig.json +++ b/packages/blockchain-link/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev", "lib": ["webworker"], diff --git a/packages/coinjoin/package.json b/packages/coinjoin/package.json index 2daefb0825..e92260f328 100644 --- a/packages/coinjoin/package.json +++ b/packages/coinjoin/package.json @@ -16,7 +16,7 @@ "sideEffects": false, "main": "src/index.ts", "scripts": { - "lint": "eslint '**/*.{ts,js}'", + "lint:js": "eslint '**/*.{ts,js}'", "test:unit": "jest --version && jest", "test:discovery": "tsx ./tests/tools/discovery-test.ts", "test:anonymity": "tsx ./tests/tools/anonymity-test.ts", diff --git a/packages/coinjoin/tsconfig.json b/packages/coinjoin/tsconfig.json index 27939077a1..5a6ff6da88 100644 --- a/packages/coinjoin/tsconfig.json +++ b/packages/coinjoin/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../blockchain-link" }, diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index 56278a580e..d980c3a0c4 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "paths": { "@trezor/theme": [ diff --git a/packages/connect-analytics/tsconfig.json b/packages/connect-analytics/tsconfig.json index c11af4b25b..47d830c8ed 100644 --- a/packages/connect-analytics/tsconfig.json +++ b/packages/connect-analytics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../analytics" }] } diff --git a/packages/connect-common/tsconfig.json b/packages/connect-common/tsconfig.json index 7b14026a54..22d99c463d 100644 --- a/packages/connect-common/tsconfig.json +++ b/packages/connect-common/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [ diff --git a/packages/connect-examples/electron-main-process/tsconfig.json b/packages/connect-examples/electron-main-process/tsconfig.json index c163e94db5..2f2029a0f6 100644 --- a/packages/connect-examples/electron-main-process/tsconfig.json +++ b/packages/connect-examples/electron-main-process/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [{ "path": "../../connect" }] diff --git a/packages/connect-examples/electron-renderer-with-assets/tsconfig.json b/packages/connect-examples/electron-renderer-with-assets/tsconfig.json index c163e94db5..2f2029a0f6 100644 --- a/packages/connect-examples/electron-renderer-with-assets/tsconfig.json +++ b/packages/connect-examples/electron-renderer-with-assets/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [{ "path": "../../connect" }] diff --git a/packages/connect-examples/electron-renderer-with-popup/tsconfig.json b/packages/connect-examples/electron-renderer-with-popup/tsconfig.json index ddf83aad39..de4bd65a31 100644 --- a/packages/connect-examples/electron-renderer-with-popup/tsconfig.json +++ b/packages/connect-examples/electron-renderer-with-popup/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [] diff --git a/packages/connect-examples/node/tsconfig.json b/packages/connect-examples/node/tsconfig.json index c163e94db5..2f2029a0f6 100644 --- a/packages/connect-examples/node/tsconfig.json +++ b/packages/connect-examples/node/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [{ "path": "../../connect" }] diff --git a/packages/connect-explorer-webextension/tsconfig.json b/packages/connect-explorer-webextension/tsconfig.json index b134f16233..a5ad699318 100644 --- a/packages/connect-explorer-webextension/tsconfig.json +++ b/packages/connect-explorer-webextension/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev", "types": ["web", "node"] @@ -8,10 +8,5 @@ "references": [ { "path": "../connect-explorer" }, { "path": "../connect-web" } - ], - "ts-node": { - "compilerOptions": { - "module": "CommonJS" - } - } + ] } diff --git a/packages/connect-explorer/tsconfig.json b/packages/connect-explorer/tsconfig.json index c6bb596b4a..3537ac512a 100644 --- a/packages/connect-explorer/tsconfig.json +++ b/packages/connect-explorer/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "types": ["chrome"], "noImplicitAny": false, @@ -16,10 +16,5 @@ { "path": "../connect-webextension" }, { "path": "../protobuf" }, { "path": "../utils" } - ], - "ts-node": { - "compilerOptions": { - "module": "CommonJS" - } - } + ] } diff --git a/packages/connect-iframe/tsconfig.json b/packages/connect-iframe/tsconfig.json index aad912387b..b85b5eb4b9 100644 --- a/packages/connect-iframe/tsconfig.json +++ b/packages/connect-iframe/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev", "types": ["web", "w3c-web-usb", "jest"] @@ -10,10 +10,5 @@ { "path": "../connect-analytics" }, { "path": "../connect-common" }, { "path": "../env-utils" } - ], - "ts-node": { - "compilerOptions": { - "module": "CommonJS" - } - } + ] } diff --git a/packages/connect-plugin-ethereum/tsconfig.json b/packages/connect-plugin-ethereum/tsconfig.json index 6c188b64a9..b5d4399fca 100644 --- a/packages/connect-plugin-ethereum/tsconfig.json +++ b/packages/connect-plugin-ethereum/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "skipLibCheck": false, "outDir": "./libDev" diff --git a/packages/connect-plugin-stellar/tsconfig.json b/packages/connect-plugin-stellar/tsconfig.json index 36620368e0..7646d349e1 100644 --- a/packages/connect-plugin-stellar/tsconfig.json +++ b/packages/connect-plugin-stellar/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [] diff --git a/packages/connect-popup/tsconfig.json b/packages/connect-popup/tsconfig.json index 37bee2c29a..cf08ba9867 100644 --- a/packages/connect-popup/tsconfig.json +++ b/packages/connect-popup/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev", "types": ["web", "w3c-web-usb", "jest"] @@ -19,10 +19,5 @@ { "path": "../node-utils" }, { "path": "../trezor-user-env-link" }, { "path": "../utils" } - ], - "ts-node": { - "compilerOptions": { - "module": "CommonJS" - } - } + ] } diff --git a/packages/connect-ui/tsconfig.json b/packages/connect-ui/tsconfig.json index 3a0fab7843..4f61d80522 100644 --- a/packages/connect-ui/tsconfig.json +++ b/packages/connect-ui/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../components" }, diff --git a/packages/connect-web/tsconfig.json b/packages/connect-web/tsconfig.json index 0a55d76894..0964a9dab6 100644 --- a/packages/connect-web/tsconfig.json +++ b/packages/connect-web/tsconfig.json @@ -1,6 +1,8 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { + "module": "commonjs", + "moduleResolution": "node", "outDir": "libDev", "types": [ "chrome", diff --git a/packages/connect-webextension/tsconfig.json b/packages/connect-webextension/tsconfig.json index 591d6b7b9f..fc1b43afa2 100644 --- a/packages/connect-webextension/tsconfig.json +++ b/packages/connect-webextension/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "isolatedModules": false, "outDir": "./lib", diff --git a/packages/connect/package.json b/packages/connect/package.json index febbf8e673..ff9cfa0e89 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -43,8 +43,8 @@ "version:patch": "tsx scripts/bump-version.ts patch", "version:minor": "tsx scripts/bump-version.ts minor", "version:major": "tsx scripts/bump-version.ts major", - "test:e2e:web": "ts-node -O '{\"module\": \"commonjs\"}' ./e2e/run.ts web", - "test:e2e:node": "ts-node -O '{\"module\": \"commonjs\"}' ./e2e/run.ts node", + "test:e2e:web": "ts-node -O '{\"module\": \"commonjs\", \"moduleResolution\": \"node\"}' ./e2e/run.ts web", + "test:e2e:node": "ts-node -O '{\"module\": \"commonjs\", \"moduleResolution\": \"node\"}' ./e2e/run.ts node", "prepublishOnly": "yarn tsx ../../scripts/prepublishNPM.js", "prepublish": "yarn tsx ../../scripts/prepublish.js" }, diff --git a/packages/connect/tsconfig.json b/packages/connect/tsconfig.json index d62138bc00..fcf00c9c96 100644 --- a/packages/connect/tsconfig.json +++ b/packages/connect/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "outDir": "libDev", - "composite": true + "outDir": "libDev" }, "references": [ { "path": "../blockchain-link" }, diff --git a/packages/crypto-utils/tsconfig.json b/packages/crypto-utils/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/crypto-utils/tsconfig.json +++ b/packages/crypto-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/device-utils/tsconfig.json b/packages/device-utils/tsconfig.json index 9d4dbecebb..a2757ca7a1 100644 --- a/packages/device-utils/tsconfig.json +++ b/packages/device-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../connect" }] } diff --git a/packages/dom-utils/tsconfig.json b/packages/dom-utils/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/dom-utils/tsconfig.json +++ b/packages/dom-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/e2e-utils/tsconfig.json b/packages/e2e-utils/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/e2e-utils/tsconfig.json +++ b/packages/e2e-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/env-utils/tsconfig.json b/packages/env-utils/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/env-utils/tsconfig.json +++ b/packages/env-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/ipc-proxy/package.json b/packages/ipc-proxy/package.json index 7b8a783f10..0dfeb189ce 100644 --- a/packages/ipc-proxy/package.json +++ b/packages/ipc-proxy/package.json @@ -16,7 +16,7 @@ "main": "src/index", "browser": "src/proxy", "scripts": { - "lint": "eslint '**/*.{ts,tsx,js}'", + "lint:js": "eslint '**/*.{ts,tsx,js}'", "test:unit": "jest -c ./jest.config.js", "type-check": "tsc --build" } diff --git a/packages/ipc-proxy/tsconfig.json b/packages/ipc-proxy/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/ipc-proxy/tsconfig.json +++ b/packages/ipc-proxy/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/node-utils/tsconfig.json b/packages/node-utils/tsconfig.json index 8291c924cb..f7287dcec1 100644 --- a/packages/node-utils/tsconfig.json +++ b/packages/node-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "skipLibCheck": false, "outDir": "libDev" diff --git a/packages/protobuf/tsconfig.json b/packages/protobuf/tsconfig.json index 6a034e1d9b..e84962f194 100644 --- a/packages/protobuf/tsconfig.json +++ b/packages/protobuf/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "include": ["src"], "references": [{ "path": "../schema-utils" }] diff --git a/packages/protocol/tsconfig.json b/packages/protocol/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/protocol/tsconfig.json +++ b/packages/protocol/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/react-native-usb/tsconfig.json b/packages/react-native-usb/tsconfig.json index 36620368e0..7646d349e1 100644 --- a/packages/react-native-usb/tsconfig.json +++ b/packages/react-native-usb/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [] diff --git a/packages/react-utils/tsconfig.json b/packages/react-utils/tsconfig.json index c008fd3329..cecfc5cd0e 100644 --- a/packages/react-utils/tsconfig.json +++ b/packages/react-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../type-utils" }, diff --git a/packages/request-manager/tsconfig.json b/packages/request-manager/tsconfig.json index dcd631dd16..aa3d19f8ee 100644 --- a/packages/request-manager/tsconfig.json +++ b/packages/request-manager/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "skipLibCheck": false, "outDir": "libDev" diff --git a/packages/schema-utils/tsconfig.json b/packages/schema-utils/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/schema-utils/tsconfig.json +++ b/packages/schema-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/styles/tsconfig.json b/packages/styles/tsconfig.json index 5a86b53cf4..6d2ce1fee2 100644 --- a/packages/styles/tsconfig.json +++ b/packages/styles/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "noImplicitAny": false, "outDir": "libDev" diff --git a/packages/suite-analytics/tsconfig.json b/packages/suite-analytics/tsconfig.json index c11af4b25b..47d830c8ed 100644 --- a/packages/suite-analytics/tsconfig.json +++ b/packages/suite-analytics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../analytics" }] } diff --git a/packages/suite-build/tsconfig.json b/packages/suite-build/tsconfig.json index 1c0b51561e..ec831118d0 100644 --- a/packages/suite-build/tsconfig.json +++ b/packages/suite-build/tsconfig.json @@ -1,9 +1,6 @@ { - "extends": "../../tsconfig.json", - "compilerOptions": { - "module": "commonjs", - "outDir": "./libDev" - }, + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "./libDev" }, "include": ["."], "references": [ { diff --git a/packages/suite-data/tsconfig.json b/packages/suite-data/tsconfig.json index 733e570d62..73d74790b8 100644 --- a/packages/suite-data/tsconfig.json +++ b/packages/suite-data/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "module": "commonjs", "noImplicitAny": false, "outDir": "./libDev" }, diff --git a/packages/suite-desktop-api/tsconfig.json b/packages/suite-desktop-api/tsconfig.json index 03cf1f994e..dc0b5e09fa 100644 --- a/packages/suite-desktop-api/tsconfig.json +++ b/packages/suite-desktop-api/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "noImplicitAny": false, "esModuleInterop": false, diff --git a/packages/suite-desktop-core/package.json b/packages/suite-desktop-core/package.json index 20b6333713..a2fac172b8 100644 --- a/packages/suite-desktop-core/package.json +++ b/packages/suite-desktop-core/package.json @@ -9,7 +9,7 @@ "scripts": { "build:core": "rimraf dist && TS_NODE_PROJECT=\"tsconfig.json\" yarn webpack --config ./webpack/core.webpack.config.ts", "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'", - "type-check": "tsc --build tsconfig.json && tsc --build scripts/tsconfig.json", + "type-check": "tsc --build tsconfig.json", "test:unit": "jest", "test:e2e": "yarn xvfb-maybe -- playwright test --config=./e2e/playwright.config.ts" }, diff --git a/packages/suite-desktop-core/scripts/notarize.ts b/packages/suite-desktop-core/scripts/notarize.ts index 22c874f30a..6edf13dfe7 100644 --- a/packages/suite-desktop-core/scripts/notarize.ts +++ b/packages/suite-desktop-core/scripts/notarize.ts @@ -3,7 +3,6 @@ const { notarize } = require('@electron/notarize'); -// @ts-expect-error cannot import AfterPackContext as type using require exports.default = context => { const { electronPlatformName, appOutDir } = context; diff --git a/packages/suite-desktop-core/scripts/tsconfig.json b/packages/suite-desktop-core/scripts/tsconfig.json deleted file mode 100644 index 8351c4c2df..0000000000 --- a/packages/suite-desktop-core/scripts/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../../tsconfig.json", - "compilerOptions": { - "isolatedModules": false, - "outDir": "../libDev/scripts" - }, - "include": [""], - "references": [ - { "path": "../../suite-desktop" } - ] -} diff --git a/packages/suite-desktop-core/src/tsconfig.json b/packages/suite-desktop-core/src/tsconfig.json index 5806c913e8..32ecb60ae9 100644 --- a/packages/suite-desktop-core/src/tsconfig.json +++ b/packages/suite-desktop-core/src/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "watch": false, "preserveWatchOutput": true, @@ -7,8 +7,6 @@ "noEmit": false, "jsx": "preserve", "target": "esnext", - "module": "commonjs", - "moduleResolution": "node", "sourceMap": true, "lib": [ "dom", diff --git a/packages/suite-desktop-core/tsconfig.json b/packages/suite-desktop-core/tsconfig.json index 517b19f151..c0f7ff80c9 100644 --- a/packages/suite-desktop-core/tsconfig.json +++ b/packages/suite-desktop-core/tsconfig.json @@ -1,7 +1,8 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "module": "commonjs", + "moduleResolution": "node", "outDir": "libDev" }, "include": ["src", "e2e", "**/*.json"], diff --git a/packages/suite-desktop-ui/tsconfig.json b/packages/suite-desktop-ui/tsconfig.json index 4d5141aa85..404106499a 100644 --- a/packages/suite-desktop-ui/tsconfig.json +++ b/packages/suite-desktop-ui/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev", "baseUrl": "../suite" diff --git a/packages/suite-desktop/tsconfig.json b/packages/suite-desktop/tsconfig.json index 42b553e58c..e164b4a362 100644 --- a/packages/suite-desktop/tsconfig.json +++ b/packages/suite-desktop/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { - "module": "commonjs", "outDir": "./libDev" }, "include": ["./src", "./e2e", "**/*.json"], diff --git a/packages/suite-storage/tsconfig.json b/packages/suite-storage/tsconfig.json index a0ae50f64c..996ae22532 100644 --- a/packages/suite-storage/tsconfig.json +++ b/packages/suite-storage/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "include": [".", "**/*.json"], "references": [{ "path": "../env-utils" }] diff --git a/packages/suite-web/tsconfig.json b/packages/suite-web/tsconfig.json index dba6ac4d53..853bf2ae10 100644 --- a/packages/suite-web/tsconfig.json +++ b/packages/suite-web/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev", "baseUrl": "../suite" diff --git a/packages/suite/tsconfig.json b/packages/suite/tsconfig.json index 12095a42ba..aa18a5849d 100644 --- a/packages/suite/tsconfig.json +++ b/packages/suite/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "plugins": [ { diff --git a/packages/theme/tsconfig.json b/packages/theme/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/theme/tsconfig.json +++ b/packages/theme/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/transport-bridge/tsconfig.json b/packages/transport-bridge/tsconfig.json index 2410ef8213..92994d82ef 100644 --- a/packages/transport-bridge/tsconfig.json +++ b/packages/transport-bridge/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../node-utils" }, diff --git a/packages/transport-native/tsconfig.json b/packages/transport-native/tsconfig.json index f126b3f819..c66b846810 100644 --- a/packages/transport-native/tsconfig.json +++ b/packages/transport-native/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../react-native-usb" }, diff --git a/packages/transport/tsconfig.json b/packages/transport/tsconfig.json index b81621d554..43106de236 100644 --- a/packages/transport/tsconfig.json +++ b/packages/transport/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev", "types": ["w3c-web-usb", "jest", "node"] diff --git a/packages/trezor-user-env-link/tsconfig.json b/packages/trezor-user-env-link/tsconfig.json index bdf1182bb8..0ec4519c33 100644 --- a/packages/trezor-user-env-link/tsconfig.json +++ b/packages/trezor-user-env-link/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../utils" }] } diff --git a/packages/type-utils/tsconfig.json b/packages/type-utils/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/type-utils/tsconfig.json +++ b/packages/type-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/urls/tsconfig.json b/packages/urls/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/packages/urls/tsconfig.json +++ b/packages/urls/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 6c188b64a9..b5d4399fca 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "skipLibCheck": false, "outDir": "./libDev" diff --git a/packages/utxo-lib/tsconfig.json b/packages/utxo-lib/tsconfig.json index 5feb95e601..dfe155de79 100644 --- a/packages/utxo-lib/tsconfig.json +++ b/packages/utxo-lib/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "skipLibCheck": false, "outDir": "./libDev" diff --git a/scripts/package-template/tsconfig.json b/scripts/package-template/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/scripts/package-template/tsconfig.json +++ b/scripts/package-template/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/scripts/package.json b/scripts/package.json index b4f119b795..d734a9c50c 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -2,7 +2,6 @@ "name": "@trezor/scripts", "version": "1.0.0", "private": true, - "type": "module", "scripts": { "type-check": "tsc --build", "run:analytics": "tsx githubAnalytics.ts" diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 6dacbf2542..d08528cac2 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "include": [".", "**/*.json"], "references": [] diff --git a/scripts/updateProjectReferences.js b/scripts/updateProjectReferences.ts similarity index 75% rename from scripts/updateProjectReferences.js rename to scripts/updateProjectReferences.ts index 431b290f51..9eaf153d0e 100644 --- a/scripts/updateProjectReferences.js +++ b/scripts/updateProjectReferences.ts @@ -9,23 +9,26 @@ import chalk from 'chalk'; import { getWorkspacesList } from './utils/getWorkspacesList'; import { getPrettierConfig } from './utils/getPrettierConfig'; +const rootTsConfigLocation = path.join(__dirname, '..', 'tsconfig.json'); + (async () => { const { argv } = yargs(hideBin(process.argv)) .array('read-only') .array('ignore') .array('typings') - .boolean('test'); + .boolean('test') as any; const readOnlyGlobs = argv.readOnly || []; const ignoreGlobs = argv.ignore || []; const typingPaths = argv.typings || []; const isTesting = argv.test || false; - const nextRootReferences = []; + const rootConfig = JSON.parse(fs.readFileSync(rootTsConfigLocation).toString()); + const nextRootReferences: { path: string }[] = []; const prettierConfig = await getPrettierConfig(); - const serializeConfig = config => { + const serializeConfig = (config: any) => { try { return prettier.format(JSON.stringify(config).replace(/\\\\/g, '/'), prettierConfig); } catch (error) { @@ -42,7 +45,12 @@ import { getPrettierConfig } from './utils/getPrettierConfig'; .forEach(async workspaceName => { const workspace = workspaces[workspaceName]; - if (ignoreGlobs.some(path => minimatch(workspace.location, path))) { + if (workspace.location === '.') { + // Skip root workspace + return; + } + + if (ignoreGlobs.some((path: string) => minimatch(workspace.location, path))) { return; } @@ -69,7 +77,7 @@ import { getPrettierConfig } from './utils/getPrettierConfig'; process.exit(1); } - const nextWorkspaceReferences = typingPaths.map(typingPath => ({ + const nextWorkspaceReferences = typingPaths.map((typingPath: string) => ({ path: path.relative(workspacePath, path.resolve(process.cwd(), typingPath)), })); @@ -108,8 +116,28 @@ import { getPrettierConfig } from './utils/getPrettierConfig'; workspaceConfig.references = nextWorkspaceReferences; - if (!readOnlyGlobs.some(path => minimatch(workspace.location, path))) { + if (!readOnlyGlobs.some((path: string) => minimatch(workspace.location, path))) { fs.writeFileSync(workspaceConfigPath, await serializeConfig(workspaceConfig)); } }); + + if (isTesting) { + if ( + (await serializeConfig(rootConfig.references)) !== + (await serializeConfig(nextRootReferences)) + ) { + console.error( + `TypeScript project references in root tsconfig.json are inconsistent.`, + `Run "yarn update-project-references" to fix them.`, + ); + + process.exit(1); + } + + return; + } + + rootConfig.references = nextRootReferences; + + fs.writeFileSync(rootTsConfigLocation, await serializeConfig(rootConfig)); })(); diff --git a/scripts/utils/getWorkspacesList.ts b/scripts/utils/getWorkspacesList.ts index 0a13e81b94..575ae9fde1 100644 --- a/scripts/utils/getWorkspacesList.ts +++ b/scripts/utils/getWorkspacesList.ts @@ -1,8 +1,6 @@ -import tsBelt from '@mobily/ts-belt'; +import { A, D, pipe } from '@mobily/ts-belt'; import { execSync } from 'child_process'; -const { A, D, pipe } = tsBelt; - type WorkspacePackageName = string; type WorkspaceItem = { location: string; diff --git a/suite-common/analytics/tsconfig.json b/suite-common/analytics/tsconfig.json index d1b696374c..2d0742d8e0 100644 --- a/suite-common/analytics/tsconfig.json +++ b/suite-common/analytics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../redux-utils" }] } diff --git a/suite-common/assets/tsconfig.json b/suite-common/assets/tsconfig.json index 8e5b6dd48a..7a413b4b2e 100644 --- a/suite-common/assets/tsconfig.json +++ b/suite-common/assets/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../wallet-config" }] } diff --git a/suite-common/connect-init/tsconfig.json b/suite-common/connect-init/tsconfig.json index 52ca617d2f..4ebbf67b59 100644 --- a/suite-common/connect-init/tsconfig.json +++ b/suite-common/connect-init/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../redux-utils" }, diff --git a/suite-common/device-authenticity/tsconfig.json b/suite-common/device-authenticity/tsconfig.json index 66b9a3386d..aba3b29b93 100644 --- a/suite-common/device-authenticity/tsconfig.json +++ b/suite-common/device-authenticity/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../redux-utils" }, diff --git a/suite-common/fiat-services/tsconfig.json b/suite-common/fiat-services/tsconfig.json index 8ea566b3c5..485110df02 100644 --- a/suite-common/fiat-services/tsconfig.json +++ b/suite-common/fiat-services/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../suite-config" }, diff --git a/suite-common/formatters/tsconfig.json b/suite-common/formatters/tsconfig.json index a01eac6dc8..e0dbd92f89 100644 --- a/suite-common/formatters/tsconfig.json +++ b/suite-common/formatters/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../suite-config" }, diff --git a/suite-common/graph/tsconfig.json b/suite-common/graph/tsconfig.json index bb143e0719..469f170d89 100644 --- a/suite-common/graph/tsconfig.json +++ b/suite-common/graph/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../fiat-services" }, diff --git a/suite-common/icons/tsconfig.json b/suite-common/icons/tsconfig.json index 401ccd3839..f9effd78ef 100644 --- a/suite-common/icons/tsconfig.json +++ b/suite-common/icons/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../wallet-config" }, diff --git a/suite-common/intl-types/tsconfig.json b/suite-common/intl-types/tsconfig.json index 9dbf6f8ffc..2a0d41c8ac 100644 --- a/suite-common/intl-types/tsconfig.json +++ b/suite-common/intl-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev", "rootDir": "../../../" diff --git a/suite-common/invity/tsconfig.json b/suite-common/invity/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-common/invity/tsconfig.json +++ b/suite-common/invity/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-common/logger/tsconfig.json b/suite-common/logger/tsconfig.json index 472ef28cdb..d73853f9bd 100644 --- a/suite-common/logger/tsconfig.json +++ b/suite-common/logger/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../redux-utils" }, diff --git a/suite-common/message-system/tsconfig.json b/suite-common/message-system/tsconfig.json index 492f6b5fd9..09fd16050c 100644 --- a/suite-common/message-system/tsconfig.json +++ b/suite-common/message-system/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../redux-utils" }, diff --git a/suite-common/metadata-types/tsconfig.json b/suite-common/metadata-types/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-common/metadata-types/tsconfig.json +++ b/suite-common/metadata-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-common/redux-utils/tsconfig.json b/suite-common/redux-utils/tsconfig.json index dd728c5f69..aadb8f1311 100644 --- a/suite-common/redux-utils/tsconfig.json +++ b/suite-common/redux-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../suite-config" }, diff --git a/suite-common/sentry/tsconfig.json b/suite-common/sentry/tsconfig.json index 01e280cad0..1c6ccc3398 100644 --- a/suite-common/sentry/tsconfig.json +++ b/suite-common/sentry/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../suite-utils" }, diff --git a/suite-common/suite-config/tsconfig.json b/suite-common/suite-config/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-common/suite-config/tsconfig.json +++ b/suite-common/suite-config/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-common/suite-constants/tsconfig.json b/suite-common/suite-constants/tsconfig.json index 2c56e65c46..c9f99de72a 100644 --- a/suite-common/suite-constants/tsconfig.json +++ b/suite-common/suite-constants/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../wallet-config" }, diff --git a/suite-common/suite-types/tsconfig.json b/suite-common/suite-types/tsconfig.json index 7f9de63daf..ddf9467ecb 100644 --- a/suite-common/suite-types/tsconfig.json +++ b/suite-common/suite-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../metadata-types" }, diff --git a/suite-common/suite-utils/tsconfig.json b/suite-common/suite-utils/tsconfig.json index 1cb7594540..7bb1010ef5 100644 --- a/suite-common/suite-utils/tsconfig.json +++ b/suite-common/suite-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../suite-config" }, diff --git a/suite-common/test-utils/tsconfig.json b/suite-common/test-utils/tsconfig.json index db375426b4..80f767c72a 100644 --- a/suite-common/test-utils/tsconfig.json +++ b/suite-common/test-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../redux-utils" }, diff --git a/suite-common/toast-notifications/tsconfig.json b/suite-common/toast-notifications/tsconfig.json index 0883c4db25..4f0a02323b 100644 --- a/suite-common/toast-notifications/tsconfig.json +++ b/suite-common/toast-notifications/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../intl-types" }, diff --git a/suite-common/transaction-cache-engine/tsconfig.json b/suite-common/transaction-cache-engine/tsconfig.json index e0e5aa9edb..a6b6ef82f7 100644 --- a/suite-common/transaction-cache-engine/tsconfig.json +++ b/suite-common/transaction-cache-engine/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev", "noUncheckedIndexedAccess": true, diff --git a/suite-common/validators/tsconfig.json b/suite-common/validators/tsconfig.json index 4271609e1f..fc2eac0d27 100644 --- a/suite-common/validators/tsconfig.json +++ b/suite-common/validators/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../wallet-config" }, diff --git a/suite-common/wallet-config/tsconfig.json b/suite-common/wallet-config/tsconfig.json index d36bc0c733..273ba994a8 100644 --- a/suite-common/wallet-config/tsconfig.json +++ b/suite-common/wallet-config/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../intl-types" }, diff --git a/suite-common/wallet-constants/tsconfig.json b/suite-common/wallet-constants/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-common/wallet-constants/tsconfig.json +++ b/suite-common/wallet-constants/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-common/wallet-core/tsconfig.json b/suite-common/wallet-core/tsconfig.json index 08c21f2a9f..157c6bae1c 100644 --- a/suite-common/wallet-core/tsconfig.json +++ b/suite-common/wallet-core/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../device-authenticity" }, diff --git a/suite-common/wallet-types/tsconfig.json b/suite-common/wallet-types/tsconfig.json index 2a32c5418a..745ee3f195 100644 --- a/suite-common/wallet-types/tsconfig.json +++ b/suite-common/wallet-types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../intl-types" }, diff --git a/suite-common/wallet-utils/tsconfig.json b/suite-common/wallet-utils/tsconfig.json index 4888d9d790..ab380b1297 100644 --- a/suite-common/wallet-utils/tsconfig.json +++ b/suite-common/wallet-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "include": [".", "**/*.json"], "references": [ diff --git a/suite-native/accounts/tsconfig.json b/suite-native/accounts/tsconfig.json index da7f4f74bc..6a1218e0f2 100644 --- a/suite-native/accounts/tsconfig.json +++ b/suite-native/accounts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/alerts/tsconfig.json b/suite-native/alerts/tsconfig.json index 5ac38991f1..9dbe551fff 100644 --- a/suite-native/alerts/tsconfig.json +++ b/suite-native/alerts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/analytics/tsconfig.json b/suite-native/analytics/tsconfig.json index e20c33ac0c..f77955430c 100644 --- a/suite-native/analytics/tsconfig.json +++ b/suite-native/analytics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/app/tsconfig.json b/suite-native/app/tsconfig.json index ba9e6848b3..a9c16ce18c 100644 --- a/suite-native/app/tsconfig.json +++ b/suite-native/app/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "./libDev" }, "references": [ { diff --git a/suite-native/assets/tsconfig.json b/suite-native/assets/tsconfig.json index 12a5c428fb..7053f46466 100644 --- a/suite-native/assets/tsconfig.json +++ b/suite-native/assets/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/assets" }, diff --git a/suite-native/atoms/tsconfig.json b/suite-native/atoms/tsconfig.json index c7d45d7f2f..d82b735bd5 100644 --- a/suite-native/atoms/tsconfig.json +++ b/suite-native/atoms/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/biometrics/tsconfig.json b/suite-native/biometrics/tsconfig.json index d226523e18..ab193e4d60 100644 --- a/suite-native/biometrics/tsconfig.json +++ b/suite-native/biometrics/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/blockchain/tsconfig.json b/suite-native/blockchain/tsconfig.json index 8ef6fd10ed..21eddd03c8 100644 --- a/suite-native/blockchain/tsconfig.json +++ b/suite-native/blockchain/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/config/tsconfig.json b/suite-native/config/tsconfig.json index 3b0c925a0c..18f7dc8a7e 100644 --- a/suite-native/config/tsconfig.json +++ b/suite-native/config/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/device-manager/tsconfig.json b/suite-native/device-manager/tsconfig.json index 52ddffc758..236bb644d8 100644 --- a/suite-native/device-manager/tsconfig.json +++ b/suite-native/device-manager/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/device-mutex/tsconfig.json b/suite-native/device-mutex/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-native/device-mutex/tsconfig.json +++ b/suite-native/device-mutex/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-native/device/tsconfig.json b/suite-native/device/tsconfig.json index 3c8dc45ab0..5923a1fffe 100644 --- a/suite-native/device/tsconfig.json +++ b/suite-native/device/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/discovery/tsconfig.json b/suite-native/discovery/tsconfig.json index 6deae40718..069ed56ff7 100644 --- a/suite-native/discovery/tsconfig.json +++ b/suite-native/discovery/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/ethereum-tokens/tsconfig.json b/suite-native/ethereum-tokens/tsconfig.json index 734d1e2065..c0117a39a1 100644 --- a/suite-native/ethereum-tokens/tsconfig.json +++ b/suite-native/ethereum-tokens/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/feature-flags/tsconfig.json b/suite-native/feature-flags/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-native/feature-flags/tsconfig.json +++ b/suite-native/feature-flags/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-native/fiat-rates/tsconfig.json b/suite-native/fiat-rates/tsconfig.json index ebd520f1c9..7a3a52f4ea 100644 --- a/suite-native/fiat-rates/tsconfig.json +++ b/suite-native/fiat-rates/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/formatters/tsconfig.json b/suite-native/formatters/tsconfig.json index 7f703d6cf9..e5ae03925c 100644 --- a/suite-native/formatters/tsconfig.json +++ b/suite-native/formatters/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/forms/tsconfig.json b/suite-native/forms/tsconfig.json index 5e8078d7ae..05f8d5ed12 100644 --- a/suite-native/forms/tsconfig.json +++ b/suite-native/forms/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [{ "path": "../atoms" }] } diff --git a/suite-native/graph/tsconfig.json b/suite-native/graph/tsconfig.json index ce61c3b4fd..44d5d28401 100644 --- a/suite-native/graph/tsconfig.json +++ b/suite-native/graph/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/helpers/tsconfig.json b/suite-native/helpers/tsconfig.json index 87aff4643e..935095a8ba 100644 --- a/suite-native/helpers/tsconfig.json +++ b/suite-native/helpers/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../toasts" }, diff --git a/suite-native/intl/tsconfig.json b/suite-native/intl/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-native/intl/tsconfig.json +++ b/suite-native/intl/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-native/link/tsconfig.json b/suite-native/link/tsconfig.json index 5252cccda9..52899895bb 100644 --- a/suite-native/link/tsconfig.json +++ b/suite-native/link/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../toasts" }, diff --git a/suite-native/message-system/tsconfig.json b/suite-native/message-system/tsconfig.json index f794dfed5e..e477035708 100644 --- a/suite-native/message-system/tsconfig.json +++ b/suite-native/message-system/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/module-accounts-import/tsconfig.json b/suite-native/module-accounts-import/tsconfig.json index f77d5024c4..d81991a8d8 100644 --- a/suite-native/module-accounts-import/tsconfig.json +++ b/suite-native/module-accounts-import/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/module-accounts-management/tsconfig.json b/suite-native/module-accounts-management/tsconfig.json index f822d2328b..c476992a1f 100644 --- a/suite-native/module-accounts-management/tsconfig.json +++ b/suite-native/module-accounts-management/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/module-add-accounts/tsconfig.json b/suite-native/module-add-accounts/tsconfig.json index 819d77c8ef..e8e382c066 100644 --- a/suite-native/module-add-accounts/tsconfig.json +++ b/suite-native/module-add-accounts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "noImplicitAny": false, "outDir": "libDev" diff --git a/suite-native/module-connect-device/tsconfig.json b/suite-native/module-connect-device/tsconfig.json index 1871ec0c3c..5dec5a25e8 100644 --- a/suite-native/module-connect-device/tsconfig.json +++ b/suite-native/module-connect-device/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/module-dev-utils/tsconfig.json b/suite-native/module-dev-utils/tsconfig.json index a38b5f5a75..ed69d42d4c 100644 --- a/suite-native/module-dev-utils/tsconfig.json +++ b/suite-native/module-dev-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/module-home/tsconfig.json b/suite-native/module-home/tsconfig.json index e33df6c0fc..df523a8c74 100644 --- a/suite-native/module-home/tsconfig.json +++ b/suite-native/module-home/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/module-onboarding/tsconfig.json b/suite-native/module-onboarding/tsconfig.json index 269ad0e31c..929d505d0d 100644 --- a/suite-native/module-onboarding/tsconfig.json +++ b/suite-native/module-onboarding/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/module-receive/tsconfig.json b/suite-native/module-receive/tsconfig.json index 8075b3bfb2..0312c967d1 100644 --- a/suite-native/module-receive/tsconfig.json +++ b/suite-native/module-receive/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/module-settings/tsconfig.json b/suite-native/module-settings/tsconfig.json index 952c09447c..bcb09b3329 100644 --- a/suite-native/module-settings/tsconfig.json +++ b/suite-native/module-settings/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/navigation/tsconfig.json b/suite-native/navigation/tsconfig.json index b29f1e2610..3bd13dbe0f 100644 --- a/suite-native/navigation/tsconfig.json +++ b/suite-native/navigation/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/notifications/tsconfig.json b/suite-native/notifications/tsconfig.json index 78d384108f..a5a3136359 100644 --- a/suite-native/notifications/tsconfig.json +++ b/suite-native/notifications/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/passphrase/tsconfig.json b/suite-native/passphrase/tsconfig.json index 98b74da3eb..ee070481a9 100644 --- a/suite-native/passphrase/tsconfig.json +++ b/suite-native/passphrase/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/qr-code/tsconfig.json b/suite-native/qr-code/tsconfig.json index 4767c16d3f..302eedfa36 100644 --- a/suite-native/qr-code/tsconfig.json +++ b/suite-native/qr-code/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/react-native-graph/tsconfig.json b/suite-native/react-native-graph/tsconfig.json index 4c175bbc3c..c7ebe855e2 100644 --- a/suite-native/react-native-graph/tsconfig.json +++ b/suite-native/react-native-graph/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [] } diff --git a/suite-native/receive/tsconfig.json b/suite-native/receive/tsconfig.json index 7f092ebca6..a1a72fae3f 100644 --- a/suite-native/receive/tsconfig.json +++ b/suite-native/receive/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/state/tsconfig.json b/suite-native/state/tsconfig.json index b6001afadb..1b4a6715db 100644 --- a/suite-native/state/tsconfig.json +++ b/suite-native/state/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/storage/tsconfig.json b/suite-native/storage/tsconfig.json index d1a536513a..cb061fc431 100644 --- a/suite-native/storage/tsconfig.json +++ b/suite-native/storage/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/test-utils/tsconfig.json b/suite-native/test-utils/tsconfig.json index 4a3f8d68b6..72138a1a55 100644 --- a/suite-native/test-utils/tsconfig.json +++ b/suite-native/test-utils/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../packages/styles" }, diff --git a/suite-native/theme/tsconfig.json b/suite-native/theme/tsconfig.json index 5e3845ebea..d1b3720556 100644 --- a/suite-native/theme/tsconfig.json +++ b/suite-native/theme/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../analytics" }, diff --git a/suite-native/toasts/tsconfig.json b/suite-native/toasts/tsconfig.json index 00dabc3775..274f237be2 100644 --- a/suite-native/toasts/tsconfig.json +++ b/suite-native/toasts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../../suite-common/icons" }, diff --git a/suite-native/transactions/tsconfig.json b/suite-native/transactions/tsconfig.json index e761707a03..926688838d 100644 --- a/suite-native/transactions/tsconfig.json +++ b/suite-native/transactions/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { diff --git a/suite-native/video-assets/tsconfig.json b/suite-native/video-assets/tsconfig.json index 90cb189b46..2c9c8232fd 100644 --- a/suite-native/video-assets/tsconfig.json +++ b/suite-native/video-assets/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "libDev" }, "references": [ { "path": "../atoms" }, diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000000..bfa60a343c --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,52 @@ +{ + "compilerOptions": { + "allowJs": true, + "allowSyntheticDefaultImports": true, + "allowUnreachableCode": false, + "baseUrl": ".", + "jsx": "preserve", + "module": "ESNext", + "moduleResolution": "Bundler", + "target": "esnext", + "removeComments": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "strictNullChecks": true, + "noErrorTruncation": true, + "noFallthroughCasesInSwitch": true, + "useUnknownInCatchVariables": false, + "resolveJsonModule": true, + "forceConsistentCasingInFileNames": true, + "isolatedModules": true, + "types": ["jest", "node"], + "esModuleInterop": true, + "composite": true, + "declaration": true, + "declarationMap": true, + "incremental": true, + "noEmitOnError": true, + "emitDeclarationOnly": true + }, + "exclude": [ + "**/node_modules", + "**/lib", + "**/libDev", + "**/build", + "**/build-electron", + "**/dist", + "**/coverage", + "**/public", + "**/protobuf-patches", + "**/trezor-common", + "**/jest.config.*js" + ], + "ts-node": { + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "node" + } + } +} diff --git a/tsconfig.json b/tsconfig.json index e73f30510d..ddf9136c43 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,48 +1,186 @@ { - "compilerOptions": { - "allowJs": true, - "allowSyntheticDefaultImports": true, - "allowUnreachableCode": false, - "baseUrl": ".", - "jsx": "preserve", - "module": "esnext", - "moduleResolution": "node", - "removeComments": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "strictNullChecks": true, - "target": "esnext", - "noErrorTruncation": true, - "noFallthroughCasesInSwitch": true, - "useUnknownInCatchVariables": false, - "resolveJsonModule": true, - "forceConsistentCasingInFileNames": true, - "isolatedModules": true, - "types": ["jest", "node"], - "esModuleInterop": true, - "composite": true, - "declaration": true, - "declarationMap": true, - "incremental": true, - "noEmit": false - }, - "exclude": [ - "**/node_modules", - "**/lib", - "**/libDev", - "**/build", - "**/build-electron", - "**/dist", - "**/coverage", - "**/public", - "**/protobuf-patches", - "**/trezor-common", - "**/jest.config.*js" - ], + "extends": "./tsconfig.base.json", + "files": [], "references": [ - { "path": "suite-common/wallet-types" } + { "path": "suite-common/analytics" }, + { "path": "suite-common/assets" }, + { "path": "suite-common/connect-init" }, + { + "path": "suite-common/device-authenticity" + }, + { "path": "suite-common/fiat-services" }, + { "path": "suite-common/formatters" }, + { "path": "suite-common/graph" }, + { "path": "suite-common/icons" }, + { "path": "suite-common/intl-types" }, + { "path": "suite-common/invity" }, + { "path": "suite-common/logger" }, + { "path": "suite-common/message-system" }, + { "path": "suite-common/metadata-types" }, + { "path": "suite-common/redux-utils" }, + { "path": "suite-common/sentry" }, + { "path": "suite-common/suite-config" }, + { + "path": "suite-common/suite-constants" + }, + { "path": "suite-common/suite-types" }, + { "path": "suite-common/suite-utils" }, + { "path": "suite-common/test-utils" }, + { + "path": "suite-common/toast-notifications" + }, + { + "path": "suite-common/transaction-cache-engine" + }, + { "path": "suite-common/validators" }, + { "path": "suite-common/wallet-config" }, + { + "path": "suite-common/wallet-constants" + }, + { "path": "suite-common/wallet-core" }, + { "path": "suite-common/wallet-types" }, + { "path": "suite-common/wallet-utils" }, + { "path": "suite-native/accounts" }, + { "path": "suite-native/alerts" }, + { "path": "suite-native/analytics" }, + { "path": "suite-native/app" }, + { "path": "suite-native/assets" }, + { "path": "suite-native/atoms" }, + { "path": "suite-native/biometrics" }, + { "path": "suite-native/blockchain" }, + { "path": "suite-native/config" }, + { "path": "suite-native/device" }, + { "path": "suite-native/device-manager" }, + { "path": "suite-native/device-mutex" }, + { "path": "suite-native/discovery" }, + { + "path": "suite-native/ethereum-tokens" + }, + { "path": "suite-native/feature-flags" }, + { "path": "suite-native/fiat-rates" }, + { "path": "suite-native/formatters" }, + { "path": "suite-native/forms" }, + { "path": "suite-native/graph" }, + { "path": "suite-native/helpers" }, + { "path": "suite-native/intl" }, + { "path": "suite-native/link" }, + { "path": "suite-native/message-system" }, + { + "path": "suite-native/module-accounts-import" + }, + { + "path": "suite-native/module-accounts-management" + }, + { + "path": "suite-native/module-add-accounts" + }, + { + "path": "suite-native/module-connect-device" + }, + { + "path": "suite-native/module-dev-utils" + }, + { "path": "suite-native/module-home" }, + { + "path": "suite-native/module-onboarding" + }, + { "path": "suite-native/module-receive" }, + { + "path": "suite-native/module-settings" + }, + { "path": "suite-native/navigation" }, + { "path": "suite-native/notifications" }, + { "path": "suite-native/passphrase" }, + { "path": "suite-native/qr-code" }, + { + "path": "suite-native/react-native-graph" + }, + { "path": "suite-native/receive" }, + { "path": "suite-native/state" }, + { "path": "suite-native/storage" }, + { "path": "suite-native/test-utils" }, + { "path": "suite-native/theme" }, + { "path": "suite-native/toasts" }, + { "path": "suite-native/transactions" }, + { "path": "suite-native/video-assets" }, + { "path": "packages/analytics" }, + { "path": "packages/auth-server" }, + { "path": "packages/blockchain-link" }, + { + "path": "packages/blockchain-link-types" + }, + { + "path": "packages/blockchain-link-utils" + }, + { "path": "packages/coinjoin" }, + { "path": "packages/components" }, + { "path": "packages/connect" }, + { "path": "packages/connect-analytics" }, + { "path": "packages/connect-common" }, + { "path": "packages/connect-explorer" }, + { + "path": "packages/connect-explorer-webextension" + }, + { "path": "packages/connect-iframe" }, + { + "path": "packages/connect-plugin-ethereum" + }, + { + "path": "packages/connect-plugin-stellar" + }, + { "path": "packages/connect-popup" }, + { "path": "packages/connect-ui" }, + { "path": "packages/connect-web" }, + { + "path": "packages/connect-webextension" + }, + { "path": "packages/crypto-utils" }, + { "path": "packages/device-utils" }, + { "path": "packages/dom-utils" }, + { "path": "packages/e2e-utils" }, + { "path": "packages/env-utils" }, + { "path": "packages/ipc-proxy" }, + { "path": "packages/node-utils" }, + { "path": "packages/protobuf" }, + { "path": "packages/protocol" }, + { "path": "packages/react-native-usb" }, + { "path": "packages/react-utils" }, + { "path": "packages/request-manager" }, + { "path": "packages/schema-utils" }, + { "path": "scripts" }, + { "path": "packages/styles" }, + { "path": "packages/suite" }, + { "path": "packages/suite-analytics" }, + { "path": "packages/suite-build" }, + { "path": "packages/suite-data" }, + { "path": "packages/suite-desktop" }, + { "path": "packages/suite-desktop-api" }, + { "path": "packages/suite-desktop-core" }, + { "path": "packages/suite-desktop-ui" }, + { "path": "packages/suite-storage" }, + { "path": "packages/suite-web" }, + { "path": "packages/theme" }, + { "path": "packages/transport" }, + { "path": "packages/transport-bridge" }, + { "path": "packages/transport-native" }, + { + "path": "packages/trezor-user-env-link" + }, + { "path": "packages/type-utils" }, + { "path": "packages/urls" }, + { "path": "packages/utils" }, + { "path": "packages/utxo-lib" }, + { + "path": "packages/connect-examples/electron-main-process" + }, + { + "path": "packages/connect-examples/electron-renderer-with-popup" + }, + { + "path": "packages/connect-examples/electron-renderer-with-assets" + }, + { + "path": "packages/connect-examples/node" + } ] } diff --git a/tsconfig.lib.json b/tsconfig.lib.json index 4693b94192..4fcb891709 100644 --- a/tsconfig.lib.json +++ b/tsconfig.lib.json @@ -1,12 +1,15 @@ { - "extends": "./tsconfig.json", + "extends": "./tsconfig.base.json", "compilerOptions": { "module": "commonjs", + "moduleResolution": "node", "target": "es6", "composite": false, "incremental": false, - "declarationMap": true + "declarationMap": true, + "noEmit": false, + "emitDeclarationOnly": false }, "exclude": [ "**/node_modules",