From 69a7b0b37930042fb7b47c63cff6a328800633d3 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 15 Dec 2022 11:21:23 -0300 Subject: [PATCH 01/17] Update tsconfig target to es2020 --- _templates/service/new/tsconfig.json.ejs.t | 20 -------------------- apps/meteor/ee/server/services/tsconfig.json | 4 ++-- apps/meteor/tsconfig.json | 4 ++-- ee/apps/account-service/tsconfig.json | 2 -- ee/apps/authorization-service/tsconfig.json | 20 -------------------- ee/apps/ddp-streamer/tsconfig.json | 19 ------------------- ee/apps/presence-service/tsconfig.json | 20 -------------------- ee/apps/stream-hub-service/tsconfig.json | 20 -------------------- packages/fuselage-ui-kit/tsconfig.json | 4 ++-- packages/livechat/tsconfig.json | 2 +- packages/presence/tsconfig.json | 19 ------------------- packages/web-ui-registration/tsconfig.json | 1 - tsconfig.base.json | 3 ++- 13 files changed, 9 insertions(+), 129 deletions(-) diff --git a/_templates/service/new/tsconfig.json.ejs.t b/_templates/service/new/tsconfig.json.ejs.t index a4632558dd8f..fe157760e6d1 100644 --- a/_templates/service/new/tsconfig.json.ejs.t +++ b/_templates/service/new/tsconfig.json.ejs.t @@ -4,27 +4,7 @@ to: ee/apps/<%= name %>/tsconfig.json { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], - "allowJs": true, - "checkJs": false, - "incremental": true, - - /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - "strictFunctionTypes": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ "outDir": "./dist", - "importsNotUsedAsValues": "preserve", "declaration": false, "declarationMap": false }, diff --git a/apps/meteor/ee/server/services/tsconfig.json b/apps/meteor/ee/server/services/tsconfig.json index 4c706287782c..98b3b0810565 100644 --- a/apps/meteor/ee/server/services/tsconfig.json +++ b/apps/meteor/ee/server/services/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "module": "CommonJS", - "target": "es2018", + "module": "esNext", + "target": "es2020", "lib": ["esnext", "dom"], "allowJs": true, diff --git a/apps/meteor/tsconfig.json b/apps/meteor/tsconfig.json index a5a8561cbd1d..7e0d0169661f 100644 --- a/apps/meteor/tsconfig.json +++ b/apps/meteor/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "module": "CommonJS", - "target": "es2018", + "module": "esNext", + "target": "es2020", "lib": ["esnext", "dom"], "allowJs": true, diff --git a/ee/apps/account-service/tsconfig.json b/ee/apps/account-service/tsconfig.json index fd62af76f071..1f61fa4c31c1 100644 --- a/ee/apps/account-service/tsconfig.json +++ b/ee/apps/account-service/tsconfig.json @@ -1,8 +1,6 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], "allowJs": true, "checkJs": false, "incremental": true, diff --git a/ee/apps/authorization-service/tsconfig.json b/ee/apps/authorization-service/tsconfig.json index fd62af76f071..0268cdbc210f 100644 --- a/ee/apps/authorization-service/tsconfig.json +++ b/ee/apps/authorization-service/tsconfig.json @@ -1,27 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], - "allowJs": true, - "checkJs": false, - "incremental": true, - - /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - "strictFunctionTypes": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ "outDir": "./dist", - "importsNotUsedAsValues": "preserve", "declaration": false, "declarationMap": false }, diff --git a/ee/apps/ddp-streamer/tsconfig.json b/ee/apps/ddp-streamer/tsconfig.json index 306798e5e7c3..1326e16f7fcb 100644 --- a/ee/apps/ddp-streamer/tsconfig.json +++ b/ee/apps/ddp-streamer/tsconfig.json @@ -1,26 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], - "allowJs": true, - "checkJs": false, - "incremental": true, - - /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ "outDir": "./dist", - "importsNotUsedAsValues": "preserve", "declaration": false, "declarationMap": false }, diff --git a/ee/apps/presence-service/tsconfig.json b/ee/apps/presence-service/tsconfig.json index fd62af76f071..0268cdbc210f 100644 --- a/ee/apps/presence-service/tsconfig.json +++ b/ee/apps/presence-service/tsconfig.json @@ -1,27 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], - "allowJs": true, - "checkJs": false, - "incremental": true, - - /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - "strictFunctionTypes": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ "outDir": "./dist", - "importsNotUsedAsValues": "preserve", "declaration": false, "declarationMap": false }, diff --git a/ee/apps/stream-hub-service/tsconfig.json b/ee/apps/stream-hub-service/tsconfig.json index fd62af76f071..0268cdbc210f 100644 --- a/ee/apps/stream-hub-service/tsconfig.json +++ b/ee/apps/stream-hub-service/tsconfig.json @@ -1,27 +1,7 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], - "allowJs": true, - "checkJs": false, - "incremental": true, - - /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - "strictFunctionTypes": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ "outDir": "./dist", - "importsNotUsedAsValues": "preserve", "declaration": false, "declarationMap": false }, diff --git a/packages/fuselage-ui-kit/tsconfig.json b/packages/fuselage-ui-kit/tsconfig.json index 20234a7be16e..1b74fc2b1982 100644 --- a/packages/fuselage-ui-kit/tsconfig.json +++ b/packages/fuselage-ui-kit/tsconfig.json @@ -2,8 +2,8 @@ "compilerOptions": { "rootDir": "./src", "module": "ESNext", - "target": "es5", - "lib": ["dom", "es6"], + "target": "es2015", + "lib": ["dom", "esnext"], "sourceMap": true, "allowJs": false, "jsx": "react", diff --git a/packages/livechat/tsconfig.json b/packages/livechat/tsconfig.json index 7779d5e46f4d..fab7ff2f391f 100644 --- a/packages/livechat/tsconfig.json +++ b/packages/livechat/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "module": "CommonJS", "moduleResolution": "node", - "target": "es2018", + "target": "es2015", "outDir": "./dist", "allowJs": true, "checkJs": false, diff --git a/packages/presence/tsconfig.json b/packages/presence/tsconfig.json index d5d962aae2e5..94c51265c13b 100644 --- a/packages/presence/tsconfig.json +++ b/packages/presence/tsconfig.json @@ -1,26 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "target": "es2018", - "lib": ["esnext", "dom"], - "allowJs": true, - "checkJs": false, - "incremental": true, - - /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ "outDir": "./dist", - "importsNotUsedAsValues": "preserve", // "declaration": false, "declarationMap": false }, diff --git a/packages/web-ui-registration/tsconfig.json b/packages/web-ui-registration/tsconfig.json index 0ec401e84393..b1bef4e087cf 100644 --- a/packages/web-ui-registration/tsconfig.json +++ b/packages/web-ui-registration/tsconfig.json @@ -3,7 +3,6 @@ "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "esModuleInterop": true, }, "include": ["./src/**/*"] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 44fa2e47d0cc..a2d46790053d 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,6 +1,7 @@ { "compilerOptions": { - "target": "es5", + "target": "es2020", + "lib": ["es2020"], "module": "commonjs", "declaration": true, "declarationMap": true, From 807c12f6e2a9b5501a2601b597db9c1f7a4c269b Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 15 Dec 2022 11:58:04 -0300 Subject: [PATCH 02/17] allowJs to packages importing legacy code --- ee/apps/authorization-service/tsconfig.json | 2 ++ ee/apps/ddp-streamer/tsconfig.json | 2 ++ ee/apps/presence-service/tsconfig.json | 2 ++ ee/apps/stream-hub-service/tsconfig.json | 2 ++ packages/presence/tsconfig.json | 1 + 5 files changed, 9 insertions(+) diff --git a/ee/apps/authorization-service/tsconfig.json b/ee/apps/authorization-service/tsconfig.json index 0268cdbc210f..ec2eb0cefd2e 100644 --- a/ee/apps/authorization-service/tsconfig.json +++ b/ee/apps/authorization-service/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { + "strictPropertyInitialization": false, // TODO: Remove this line + "allowJs": true, // TODO: Remove this line "outDir": "./dist", "declaration": false, "declarationMap": false diff --git a/ee/apps/ddp-streamer/tsconfig.json b/ee/apps/ddp-streamer/tsconfig.json index 1326e16f7fcb..876c796a1a60 100644 --- a/ee/apps/ddp-streamer/tsconfig.json +++ b/ee/apps/ddp-streamer/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { + "strictPropertyInitialization": false, // TODO: Remove this line + "allowJs": true, // TODO: Remove this line "outDir": "./dist", "declaration": false, "declarationMap": false diff --git a/ee/apps/presence-service/tsconfig.json b/ee/apps/presence-service/tsconfig.json index 0268cdbc210f..ec2eb0cefd2e 100644 --- a/ee/apps/presence-service/tsconfig.json +++ b/ee/apps/presence-service/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { + "strictPropertyInitialization": false, // TODO: Remove this line + "allowJs": true, // TODO: Remove this line "outDir": "./dist", "declaration": false, "declarationMap": false diff --git a/ee/apps/stream-hub-service/tsconfig.json b/ee/apps/stream-hub-service/tsconfig.json index 0268cdbc210f..ec2eb0cefd2e 100644 --- a/ee/apps/stream-hub-service/tsconfig.json +++ b/ee/apps/stream-hub-service/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../../tsconfig.base.json", "compilerOptions": { + "strictPropertyInitialization": false, // TODO: Remove this line + "allowJs": true, // TODO: Remove this line "outDir": "./dist", "declaration": false, "declarationMap": false diff --git a/packages/presence/tsconfig.json b/packages/presence/tsconfig.json index 94c51265c13b..382327e14f36 100644 --- a/packages/presence/tsconfig.json +++ b/packages/presence/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "strictPropertyInitialization": false, // TODO: Remove this line "outDir": "./dist", // "declaration": false, "declarationMap": false From 7e2545a1c919dcbce6f54eb88c9a9313015b75fe Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 15 Dec 2022 11:58:19 -0300 Subject: [PATCH 03/17] target es2015 for ui facing packages --- packages/ui-contexts/tsconfig.json | 4 ++-- packages/web-ui-registration/tsconfig.json | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/ui-contexts/tsconfig.json b/packages/ui-contexts/tsconfig.json index 010aef9ff7de..9e92dce714c6 100644 --- a/packages/ui-contexts/tsconfig.json +++ b/packages/ui-contexts/tsconfig.json @@ -1,10 +1,10 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "target": "es2015", + "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist", - "resolveJsonModule": true, - "esModuleInterop": true, }, "include": ["./src/**/*"] } diff --git a/packages/web-ui-registration/tsconfig.json b/packages/web-ui-registration/tsconfig.json index b1bef4e087cf..9e92dce714c6 100644 --- a/packages/web-ui-registration/tsconfig.json +++ b/packages/web-ui-registration/tsconfig.json @@ -1,6 +1,8 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "target": "es2015", + "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist", }, From 80ec0ad405c09f1ea1f2410317de7e044bb493b8 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 15 Dec 2022 12:15:29 -0300 Subject: [PATCH 04/17] add dom to lib --- packages/api-client/tsconfig.json | 1 + packages/core-typings/tsconfig.json | 1 + packages/rest-typings/tsconfig.json | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/api-client/tsconfig.json b/packages/api-client/tsconfig.json index 455edb8149c4..9c5907964dd2 100644 --- a/packages/api-client/tsconfig.json +++ b/packages/api-client/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/core-typings/tsconfig.json b/packages/core-typings/tsconfig.json index 455edb8149c4..b5a4c91683e9 100644 --- a/packages/core-typings/tsconfig.json +++ b/packages/core-typings/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "lib": ["dom", "esnext"], // Due to some typings having FormData and HTMLMetaElement (maybe they should be removed) "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/rest-typings/tsconfig.json b/packages/rest-typings/tsconfig.json index 455edb8149c4..9c5907964dd2 100644 --- a/packages/rest-typings/tsconfig.json +++ b/packages/rest-typings/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { + "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist" }, From 8043814a4077dfa043b450416926ab539c8e72b1 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Thu, 15 Dec 2022 14:38:15 -0300 Subject: [PATCH 05/17] fix mocha --- apps/meteor/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 3f100168b775..140b24329dcd 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -32,15 +32,15 @@ "stylelint:fix": "stylelint --fix \"app/**/*.css\" \"client/**/*.css\" \"app/**/*.less\" \"client/**/*.less\" \"ee/**/*.less\"", "typecheck": "cross-env NODE_OPTIONS=\"--max-old-space-size=4098\" tsc -p tsconfig.typecheck.json", "deploy": "npm run build && pm2 startOrRestart pm2.json", - "coverage": "nyc -r html mocha --config ./.mocharc.js", + "coverage": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' nyc -r html mocha --config ./.mocharc.js", "test:e2e": "playwright test", "test:e2e:nyc": "nyc report --reporter=text-summary --reporter=lcov", - "testapi": "mocha --config ./.mocharc.api.js", + "testapi": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha --config ./.mocharc.api.js", "testunit": "npm run .testunit:definition && npm run .testunit:client && npm run .testunit:server", - ".testunit:server": "mocha --config ./.mocharc.js", - ".testunit:client": "mocha --config ./.mocharc.client.js", - ".testunit:definition": "mocha --config ./.mocharc.definition.js", - "testunit-watch": "mocha --watch --config ./.mocharc.js", + ".testunit:server": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha --config ./.mocharc.js", + ".testunit:client": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha --config ./.mocharc.client.js", + ".testunit:definition": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha --config ./.mocharc.definition.js", + "testunit-watch": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha --watch --config ./.mocharc.js", "test": "npm run testapi && npm run testui", "translation-diff": "node .scripts/translationDiff.js", "translation-check": "node .scripts/check-i18n.js", From 7bc8e0bda97c9dedd61dd51b3a86621662a57112 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 11:24:59 -0300 Subject: [PATCH 06/17] split base files into client and server --- _templates/service/new/tsconfig.json.ejs.t | 6 +-- apps/meteor/ee/server/services/tsconfig.json | 45 +------------------- apps/meteor/tsconfig.json | 9 ++-- ee/apps/account-service/tsconfig.json | 10 ++--- ee/apps/authorization-service/tsconfig.json | 6 +-- ee/apps/ddp-streamer/tsconfig.json | 6 +-- ee/apps/presence-service/tsconfig.json | 6 +-- ee/apps/stream-hub-service/tsconfig.json | 6 +-- ee/packages/ui-theming/tsconfig.json | 6 +-- packages/agenda/tsconfig.json | 2 +- packages/api-client/tsconfig.json | 3 +- packages/cas-validate/tsconfig.json | 3 +- packages/core-typings/tsconfig.json | 3 +- packages/favicon/tsconfig.json | 5 +-- packages/fuselage-ui-kit/tsconfig.json | 15 +------ packages/gazzodown/tsconfig.json | 2 +- packages/livechat/tsconfig.json | 6 +-- packages/model-typings/tsconfig.json | 3 +- packages/models/tsconfig.json | 5 +-- packages/presence/tsconfig.json | 6 +-- packages/rest-typings/tsconfig.json | 3 +- packages/ui-client/tsconfig.json | 3 +- packages/ui-composer/tsconfig.json | 2 +- packages/ui-contexts/tsconfig.json | 4 +- packages/ui-video-conf/tsconfig.json | 2 +- packages/web-ui-registration/tsconfig.json | 6 +-- tsconfig.base.client.json | 13 ++++++ tsconfig.base.json | 15 ++++--- tsconfig.base.server.json | 9 ++++ yarn.lock | 2 +- 30 files changed, 75 insertions(+), 137 deletions(-) create mode 100644 tsconfig.base.client.json create mode 100644 tsconfig.base.server.json diff --git a/_templates/service/new/tsconfig.json.ejs.t b/_templates/service/new/tsconfig.json.ejs.t index fe157760e6d1..21751b6672a9 100644 --- a/_templates/service/new/tsconfig.json.ejs.t +++ b/_templates/service/new/tsconfig.json.ejs.t @@ -2,11 +2,9 @@ to: ee/apps/<%= name %>/tsconfig.json --- { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.server.json", "compilerOptions": { - "outDir": "./dist", - "declaration": false, - "declarationMap": false + "outDir": "./dist" }, "files": ["./src/service.ts"], "include": ["../../../apps/meteor/definition/externals/meteor"], diff --git a/apps/meteor/ee/server/services/tsconfig.json b/apps/meteor/ee/server/services/tsconfig.json index 98b3b0810565..f88a3aa63282 100644 --- a/apps/meteor/ee/server/services/tsconfig.json +++ b/apps/meteor/ee/server/services/tsconfig.json @@ -1,48 +1,5 @@ { - "compilerOptions": { - "module": "esNext", - "target": "es2020", - "lib": ["esnext", "dom"], - - "allowJs": true, - "checkJs": false, - "jsx": "react", - // "incremental": true, - // "noEmit": true, - - /* Strict Type-Checking Options */ - "strict": true, - "noImplicitAny": true, - "strictNullChecks": true, - "strictPropertyInitialization": false, - - /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - - /* Module Resolution Options */ - "baseUrl": ".", - "paths": { - /* Support absolute /imports/* with a leading '/' */ - "/*": ["*"] - }, - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "preserveSymlinks": true, - - "outDir": "./dist", - - "skipLibCheck": true - - // "sourceMap": true, - // "declaration": true, - // "removeComments": false, - // "emitDecoratorMetadata": true, - // "experimentalDecorators": true, - }, + "extends": "../../../tsconfig.json", "include": ["./**/*", "../../../definition/externals/meteor/rocketchat-streamer.d.ts", "../../../../../ee/apps/account-service/src/lib"], "exclude": ["./dist", "./ecosystem.config.js", "../../../definition/methods"] } diff --git a/apps/meteor/tsconfig.json b/apps/meteor/tsconfig.json index 7e0d0169661f..1c91cb6bc8b2 100644 --- a/apps/meteor/tsconfig.json +++ b/apps/meteor/tsconfig.json @@ -1,17 +1,17 @@ { + "extends": "../../tsconfig.base.json", "compilerOptions": { + "target": "es2018", "module": "esNext", - "target": "es2020", "lib": ["esnext", "dom"], "allowJs": true, "checkJs": false, "jsx": "react", - // "incremental": true, + "incremental": true, "noEmit": true, /* Strict Type-Checking Options */ - "strict": true, "noImplicitAny": true, "strictNullChecks": true, "strictPropertyInitialization": false, @@ -28,9 +28,6 @@ /* Support absolute /imports/* with a leading '/' */ "/*": ["*"] }, - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, "preserveSymlinks": true // "sourceMap": true, diff --git a/ee/apps/account-service/tsconfig.json b/ee/apps/account-service/tsconfig.json index 1f61fa4c31c1..00af6b496ece 100644 --- a/ee/apps/account-service/tsconfig.json +++ b/ee/apps/account-service/tsconfig.json @@ -1,8 +1,7 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.server.json", "compilerOptions": { - "allowJs": true, - "checkJs": false, + "allowJs": true, // TODO remove asap "incremental": true, /* Strict Type-Checking Options */ @@ -18,10 +17,9 @@ "noFallthroughCasesInSwitch": false, /* Module Resolution Options */ - "outDir": "./dist", "importsNotUsedAsValues": "preserve", - "declaration": false, - "declarationMap": false + + "outDir": "./dist" }, "files": ["./src/service.ts"], "include": ["../../../apps/meteor/definition/externals/meteor"], diff --git a/ee/apps/authorization-service/tsconfig.json b/ee/apps/authorization-service/tsconfig.json index ec2eb0cefd2e..7c09cdc08940 100644 --- a/ee/apps/authorization-service/tsconfig.json +++ b/ee/apps/authorization-service/tsconfig.json @@ -1,11 +1,9 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.server.json", "compilerOptions": { "strictPropertyInitialization": false, // TODO: Remove this line "allowJs": true, // TODO: Remove this line - "outDir": "./dist", - "declaration": false, - "declarationMap": false + "outDir": "./dist" }, "files": ["./src/service.ts"], "include": ["../../../apps/meteor/definition/externals/meteor"], diff --git a/ee/apps/ddp-streamer/tsconfig.json b/ee/apps/ddp-streamer/tsconfig.json index 876c796a1a60..43fbbe3e7b9c 100644 --- a/ee/apps/ddp-streamer/tsconfig.json +++ b/ee/apps/ddp-streamer/tsconfig.json @@ -1,11 +1,9 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.server.json", "compilerOptions": { "strictPropertyInitialization": false, // TODO: Remove this line "allowJs": true, // TODO: Remove this line - "outDir": "./dist", - "declaration": false, - "declarationMap": false + "outDir": "./dist" }, "include": ["./src/**/*", "./definition", "../../../apps/meteor/definition/externals/meteor/rocketchat-streamer.d.ts"], "exclude": ["./dist", "./ecosystem.config.js"] diff --git a/ee/apps/presence-service/tsconfig.json b/ee/apps/presence-service/tsconfig.json index ec2eb0cefd2e..7c09cdc08940 100644 --- a/ee/apps/presence-service/tsconfig.json +++ b/ee/apps/presence-service/tsconfig.json @@ -1,11 +1,9 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.server.json", "compilerOptions": { "strictPropertyInitialization": false, // TODO: Remove this line "allowJs": true, // TODO: Remove this line - "outDir": "./dist", - "declaration": false, - "declarationMap": false + "outDir": "./dist" }, "files": ["./src/service.ts"], "include": ["../../../apps/meteor/definition/externals/meteor"], diff --git a/ee/apps/stream-hub-service/tsconfig.json b/ee/apps/stream-hub-service/tsconfig.json index ec2eb0cefd2e..7c09cdc08940 100644 --- a/ee/apps/stream-hub-service/tsconfig.json +++ b/ee/apps/stream-hub-service/tsconfig.json @@ -1,11 +1,9 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.server.json", "compilerOptions": { "strictPropertyInitialization": false, // TODO: Remove this line "allowJs": true, // TODO: Remove this line - "outDir": "./dist", - "declaration": false, - "declarationMap": false + "outDir": "./dist" }, "files": ["./src/service.ts"], "include": ["../../../apps/meteor/definition/externals/meteor"], diff --git a/ee/packages/ui-theming/tsconfig.json b/ee/packages/ui-theming/tsconfig.json index a01404b65412..03eccb996d38 100644 --- a/ee/packages/ui-theming/tsconfig.json +++ b/ee/packages/ui-theming/tsconfig.json @@ -1,10 +1,8 @@ { - "extends": "../../../tsconfig.base.json", + "extends": "../../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "lib": ["es2019", "dom"], - "importsNotUsedAsValues": "error" + "outDir": "./dist" }, "include": ["./src/**/*"] } diff --git a/packages/agenda/tsconfig.json b/packages/agenda/tsconfig.json index 455edb8149c4..a132d2e280b6 100644 --- a/packages/agenda/tsconfig.json +++ b/packages/agenda/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.server.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist" diff --git a/packages/api-client/tsconfig.json b/packages/api-client/tsconfig.json index 9c5907964dd2..e2be47cf5499 100644 --- a/packages/api-client/tsconfig.json +++ b/packages/api-client/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/cas-validate/tsconfig.json b/packages/cas-validate/tsconfig.json index 455edb8149c4..26aeeb5e5cff 100644 --- a/packages/cas-validate/tsconfig.json +++ b/packages/cas-validate/tsconfig.json @@ -1,6 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.server.json", "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/core-typings/tsconfig.json b/packages/core-typings/tsconfig.json index b5a4c91683e9..e2be47cf5499 100644 --- a/packages/core-typings/tsconfig.json +++ b/packages/core-typings/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "lib": ["dom", "esnext"], // Due to some typings having FormData and HTMLMetaElement (maybe they should be removed) "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/favicon/tsconfig.json b/packages/favicon/tsconfig.json index b16dc6107abd..e2be47cf5499 100644 --- a/packages/favicon/tsconfig.json +++ b/packages/favicon/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", - "outDir": "./dist", - "lib": ["DOM"], + "outDir": "./dist" }, "include": ["./src/**/*"] } diff --git a/packages/fuselage-ui-kit/tsconfig.json b/packages/fuselage-ui-kit/tsconfig.json index 1b74fc2b1982..53e6f0efe7f2 100644 --- a/packages/fuselage-ui-kit/tsconfig.json +++ b/packages/fuselage-ui-kit/tsconfig.json @@ -1,27 +1,16 @@ { + "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", - "module": "ESNext", - "target": "es2015", - "lib": ["dom", "esnext"], - "sourceMap": true, - "allowJs": false, - "jsx": "react", - "declaration": true, "outDir": "./dist", - "moduleResolution": "node", - "forceConsistentCasingInFileNames": true, + "allowJs": false, "noImplicitReturns": true, "noImplicitThis": true, "noImplicitAny": true, - "strict": true, "strictNullChecks": true, "suppressImplicitAnyIndexErrors": true, "noUnusedLocals": true, "noUnusedParameters": true, - "esModuleInterop": true, - "skipLibCheck": true, - "importsNotUsedAsValues": "error" }, "exclude": ["node_modules", "dist"] } diff --git a/packages/gazzodown/tsconfig.json b/packages/gazzodown/tsconfig.json index 455edb8149c4..e2be47cf5499 100644 --- a/packages/gazzodown/tsconfig.json +++ b/packages/gazzodown/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist" diff --git a/packages/livechat/tsconfig.json b/packages/livechat/tsconfig.json index fab7ff2f391f..ca93278ad51a 100644 --- a/packages/livechat/tsconfig.json +++ b/packages/livechat/tsconfig.json @@ -1,15 +1,11 @@ { + "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "module": "CommonJS", - "moduleResolution": "node", - "target": "es2015", "outDir": "./dist", "allowJs": true, "checkJs": false, "noImplicitAny": true, - "jsx": "react-jsx", "jsxImportSource": "preact", - "esModuleInterop": true, }, "exclude": [ "./node_modules", diff --git a/packages/model-typings/tsconfig.json b/packages/model-typings/tsconfig.json index 455edb8149c4..52e9dd8c4976 100644 --- a/packages/model-typings/tsconfig.json +++ b/packages/model-typings/tsconfig.json @@ -1,6 +1,7 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.server.json", "compilerOptions": { + "declaration": true, "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/models/tsconfig.json b/packages/models/tsconfig.json index 010aef9ff7de..74d65c3b8a3d 100644 --- a/packages/models/tsconfig.json +++ b/packages/models/tsconfig.json @@ -1,10 +1,9 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.server.json", "compilerOptions": { + "declaration": true, "rootDir": "./src", "outDir": "./dist", - "resolveJsonModule": true, - "esModuleInterop": true, }, "include": ["./src/**/*"] } diff --git a/packages/presence/tsconfig.json b/packages/presence/tsconfig.json index 382327e14f36..2c48a3a994c6 100644 --- a/packages/presence/tsconfig.json +++ b/packages/presence/tsconfig.json @@ -1,10 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.server.json", "compilerOptions": { "strictPropertyInitialization": false, // TODO: Remove this line - "outDir": "./dist", - // "declaration": false, - "declarationMap": false + "outDir": "./dist" }, "include": ["../../apps/meteor/definition/externals/meteor/rocketchat-streamer.d.ts"], "exclude": ["./dist"], diff --git a/packages/rest-typings/tsconfig.json b/packages/rest-typings/tsconfig.json index 9c5907964dd2..e2be47cf5499 100644 --- a/packages/rest-typings/tsconfig.json +++ b/packages/rest-typings/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist" }, diff --git a/packages/ui-client/tsconfig.json b/packages/ui-client/tsconfig.json index 11f4fa599d4c..2c4e201aa951 100644 --- a/packages/ui-client/tsconfig.json +++ b/packages/ui-client/tsconfig.json @@ -1,9 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist", - "importsNotUsedAsValues": "error" }, "include": ["./src/**/*"] } diff --git a/packages/ui-composer/tsconfig.json b/packages/ui-composer/tsconfig.json index 455edb8149c4..e2be47cf5499 100644 --- a/packages/ui-composer/tsconfig.json +++ b/packages/ui-composer/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist" diff --git a/packages/ui-contexts/tsconfig.json b/packages/ui-contexts/tsconfig.json index 9e92dce714c6..2c4e201aa951 100644 --- a/packages/ui-contexts/tsconfig.json +++ b/packages/ui-contexts/tsconfig.json @@ -1,8 +1,6 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "target": "es2015", - "lib": ["dom", "esnext"], "rootDir": "./src", "outDir": "./dist", }, diff --git a/packages/ui-video-conf/tsconfig.json b/packages/ui-video-conf/tsconfig.json index 455edb8149c4..e2be47cf5499 100644 --- a/packages/ui-video-conf/tsconfig.json +++ b/packages/ui-video-conf/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { "rootDir": "./src", "outDir": "./dist" diff --git a/packages/web-ui-registration/tsconfig.json b/packages/web-ui-registration/tsconfig.json index 9e92dce714c6..e2be47cf5499 100644 --- a/packages/web-ui-registration/tsconfig.json +++ b/packages/web-ui-registration/tsconfig.json @@ -1,10 +1,8 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.base.client.json", "compilerOptions": { - "target": "es2015", - "lib": ["dom", "esnext"], "rootDir": "./src", - "outDir": "./dist", + "outDir": "./dist" }, "include": ["./src/**/*"] } diff --git a/tsconfig.base.client.json b/tsconfig.base.client.json new file mode 100644 index 000000000000..4add76aaf527 --- /dev/null +++ b/tsconfig.base.client.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "target": "es2015", + "lib": ["dom", "dom.iterable", "esnext"], + "module": "esnext", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "jsx": "react-jsx", + }, + "exclude": ["node_modules", "**/*.spec.ts"] +} diff --git a/tsconfig.base.json b/tsconfig.base.json index a2d46790053d..af776c122da4 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,19 +1,20 @@ { "compilerOptions": { - "target": "es2020", - "lib": ["es2020"], + "target": "es5", "module": "commonjs", - "declaration": true, - "declarationMap": true, - "sourceMap": true, + "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "moduleResolution": "node", "resolveJsonModule": true, - "jsx": "react-jsx", - "importsNotUsedAsValues": "error" + "importsNotUsedAsValues": "error", + + "noImplicitAny": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "strictNullChecks": true }, "exclude": ["node_modules", "**/*.spec.ts"] } diff --git a/tsconfig.base.server.json b/tsconfig.base.server.json new file mode 100644 index 000000000000..6d8a33294637 --- /dev/null +++ b/tsconfig.base.server.json @@ -0,0 +1,9 @@ +{ + "extends": "./tsconfig.base.json", + "compilerOptions": { + "target": "es2020", + "lib": ["es2020"], + "module": "commonjs", + }, + "exclude": ["node_modules", "**/*.spec.ts"] +} diff --git a/yarn.lock b/yarn.lock index dcb6a8c599f5..2160229b696c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24040,7 +24040,7 @@ __metadata: optional: true bin: lessc: ./bin/lessc - checksum: 61568b56b5289fdcfe3d51baf3c13e7db7140022c0a37ef0ae343169f0de927a4b4f4272bc10c20101796e8ee79e934e024051321bba93b3ae071f734309bd98 + checksum: c9b8c0e865427112c48a9cac36f14964e130577743c29d56a6d93b5812b70846b04ccaa364acf1e8d75cee3855215ec0a2d8d9de569c80e774f10b6245f39b7d languageName: node linkType: hard From 27de69d31786f6c976d07eec6f114145cd529865 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 11:41:09 -0300 Subject: [PATCH 07/17] Remove not used React import --- ee/packages/ui-theming/src/PaletteStyleTag.tsx | 1 - ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/ActionsBlock.Action.tsx | 1 - packages/fuselage-ui-kit/src/blocks/ActionsBlock.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/ContextBlock.Item.tsx | 1 - packages/fuselage-ui-kit/src/blocks/ContextBlock.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/DividerBlock.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/ImageBlock.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/InputBlock.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/PreviewBlock.tsx | 2 +- packages/fuselage-ui-kit/src/blocks/SectionBlock.Fields.tsx | 1 - packages/fuselage-ui-kit/src/blocks/SectionBlock.tsx | 2 +- .../src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx | 2 +- packages/fuselage-ui-kit/src/elements/ButtonElement.tsx | 1 - .../src/elements/ContextElement/ContextElement.tsx | 1 - .../src/elements/ContextElement/ContextElementItem.tsx | 1 - packages/fuselage-ui-kit/src/elements/DatePickerElement.tsx | 1 - packages/fuselage-ui-kit/src/elements/ImageElement.tsx | 1 - packages/fuselage-ui-kit/src/elements/LinearScaleElement.tsx | 2 +- .../fuselage-ui-kit/src/elements/MultiStaticSelectElement.tsx | 2 +- packages/fuselage-ui-kit/src/elements/OverflowElement.tsx | 2 +- packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx | 2 +- packages/fuselage-ui-kit/src/elements/StaticSelectElement.tsx | 2 +- packages/fuselage-ui-kit/src/stories/Banner.stories.tsx | 1 - packages/fuselage-ui-kit/src/stories/Message.stories.tsx | 1 - packages/fuselage-ui-kit/src/stories/Modal.stories.tsx | 1 - packages/fuselage-ui-kit/src/surfaces/BannerSurface.tsx | 1 - .../fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx | 2 +- packages/fuselage-ui-kit/src/surfaces/MessageSurface.tsx | 1 - .../fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx | 1 - packages/fuselage-ui-kit/src/surfaces/ModalSurface.tsx | 1 - packages/fuselage-ui-kit/src/surfaces/Surface.tsx | 1 - packages/fuselage-ui-kit/src/surfaces/SurfaceContext.tsx | 2 +- packages/fuselage-ui-kit/src/surfaces/createSurfaceRenderer.tsx | 1 - packages/ui-client/src/components/Header/Header.tsx | 1 - packages/ui-client/src/components/Header/HeaderAvatar.tsx | 1 - packages/ui-client/src/components/Header/HeaderContent.tsx | 1 - packages/ui-client/src/components/Header/HeaderContentRow.tsx | 1 - packages/ui-client/src/components/Header/HeaderDivider.tsx | 1 - packages/ui-client/src/components/Header/HeaderIcon.tsx | 2 +- packages/ui-client/src/components/Header/HeaderLink.tsx | 1 - packages/ui-client/src/components/Header/HeaderState.tsx | 1 - packages/ui-client/src/components/Header/HeaderSubtitle.tsx | 1 - packages/ui-client/src/components/Header/HeaderTag.tsx | 1 - packages/ui-client/src/components/Header/HeaderTagIcon.tsx | 2 +- packages/ui-client/src/components/Header/HeaderTagSkeleton.tsx | 1 - packages/ui-client/src/components/Header/HeaderTitle.tsx | 1 - .../ui-client/src/components/Header/ToolBox/ToolBoxAction.tsx | 1 - .../src/components/Header/ToolBox/ToolBoxActionBadge.tsx | 1 - packages/web-ui-registration/src/CMSPage.tsx | 1 - packages/web-ui-registration/src/EmailConfirmationForm.tsx | 1 - packages/web-ui-registration/src/components/LoginPoweredBy.tsx | 1 - 52 files changed, 18 insertions(+), 52 deletions(-) diff --git a/ee/packages/ui-theming/src/PaletteStyleTag.tsx b/ee/packages/ui-theming/src/PaletteStyleTag.tsx index 8d9f9db82eb3..d4260761d3a6 100644 --- a/ee/packages/ui-theming/src/PaletteStyleTag.tsx +++ b/ee/packages/ui-theming/src/PaletteStyleTag.tsx @@ -1,5 +1,4 @@ import type { ReactElement } from 'react'; -import React from 'react'; import { createPortal } from 'react-dom'; import { useSessionStorage } from '@rocket.chat/fuselage-hooks'; diff --git a/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx b/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx index b7f411c8fbcd..daedacb42644 100644 --- a/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx +++ b/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx @@ -1,5 +1,5 @@ import type { ReactElement } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; import { createPortal } from 'react-dom'; import { useSessionStorage } from '@rocket.chat/fuselage-hooks'; diff --git a/packages/fuselage-ui-kit/src/blocks/ActionsBlock.Action.tsx b/packages/fuselage-ui-kit/src/blocks/ActionsBlock.Action.tsx index fddca585db01..e17d8899b0e1 100644 --- a/packages/fuselage-ui-kit/src/blocks/ActionsBlock.Action.tsx +++ b/packages/fuselage-ui-kit/src/blocks/ActionsBlock.Action.tsx @@ -1,7 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; type ActionProps = { element: UiKit.ActionsBlock['elements'][number]; diff --git a/packages/fuselage-ui-kit/src/blocks/ActionsBlock.tsx b/packages/fuselage-ui-kit/src/blocks/ActionsBlock.tsx index c750935fe37f..3b90801b0f4f 100644 --- a/packages/fuselage-ui-kit/src/blocks/ActionsBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/ActionsBlock.tsx @@ -1,7 +1,7 @@ import { Box, Button } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useCallback, useMemo, useState } from 'react'; +import { memo, useCallback, useMemo, useState } from 'react'; import { useSurfaceType } from '../contexts/SurfaceContext'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/blocks/ContextBlock.Item.tsx b/packages/fuselage-ui-kit/src/blocks/ContextBlock.Item.tsx index 141e0320793f..d0faaa940174 100644 --- a/packages/fuselage-ui-kit/src/blocks/ContextBlock.Item.tsx +++ b/packages/fuselage-ui-kit/src/blocks/ContextBlock.Item.tsx @@ -1,7 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; type ItemProps = { block: UiKit.ContextBlock['elements'][number]; diff --git a/packages/fuselage-ui-kit/src/blocks/ContextBlock.tsx b/packages/fuselage-ui-kit/src/blocks/ContextBlock.tsx index cce7fdcd6237..200bf8b2fc5a 100644 --- a/packages/fuselage-ui-kit/src/blocks/ContextBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/ContextBlock.tsx @@ -1,7 +1,7 @@ import { Box } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useMemo } from 'react'; +import { memo, useMemo } from 'react'; import type { BlockProps } from '../utils/BlockProps'; import Item from './ContextBlock.Item'; diff --git a/packages/fuselage-ui-kit/src/blocks/DividerBlock.tsx b/packages/fuselage-ui-kit/src/blocks/DividerBlock.tsx index 8134070e47fc..540627b4aad7 100644 --- a/packages/fuselage-ui-kit/src/blocks/DividerBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/DividerBlock.tsx @@ -1,7 +1,7 @@ import { Divider } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/blocks/ImageBlock.tsx b/packages/fuselage-ui-kit/src/blocks/ImageBlock.tsx index 7a6f9191df66..0712d557ef81 100644 --- a/packages/fuselage-ui-kit/src/blocks/ImageBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/ImageBlock.tsx @@ -1,7 +1,7 @@ import { Box, Skeleton } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useEffect, useState } from 'react'; +import { memo, useEffect, useState } from 'react'; import { useSurfaceType } from '../contexts/SurfaceContext'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/blocks/InputBlock.tsx b/packages/fuselage-ui-kit/src/blocks/InputBlock.tsx index 11331e020fd3..bbeaf3c338c6 100644 --- a/packages/fuselage-ui-kit/src/blocks/InputBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/InputBlock.tsx @@ -1,7 +1,7 @@ import { Field } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useMemo } from 'react'; +import { memo, useMemo } from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/blocks/PreviewBlock.tsx b/packages/fuselage-ui-kit/src/blocks/PreviewBlock.tsx index 7a085a1bd3b8..063ef7bdd34f 100644 --- a/packages/fuselage-ui-kit/src/blocks/PreviewBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/PreviewBlock.tsx @@ -14,7 +14,7 @@ import { isPreviewBlockWithPreview, } from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; import type { BlockProps } from '../utils/BlockProps'; import ContextBlock from './ContextBlock'; diff --git a/packages/fuselage-ui-kit/src/blocks/SectionBlock.Fields.tsx b/packages/fuselage-ui-kit/src/blocks/SectionBlock.Fields.tsx index 00be3f42e358..b1161d55905b 100644 --- a/packages/fuselage-ui-kit/src/blocks/SectionBlock.Fields.tsx +++ b/packages/fuselage-ui-kit/src/blocks/SectionBlock.Fields.tsx @@ -1,7 +1,6 @@ import { Grid } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; const breakpoints = { xs: 4, diff --git a/packages/fuselage-ui-kit/src/blocks/SectionBlock.tsx b/packages/fuselage-ui-kit/src/blocks/SectionBlock.tsx index 773fb97d1f94..261a81f6b967 100644 --- a/packages/fuselage-ui-kit/src/blocks/SectionBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/SectionBlock.tsx @@ -1,7 +1,7 @@ import { Box, Flex, Grid } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useMemo } from 'react'; +import { memo, useMemo } from 'react'; import type { BlockProps } from '../utils/BlockProps'; import Fields from './SectionBlock.Fields'; diff --git a/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx index 9c20ce8f8ac4..74ae2bfc4afe 100644 --- a/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx +++ b/packages/fuselage-ui-kit/src/blocks/VideoConferenceBlock/VideoConferenceBlock.tsx @@ -15,7 +15,7 @@ import { VideoConfMessageAction, } from '@rocket.chat/ui-video-conf'; import type { MouseEventHandler, ReactElement } from 'react'; -import React, { useContext, memo } from 'react'; +import { useContext, memo } from 'react'; import { useSurfaceType } from '../../contexts/SurfaceContext'; import type { BlockProps } from '../../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/ButtonElement.tsx b/packages/fuselage-ui-kit/src/elements/ButtonElement.tsx index cfb620aff275..8f68a5bef4d6 100644 --- a/packages/fuselage-ui-kit/src/elements/ButtonElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/ButtonElement.tsx @@ -1,7 +1,6 @@ import { Button, Throbber } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElement.tsx b/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElement.tsx index 898a3abb9e21..063a95693a2c 100644 --- a/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElement.tsx @@ -1,7 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { FC } from 'react'; -import React from 'react'; import type { BlockProps } from '../../utils/BlockProps'; import { ContextElementItem } from './ContextElementItem'; diff --git a/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElementItem.tsx b/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElementItem.tsx index 7b940fdabc38..b0429b6f8d75 100644 --- a/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElementItem.tsx +++ b/packages/fuselage-ui-kit/src/elements/ContextElement/ContextElementItem.tsx @@ -2,7 +2,6 @@ import { Box } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import { BlockContext, ElementType } from '@rocket.chat/ui-kit'; import type { FC } from 'react'; -import React from 'react'; import type { BlockProps } from '../../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/DatePickerElement.tsx b/packages/fuselage-ui-kit/src/elements/DatePickerElement.tsx index ba05bedf9b47..a0357c303e1f 100644 --- a/packages/fuselage-ui-kit/src/elements/DatePickerElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/DatePickerElement.tsx @@ -1,7 +1,6 @@ import { InputBox } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/ImageElement.tsx b/packages/fuselage-ui-kit/src/elements/ImageElement.tsx index ec56a868c3f7..d790b6bf28cd 100644 --- a/packages/fuselage-ui-kit/src/elements/ImageElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/ImageElement.tsx @@ -1,6 +1,5 @@ import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; import type { BlockProps } from '../utils/BlockProps'; import { Element } from './ImageElement.styles'; diff --git a/packages/fuselage-ui-kit/src/elements/LinearScaleElement.tsx b/packages/fuselage-ui-kit/src/elements/LinearScaleElement.tsx index e35ea819dbe4..0985eacfdb24 100644 --- a/packages/fuselage-ui-kit/src/elements/LinearScaleElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/LinearScaleElement.tsx @@ -1,7 +1,7 @@ import { Box, Button, ButtonGroup } from '@rocket.chat/fuselage'; import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useMemo } from 'react'; +import { memo, useMemo } from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/MultiStaticSelectElement.tsx b/packages/fuselage-ui-kit/src/elements/MultiStaticSelectElement.tsx index e7c4ed49bd2f..3649fd2cd172 100644 --- a/packages/fuselage-ui-kit/src/elements/MultiStaticSelectElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/MultiStaticSelectElement.tsx @@ -2,7 +2,7 @@ import type { SelectOption } from '@rocket.chat/fuselage'; import { MultiSelectFiltered } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useCallback, useMemo } from 'react'; +import { memo, useCallback, useMemo } from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/OverflowElement.tsx b/packages/fuselage-ui-kit/src/elements/OverflowElement.tsx index 20b9b3cf80bd..b1d3a3293baa 100644 --- a/packages/fuselage-ui-kit/src/elements/OverflowElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/OverflowElement.tsx @@ -7,7 +7,7 @@ import { } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { useRef, useCallback, useMemo } from 'react'; +import { useRef, useCallback, useMemo } from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx b/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx index 7394b605edcc..698d4ded25f8 100644 --- a/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/PlainTextInputElement.tsx @@ -1,7 +1,7 @@ import { TextAreaInput, TextInput } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo } from 'react'; +import { memo } from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/elements/StaticSelectElement.tsx b/packages/fuselage-ui-kit/src/elements/StaticSelectElement.tsx index 797e33c4f48e..781e25ad831c 100644 --- a/packages/fuselage-ui-kit/src/elements/StaticSelectElement.tsx +++ b/packages/fuselage-ui-kit/src/elements/StaticSelectElement.tsx @@ -1,7 +1,7 @@ import { SelectFiltered } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { memo, useCallback, useMemo } from 'react'; +import { memo, useCallback, useMemo } from 'react'; import { useUiKitState } from '../hooks/useUiKitState'; import type { BlockProps } from '../utils/BlockProps'; diff --git a/packages/fuselage-ui-kit/src/stories/Banner.stories.tsx b/packages/fuselage-ui-kit/src/stories/Banner.stories.tsx index 956e29238be1..1dc679b1fa45 100644 --- a/packages/fuselage-ui-kit/src/stories/Banner.stories.tsx +++ b/packages/fuselage-ui-kit/src/stories/Banner.stories.tsx @@ -2,7 +2,6 @@ import { Banner, Icon } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import { action } from '@storybook/addon-actions'; -import React from 'react'; import { kitContext, UiKitBanner } from '..'; import * as payloads from './payloads'; diff --git a/packages/fuselage-ui-kit/src/stories/Message.stories.tsx b/packages/fuselage-ui-kit/src/stories/Message.stories.tsx index 39a72aa61b0d..537110a5f63b 100644 --- a/packages/fuselage-ui-kit/src/stories/Message.stories.tsx +++ b/packages/fuselage-ui-kit/src/stories/Message.stories.tsx @@ -2,7 +2,6 @@ import { Message, Avatar } from '@rocket.chat/fuselage'; import type * as UiKit from '@rocket.chat/ui-kit'; import { action } from '@storybook/addon-actions'; -import React from 'react'; import { kitContext, UiKitMessage } from '..'; import * as payloads from './payloads'; diff --git a/packages/fuselage-ui-kit/src/stories/Modal.stories.tsx b/packages/fuselage-ui-kit/src/stories/Modal.stories.tsx index ab4f63d95e8f..5a30b9f88f55 100644 --- a/packages/fuselage-ui-kit/src/stories/Modal.stories.tsx +++ b/packages/fuselage-ui-kit/src/stories/Modal.stories.tsx @@ -14,7 +14,6 @@ import { import type * as UiKit from '@rocket.chat/ui-kit'; import { action } from '@storybook/addon-actions'; import type { ReactNode } from 'react'; -import React from 'react'; import { kitContext, UiKitModal } from '..'; import * as payloads from './payloads'; diff --git a/packages/fuselage-ui-kit/src/surfaces/BannerSurface.tsx b/packages/fuselage-ui-kit/src/surfaces/BannerSurface.tsx index a1df576be0ee..dcd89bdf859f 100644 --- a/packages/fuselage-ui-kit/src/surfaces/BannerSurface.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/BannerSurface.tsx @@ -1,6 +1,5 @@ import { Margins } from '@rocket.chat/fuselage'; import type { ReactElement, ReactNode } from 'react'; -import React from 'react'; import { Surface } from './Surface'; diff --git a/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx b/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx index fe2e61ee590f..9760d8ae55c8 100644 --- a/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/FuselageSurfaceRenderer.tsx @@ -1,6 +1,6 @@ import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React, { Fragment } from 'react'; +import { Fragment } from 'react'; import ActionsBlock from '../blocks/ActionsBlock'; import ContextBlock from '../blocks/ContextBlock'; diff --git a/packages/fuselage-ui-kit/src/surfaces/MessageSurface.tsx b/packages/fuselage-ui-kit/src/surfaces/MessageSurface.tsx index af08af109006..8342de167014 100644 --- a/packages/fuselage-ui-kit/src/surfaces/MessageSurface.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/MessageSurface.tsx @@ -1,6 +1,5 @@ import { Margins } from '@rocket.chat/fuselage'; import type { ReactElement, ReactNode } from 'react'; -import React from 'react'; import { Surface } from './Surface'; diff --git a/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx b/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx index 6d83d774a9ed..2be769bd1f14 100644 --- a/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/MessageSurfaceRenderer.tsx @@ -1,6 +1,5 @@ import * as UiKit from '@rocket.chat/ui-kit'; import type { ReactElement } from 'react'; -import React from 'react'; import VideoConferenceBlock from '../blocks/VideoConferenceBlock/VideoConferenceBlock'; import { FuselageSurfaceRenderer } from './FuselageSurfaceRenderer'; diff --git a/packages/fuselage-ui-kit/src/surfaces/ModalSurface.tsx b/packages/fuselage-ui-kit/src/surfaces/ModalSurface.tsx index 7be41b4c5ed8..d4c63fcbe16c 100644 --- a/packages/fuselage-ui-kit/src/surfaces/ModalSurface.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/ModalSurface.tsx @@ -1,6 +1,5 @@ import { Margins } from '@rocket.chat/fuselage'; import type { ReactElement, ReactNode } from 'react'; -import React from 'react'; import { Surface } from './Surface'; diff --git a/packages/fuselage-ui-kit/src/surfaces/Surface.tsx b/packages/fuselage-ui-kit/src/surfaces/Surface.tsx index 1ce5d01743c1..56b6b80deca8 100644 --- a/packages/fuselage-ui-kit/src/surfaces/Surface.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/Surface.tsx @@ -1,5 +1,4 @@ import type { ContextType, ReactElement, ReactNode } from 'react'; -import React from 'react'; import { SurfaceContext } from '../contexts/SurfaceContext'; diff --git a/packages/fuselage-ui-kit/src/surfaces/SurfaceContext.tsx b/packages/fuselage-ui-kit/src/surfaces/SurfaceContext.tsx index 452902206431..539985a57c1c 100644 --- a/packages/fuselage-ui-kit/src/surfaces/SurfaceContext.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/SurfaceContext.tsx @@ -1,5 +1,5 @@ import type { FC } from 'react'; -import React, { createContext, useContext } from 'react'; +import { createContext, useContext } from 'react'; export type SurfaceContextValue = { type: 'message' | 'modal' | 'banner'; diff --git a/packages/fuselage-ui-kit/src/surfaces/createSurfaceRenderer.tsx b/packages/fuselage-ui-kit/src/surfaces/createSurfaceRenderer.tsx index c17b42002f41..329664e1f2d8 100644 --- a/packages/fuselage-ui-kit/src/surfaces/createSurfaceRenderer.tsx +++ b/packages/fuselage-ui-kit/src/surfaces/createSurfaceRenderer.tsx @@ -1,6 +1,5 @@ import type * as UiKit from '@rocket.chat/ui-kit'; import type { ComponentType, ReactElement } from 'react'; -import React from 'react'; export const createSurfaceRenderer = < S extends UiKit.SurfaceRenderer diff --git a/packages/ui-client/src/components/Header/Header.tsx b/packages/ui-client/src/components/Header/Header.tsx index 9939d5da8956..c204b4d4bc0d 100644 --- a/packages/ui-client/src/components/Header/Header.tsx +++ b/packages/ui-client/src/components/Header/Header.tsx @@ -1,7 +1,6 @@ import { Box } from '@rocket.chat/fuselage'; import { useLayout } from '@rocket.chat/ui-contexts'; import type { FC, ComponentProps } from 'react'; -import React from 'react'; import HeaderDivider from './HeaderDivider'; diff --git a/packages/ui-client/src/components/Header/HeaderAvatar.tsx b/packages/ui-client/src/components/Header/HeaderAvatar.tsx index 6982752b9033..ea69268cf36d 100644 --- a/packages/ui-client/src/components/Header/HeaderAvatar.tsx +++ b/packages/ui-client/src/components/Header/HeaderAvatar.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { FC, ComponentProps } from 'react'; -import React from 'react'; const HeaderAvatar: FC> = (props) => ; diff --git a/packages/ui-client/src/components/Header/HeaderContent.tsx b/packages/ui-client/src/components/Header/HeaderContent.tsx index 0879fd17c74a..ac76a80895c0 100644 --- a/packages/ui-client/src/components/Header/HeaderContent.tsx +++ b/packages/ui-client/src/components/Header/HeaderContent.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { FC, ComponentProps } from 'react'; -import React from 'react'; const HeaderContent: FC> = (props) => ( diff --git a/packages/ui-client/src/components/Header/HeaderContentRow.tsx b/packages/ui-client/src/components/Header/HeaderContentRow.tsx index cb2517aa9619..22f879f1e2c1 100644 --- a/packages/ui-client/src/components/Header/HeaderContentRow.tsx +++ b/packages/ui-client/src/components/Header/HeaderContentRow.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { FC, ComponentProps } from 'react'; -import React from 'react'; const HeaderContentRow: FC> = (props) => ( diff --git a/packages/ui-client/src/components/Header/HeaderDivider.tsx b/packages/ui-client/src/components/Header/HeaderDivider.tsx index 53b30dfcb6a0..e9932f44a6a8 100644 --- a/packages/ui-client/src/components/Header/HeaderDivider.tsx +++ b/packages/ui-client/src/components/Header/HeaderDivider.tsx @@ -1,6 +1,5 @@ import { Divider } from '@rocket.chat/fuselage'; import type { FC } from 'react'; -import React from 'react'; const HeaderDivider: FC = () => ; diff --git a/packages/ui-client/src/components/Header/HeaderIcon.tsx b/packages/ui-client/src/components/Header/HeaderIcon.tsx index 0717c3a7ccc1..8d3a76d070ef 100644 --- a/packages/ui-client/src/components/Header/HeaderIcon.tsx +++ b/packages/ui-client/src/components/Header/HeaderIcon.tsx @@ -1,6 +1,6 @@ import { Box, Icon } from '@rocket.chat/fuselage'; import type { FC, ReactElement } from 'react'; -import React, { isValidElement } from 'react'; +import { isValidElement } from 'react'; type HeaderIconProps = { icon: ReactElement | { name: string; color?: string } | null }; diff --git a/packages/ui-client/src/components/Header/HeaderLink.tsx b/packages/ui-client/src/components/Header/HeaderLink.tsx index 12e973e65a87..fa71f278bab1 100644 --- a/packages/ui-client/src/components/Header/HeaderLink.tsx +++ b/packages/ui-client/src/components/Header/HeaderLink.tsx @@ -1,7 +1,6 @@ import { css } from '@rocket.chat/css-in-js'; import { Box, Palette } from '@rocket.chat/fuselage'; import type { ComponentProps, FC } from 'react'; -import React from 'react'; const HeaderLink: FC> = (props) => ( = (props) => (props.onClick ? : ); diff --git a/packages/ui-client/src/components/Header/HeaderSubtitle.tsx b/packages/ui-client/src/components/Header/HeaderSubtitle.tsx index 221d0b58470e..facaadf599c0 100644 --- a/packages/ui-client/src/components/Header/HeaderSubtitle.tsx +++ b/packages/ui-client/src/components/Header/HeaderSubtitle.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { FC, ComponentProps } from 'react'; -import React from 'react'; const HeaderSubtitle: FC> = (props) => ; diff --git a/packages/ui-client/src/components/Header/HeaderTag.tsx b/packages/ui-client/src/components/Header/HeaderTag.tsx index fdc6798c7d5f..0eb1946179e9 100644 --- a/packages/ui-client/src/components/Header/HeaderTag.tsx +++ b/packages/ui-client/src/components/Header/HeaderTag.tsx @@ -1,6 +1,5 @@ import { Box, Tag } from '@rocket.chat/fuselage'; import type { ComponentProps, FC } from 'react'; -import React from 'react'; const HeaderTag: FC> = ({ children, ...props }) => ( diff --git a/packages/ui-client/src/components/Header/HeaderTagIcon.tsx b/packages/ui-client/src/components/Header/HeaderTagIcon.tsx index 89dad116045f..bb18633409f0 100644 --- a/packages/ui-client/src/components/Header/HeaderTagIcon.tsx +++ b/packages/ui-client/src/components/Header/HeaderTagIcon.tsx @@ -1,6 +1,6 @@ import { Box, Icon } from '@rocket.chat/fuselage'; import type { ComponentProps, FC, ReactElement } from 'react'; -import React, { isValidElement } from 'react'; +import { isValidElement } from 'react'; type HeaderIconProps = { icon: ReactElement | Pick, 'name' | 'color'> | null; diff --git a/packages/ui-client/src/components/Header/HeaderTagSkeleton.tsx b/packages/ui-client/src/components/Header/HeaderTagSkeleton.tsx index b228d58e01b8..66f57d5f4b31 100644 --- a/packages/ui-client/src/components/Header/HeaderTagSkeleton.tsx +++ b/packages/ui-client/src/components/Header/HeaderTagSkeleton.tsx @@ -1,6 +1,5 @@ import { Skeleton } from '@rocket.chat/fuselage'; import type { FC } from 'react'; -import React from 'react'; const HeaderTagSkeleton: FC = () => ; export default HeaderTagSkeleton; diff --git a/packages/ui-client/src/components/Header/HeaderTitle.tsx b/packages/ui-client/src/components/Header/HeaderTitle.tsx index 7998940ab9f6..b10b1a4ebb80 100644 --- a/packages/ui-client/src/components/Header/HeaderTitle.tsx +++ b/packages/ui-client/src/components/Header/HeaderTitle.tsx @@ -1,6 +1,5 @@ import { Box } from '@rocket.chat/fuselage'; import type { FC, ComponentProps } from 'react'; -import React from 'react'; const HeaderTitle: FC> = (props) => ( diff --git a/packages/ui-client/src/components/Header/ToolBox/ToolBoxAction.tsx b/packages/ui-client/src/components/Header/ToolBox/ToolBoxAction.tsx index ef6eab7a347d..26a10a389ca3 100644 --- a/packages/ui-client/src/components/Header/ToolBox/ToolBoxAction.tsx +++ b/packages/ui-client/src/components/Header/ToolBox/ToolBoxAction.tsx @@ -1,6 +1,5 @@ import { IconButton } from '@rocket.chat/fuselage'; import type { FC } from 'react'; -import React from 'react'; const ToolBoxAction: FC = ({ id, icon, color, action, className, index, title, 'data-tooltip': tooltip, ...props }) => ( > = (props) => ( ( From 035938e345ec99f2642f531e117c04171ed52f22 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 11:41:27 -0300 Subject: [PATCH 08/17] cleanup props defined in base file --- apps/meteor/tsconfig.json | 4 ---- ee/apps/account-service/tsconfig.json | 4 ---- packages/fuselage-ui-kit/tsconfig.json | 6 +----- packages/livechat/tsconfig.json | 1 - 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/apps/meteor/tsconfig.json b/apps/meteor/tsconfig.json index 1c91cb6bc8b2..d8d669655e76 100644 --- a/apps/meteor/tsconfig.json +++ b/apps/meteor/tsconfig.json @@ -12,13 +12,9 @@ "noEmit": true, /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, "strictPropertyInitialization": false, /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, "noImplicitReturns": false, "noFallthroughCasesInSwitch": false, diff --git a/ee/apps/account-service/tsconfig.json b/ee/apps/account-service/tsconfig.json index 00af6b496ece..b30b29e177e5 100644 --- a/ee/apps/account-service/tsconfig.json +++ b/ee/apps/account-service/tsconfig.json @@ -5,14 +5,10 @@ "incremental": true, /* Strict Type-Checking Options */ - "noImplicitAny": true, - "strictNullChecks": true, "strictPropertyInitialization": false, "strictFunctionTypes": false, /* Additional Checks */ - "noUnusedLocals": true, - "noUnusedParameters": true, "noImplicitReturns": false, "noFallthroughCasesInSwitch": false, diff --git a/packages/fuselage-ui-kit/tsconfig.json b/packages/fuselage-ui-kit/tsconfig.json index 53e6f0efe7f2..df40bf7a9cd9 100644 --- a/packages/fuselage-ui-kit/tsconfig.json +++ b/packages/fuselage-ui-kit/tsconfig.json @@ -6,11 +6,7 @@ "allowJs": false, "noImplicitReturns": true, "noImplicitThis": true, - "noImplicitAny": true, - "strictNullChecks": true, - "suppressImplicitAnyIndexErrors": true, - "noUnusedLocals": true, - "noUnusedParameters": true, + "suppressImplicitAnyIndexErrors": true }, "exclude": ["node_modules", "dist"] } diff --git a/packages/livechat/tsconfig.json b/packages/livechat/tsconfig.json index ca93278ad51a..e84923a169eb 100644 --- a/packages/livechat/tsconfig.json +++ b/packages/livechat/tsconfig.json @@ -4,7 +4,6 @@ "outDir": "./dist", "allowJs": true, "checkJs": false, - "noImplicitAny": true, "jsxImportSource": "preact", }, "exclude": [ From 873dbf91284b34e0db0836a7ddf4f6e8f15cd746 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 12:02:11 -0300 Subject: [PATCH 09/17] presence declarations --- packages/presence/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/presence/tsconfig.json b/packages/presence/tsconfig.json index 2c48a3a994c6..fb32de4565dc 100644 --- a/packages/presence/tsconfig.json +++ b/packages/presence/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../tsconfig.base.server.json", "compilerOptions": { "strictPropertyInitialization": false, // TODO: Remove this line + "declaration": true, "outDir": "./dist" }, "include": ["../../apps/meteor/definition/externals/meteor/rocketchat-streamer.d.ts"], From 29edcd807751c998cd805640cba59ec6bd416d8f Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 13:35:22 -0300 Subject: [PATCH 10/17] fix main --- ee/apps/presence-service/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/apps/presence-service/package.json b/ee/apps/presence-service/package.json index bb8a0db6f6bb..259cc7c7ca45 100644 --- a/ee/apps/presence-service/package.json +++ b/ee/apps/presence-service/package.json @@ -39,7 +39,7 @@ "ts-node": "^10.9.1", "typescript": "~4.5.5" }, - "main": "./dist/presence/src/Presence.js", + "main": "./dist/ee/apps/presence-service/src/service.js", "files": [ "/dist" ] From 490e08b60532e73a10d7ba82c877501abaa21ada Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 14:39:10 -0300 Subject: [PATCH 11/17] fix emoji replace --- packages/livechat/src/components/Emoji/shortnameToUnicode.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/livechat/src/components/Emoji/shortnameToUnicode.ts b/packages/livechat/src/components/Emoji/shortnameToUnicode.ts index 8c74ec8b8e69..bde44def846d 100644 --- a/packages/livechat/src/components/Emoji/shortnameToUnicode.ts +++ b/packages/livechat/src/components/Emoji/shortnameToUnicode.ts @@ -5,7 +5,6 @@ type EmojiShortname = keyof typeof emojis; type EmojiASCIICode = keyof typeof ascii; const shortnamePattern = new RegExp(/:[-+_a-z0-9]+:/, 'gi'); -const replaceShortNameWithUnicode = (shortname: EmojiShortname) => emojis[shortname] || shortname; const regAscii = new RegExp(`((\\s|^)${asciiRegexp}(?=\\s|$|[!,.?]))`, 'gi'); const unescaped = { @@ -31,7 +30,7 @@ type HTMLEntity = keyof typeof unescaped; const unescapeHTML = (string: string) => { return string.replace( /&(?:amp|#38|#x26|lt|#60|#x3C|gt|#62|#x3E|apos|#39|#x27|quot|#34|#x22);/gi, - (match: HTMLEntity) => unescaped[match], + (match: string) => unescaped[match as HTMLEntity], ); }; @@ -43,7 +42,7 @@ const isAscii = (string: string): string is EmojiASCIICode => { }; const shortnameToUnicode = (stringMessage: string) => { - stringMessage = stringMessage.replace(shortnamePattern, replaceShortNameWithUnicode); + stringMessage = stringMessage.replace(shortnamePattern, (shortname: string) => emojis[shortname as EmojiShortname] || shortname); stringMessage = stringMessage.replace(regAscii, (entire, _dummy1, _dummy2, m3) => { return isAscii(m3) ? unescapeHTML(m3) : entire; }); From fbfa1c6bc6173945cedb46fcfc6218c1efbb15b6 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 16:03:47 -0300 Subject: [PATCH 12/17] Change ui-theming to react --- ee/packages/ui-theming/src/PaletteStyleTag.tsx | 1 + ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx | 2 +- ee/packages/ui-theming/tsconfig.json | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ee/packages/ui-theming/src/PaletteStyleTag.tsx b/ee/packages/ui-theming/src/PaletteStyleTag.tsx index d4260761d3a6..8d9f9db82eb3 100644 --- a/ee/packages/ui-theming/src/PaletteStyleTag.tsx +++ b/ee/packages/ui-theming/src/PaletteStyleTag.tsx @@ -1,4 +1,5 @@ import type { ReactElement } from 'react'; +import React from 'react'; import { createPortal } from 'react-dom'; import { useSessionStorage } from '@rocket.chat/fuselage-hooks'; diff --git a/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx b/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx index daedacb42644..b7f411c8fbcd 100644 --- a/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx +++ b/ee/packages/ui-theming/src/SidebarPaletteStyleTag.tsx @@ -1,5 +1,5 @@ import type { ReactElement } from 'react'; -import { memo } from 'react'; +import React, { memo } from 'react'; import { createPortal } from 'react-dom'; import { useSessionStorage } from '@rocket.chat/fuselage-hooks'; diff --git a/ee/packages/ui-theming/tsconfig.json b/ee/packages/ui-theming/tsconfig.json index 03eccb996d38..750be5a74909 100644 --- a/ee/packages/ui-theming/tsconfig.json +++ b/ee/packages/ui-theming/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../../tsconfig.base.client.json", "compilerOptions": { + "jsx": "react", "rootDir": "./src", "outDir": "./dist" }, From 4edd8532733a216695cd26c543114b5755cb02bf Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 16:05:03 -0300 Subject: [PATCH 13/17] fix type imports --- .../rocket-chat/slash-commands/actions.spec.ts | 2 +- apps/meteor/tests/data/livechat/business-hours.ts | 2 +- apps/meteor/tests/data/livechat/canned-responses.ts | 2 +- apps/meteor/tests/data/livechat/custom-fields.ts | 2 +- apps/meteor/tests/data/livechat/department.ts | 2 +- apps/meteor/tests/data/livechat/priorities.ts | 4 ++-- apps/meteor/tests/data/livechat/rooms.ts | 2 +- apps/meteor/tests/data/livechat/tags.ts | 4 ++-- apps/meteor/tests/data/livechat/triggers.ts | 6 +++--- apps/meteor/tests/data/livechat/units.ts | 6 +++--- .../rocket-chat/slash-commands/actions.spec.ts | 2 +- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/meteor/ee/tests/unit/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/actions.spec.ts b/apps/meteor/ee/tests/unit/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/actions.spec.ts index 476dd2eb61cc..a9a163bd6906 100644 --- a/apps/meteor/ee/tests/unit/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/actions.spec.ts +++ b/apps/meteor/ee/tests/unit/app/federation-v2/server/infrastructure/rocket-chat/slash-commands/actions.spec.ts @@ -2,7 +2,7 @@ import proxyquire from 'proxyquire'; import { expect } from 'chai'; import sinon from 'sinon'; -import { IUser } from '@rocket.chat/core-typings'; +import type { IUser } from '@rocket.chat/core-typings'; const { executeSlashCommand } = proxyquire.noCallThru().load('../../../../../../../../app/federation-v2/server/infrastructure/rocket-chat/slash-commands/action', { '@rocket.chat/models': { diff --git a/apps/meteor/tests/data/livechat/business-hours.ts b/apps/meteor/tests/data/livechat/business-hours.ts index 90835d1d8500..28177c63056b 100644 --- a/apps/meteor/tests/data/livechat/business-hours.ts +++ b/apps/meteor/tests/data/livechat/business-hours.ts @@ -1,4 +1,4 @@ -import { ILivechatBusinessHour } from '@rocket.chat/core-typings'; +import type { ILivechatBusinessHour } from '@rocket.chat/core-typings'; import { credentials, methodCall, request } from '../api-data'; export const saveBusinessHour = async (businessHour: ILivechatBusinessHour) => { diff --git a/apps/meteor/tests/data/livechat/canned-responses.ts b/apps/meteor/tests/data/livechat/canned-responses.ts index c177935aae4a..ded1dd1e37ed 100644 --- a/apps/meteor/tests/data/livechat/canned-responses.ts +++ b/apps/meteor/tests/data/livechat/canned-responses.ts @@ -1,5 +1,5 @@ import faker from '@faker-js/faker'; -import { IOmnichannelCannedResponse } from '@rocket.chat/core-typings'; +import type { IOmnichannelCannedResponse } from '@rocket.chat/core-typings'; import { api, credentials, request } from '../api-data'; import type { DummyResponse } from './utils'; diff --git a/apps/meteor/tests/data/livechat/custom-fields.ts b/apps/meteor/tests/data/livechat/custom-fields.ts index ddae4d2b888f..2bbb6c732881 100644 --- a/apps/meteor/tests/data/livechat/custom-fields.ts +++ b/apps/meteor/tests/data/livechat/custom-fields.ts @@ -1,5 +1,5 @@ import type { Response } from 'supertest'; -import { ILivechatCustomField } from '@rocket.chat/core-typings'; +import type { ILivechatCustomField } from '@rocket.chat/core-typings'; import { credentials, request, methodCall, api } from './../api-data'; export const createCustomField = (customField: ILivechatCustomField) => new Promise((resolve, reject) => { diff --git a/apps/meteor/tests/data/livechat/department.ts b/apps/meteor/tests/data/livechat/department.ts index 8a04f4297b46..48b9acb7ebfe 100644 --- a/apps/meteor/tests/data/livechat/department.ts +++ b/apps/meteor/tests/data/livechat/department.ts @@ -4,7 +4,7 @@ import { api, credentials, methodCall, request } from '../api-data'; import { password } from '../user'; import { createUser, login } from '../users.helper'; import { createAgent, makeAgentAvailable } from './rooms'; -import { DummyResponse } from './utils'; +import type { DummyResponse } from './utils'; export const createDepartment = (): Promise => new Promise((resolve, reject) => { diff --git a/apps/meteor/tests/data/livechat/priorities.ts b/apps/meteor/tests/data/livechat/priorities.ts index 06a40e2328f2..fda30a787c00 100644 --- a/apps/meteor/tests/data/livechat/priorities.ts +++ b/apps/meteor/tests/data/livechat/priorities.ts @@ -1,7 +1,7 @@ import faker from '@faker-js/faker'; -import { ILivechatPriority } from '@rocket.chat/core-typings'; +import type { ILivechatPriority } from '@rocket.chat/core-typings'; import { credentials, methodCall, request } from '../api-data'; -import { DummyResponse } from './utils'; +import type { DummyResponse } from './utils'; export const savePriority = (): Promise => { return new Promise((resolve, reject) => { diff --git a/apps/meteor/tests/data/livechat/rooms.ts b/apps/meteor/tests/data/livechat/rooms.ts index a09066513a45..6cc320949dc5 100644 --- a/apps/meteor/tests/data/livechat/rooms.ts +++ b/apps/meteor/tests/data/livechat/rooms.ts @@ -2,7 +2,7 @@ import faker from '@faker-js/faker'; import type { IInquiry, ILivechatAgent, ILivechatDepartment, ILivechatVisitor, IMessage, IOmnichannelRoom } from '@rocket.chat/core-typings'; import { api, credentials, methodCall, request } from '../api-data'; import { adminUsername } from '../user'; -import { DummyResponse } from './utils'; +import type { DummyResponse } from './utils'; export const createLivechatRoom = (visitorToken: string): Promise => new Promise((resolve) => { diff --git a/apps/meteor/tests/data/livechat/tags.ts b/apps/meteor/tests/data/livechat/tags.ts index 5244e0a1f570..c85d161a0774 100644 --- a/apps/meteor/tests/data/livechat/tags.ts +++ b/apps/meteor/tests/data/livechat/tags.ts @@ -1,7 +1,7 @@ import faker from '@faker-js/faker'; -import { ILivechatTag } from '@rocket.chat/core-typings'; +import type { ILivechatTag } from '@rocket.chat/core-typings'; import { credentials, methodCall, request } from '../api-data'; -import { DummyResponse } from './utils'; +import type { DummyResponse } from './utils'; export const saveTags = (): Promise => { return new Promise((resolve, reject) => { diff --git a/apps/meteor/tests/data/livechat/triggers.ts b/apps/meteor/tests/data/livechat/triggers.ts index 5c821b4495ad..75db70b41e28 100644 --- a/apps/meteor/tests/data/livechat/triggers.ts +++ b/apps/meteor/tests/data/livechat/triggers.ts @@ -1,7 +1,7 @@ import faker from '@faker-js/faker'; -import { ILivechatTrigger } from '@rocket.chat/core-typings'; +import type { ILivechatTrigger } from '@rocket.chat/core-typings'; import { api, credentials, methodCall, request } from '../api-data'; -import { DummyResponse } from './utils'; +import type { DummyResponse } from './utils'; export const createTrigger = (name: string): Promise => { return new Promise((resolve, reject) => { @@ -37,4 +37,4 @@ export const fetchTriggers = (): Promise => { resolve(res.body.triggers); }); }); -}; \ No newline at end of file +}; diff --git a/apps/meteor/tests/data/livechat/units.ts b/apps/meteor/tests/data/livechat/units.ts index 70ab9eed886d..07f11cfc3ca2 100644 --- a/apps/meteor/tests/data/livechat/units.ts +++ b/apps/meteor/tests/data/livechat/units.ts @@ -1,7 +1,7 @@ import faker from "@faker-js/faker"; -import { IOmnichannelBusinessUnit } from "@rocket.chat/core-typings"; +import type { IOmnichannelBusinessUnit } from "@rocket.chat/core-typings"; import { methodCall, credentials, request } from "../api-data"; -import { DummyResponse } from "./utils"; +import type { DummyResponse } from "./utils"; export const createMonitor = async (username: string): Promise<{ _id: string; username: string }> => { return new Promise((resolve, reject) => { @@ -45,4 +45,4 @@ export const createUnit = async (monitorId: string, username: string, department resolve(JSON.parse(res.body.message).result); }); }); -}; \ No newline at end of file +}; diff --git a/apps/meteor/tests/unit/app/federation-v2/server/unit/infrastructure/rocket-chat/slash-commands/actions.spec.ts b/apps/meteor/tests/unit/app/federation-v2/server/unit/infrastructure/rocket-chat/slash-commands/actions.spec.ts index aa873af94f82..2577b2eeac5d 100644 --- a/apps/meteor/tests/unit/app/federation-v2/server/unit/infrastructure/rocket-chat/slash-commands/actions.spec.ts +++ b/apps/meteor/tests/unit/app/federation-v2/server/unit/infrastructure/rocket-chat/slash-commands/actions.spec.ts @@ -2,7 +2,7 @@ import proxyquire from 'proxyquire'; import { expect } from 'chai'; import sinon from 'sinon'; -import { IUser } from '@rocket.chat/core-typings'; +import type { IUser } from '@rocket.chat/core-typings'; const { normalizeExternalInviteeId, From 628c10b45e49da22c2af9589ab7e921066d5be88 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 16:05:23 -0300 Subject: [PATCH 14/17] Build type declarations for agenda --- packages/agenda/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/agenda/tsconfig.json b/packages/agenda/tsconfig.json index a132d2e280b6..52e9dd8c4976 100644 --- a/packages/agenda/tsconfig.json +++ b/packages/agenda/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.base.server.json", "compilerOptions": { + "declaration": true, "rootDir": "./src", "outDir": "./dist" }, From 88094995911e7fcd5e3fc9db1bd2f97d581f5858 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Fri, 23 Dec 2022 16:06:27 -0300 Subject: [PATCH 15/17] remove incremental from meteor --- apps/meteor/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/meteor/tsconfig.json b/apps/meteor/tsconfig.json index d8d669655e76..2f86ae9c4885 100644 --- a/apps/meteor/tsconfig.json +++ b/apps/meteor/tsconfig.json @@ -8,7 +8,6 @@ "allowJs": true, "checkJs": false, "jsx": "react", - "incremental": true, "noEmit": true, /* Strict Type-Checking Options */ From 1fb55e4ea7d01364f4adeb143b3ff6574583bc9f Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 26 Dec 2022 10:46:31 -0300 Subject: [PATCH 16/17] fix core-typings build for node --- packages/core-typings/tsconfig.json | 4 +++- tsconfig.base.server.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core-typings/tsconfig.json b/packages/core-typings/tsconfig.json index e2be47cf5499..067273c91d3b 100644 --- a/packages/core-typings/tsconfig.json +++ b/packages/core-typings/tsconfig.json @@ -1,6 +1,8 @@ { - "extends": "../../tsconfig.base.client.json", + "extends": "../../tsconfig.base.server.json", "compilerOptions": { + "lib": ["dom", "dom.iterable"], + "declaration": true, "rootDir": "./src", "outDir": "./dist" }, diff --git a/tsconfig.base.server.json b/tsconfig.base.server.json index 6d8a33294637..a7a87f033d7f 100644 --- a/tsconfig.base.server.json +++ b/tsconfig.base.server.json @@ -4,6 +4,7 @@ "target": "es2020", "lib": ["es2020"], "module": "commonjs", + "sourceMap": true, }, "exclude": ["node_modules", "**/*.spec.ts"] } From d370e95063d24bcb9e6be52d08022bb59ae99e12 Mon Sep 17 00:00:00 2001 From: Diego Sampaio Date: Mon, 26 Dec 2022 10:47:01 -0300 Subject: [PATCH 17/17] add platform --- docker-compose-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index c1c356683b06..0f6a009a2e3b 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -2,6 +2,7 @@ version: '3.8' services: rocketchat: + platform: linux/amd64 build: dockerfile: ${RC_DOCKERFILE} context: /tmp/build @@ -25,6 +26,7 @@ services: traefik.http.routers.rocketchat.rule: PathPrefix(`/`) authorization-service: + platform: linux/amd64 build: dockerfile: ee/apps/authorization-service/Dockerfile args: @@ -40,6 +42,7 @@ services: - nats account-service: + platform: linux/amd64 build: dockerfile: ee/apps/account-service/Dockerfile args: @@ -55,6 +58,7 @@ services: - nats presence-service: + platform: linux/amd64 build: dockerfile: ee/apps/presence-service/Dockerfile args: @@ -70,6 +74,7 @@ services: - nats ddp-streamer-service: + platform: linux/amd64 build: dockerfile: ee/apps/ddp-streamer/Dockerfile args: @@ -91,6 +96,7 @@ services: traefik.http.routers.ddp-streamer-service.rule: PathPrefix(`/websocket`) || PathPrefix(`/sockjs`) stream-hub-service: + platform: linux/amd64 build: dockerfile: ee/apps/stream-hub-service/Dockerfile args: