From 772019711d472809f0eb0add49783b8333e6dcb6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 21 Oct 2024 14:40:49 +0100 Subject: [PATCH] Small tweaks & improvements (#28253) * Ignore playwright generated files in git & prettier Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Correct .editorconfig Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix jest coverage errors Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Exclude scripts & type defs from coverage Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .editorconfig | 2 +- .prettierignore | 5 +++++ jest.config.ts | 2 ++ playwright/.gitignore | 2 ++ sonar-project.properties | 10 +++++++++- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index b50253df1f1..5f5b1286231 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,7 +18,7 @@ trim_trailing_whitespace = true indent_size = 4 [package.json] -indent_size = 2 +indent_size = 4 [*.tsx.snap] trim_trailing_whitespace = false diff --git a/.prettierignore b/.prettierignore index 0cca8fb6aa6..418329cf287 100644 --- a/.prettierignore +++ b/.prettierignore @@ -37,5 +37,10 @@ package-lock.json # Downloaded and already minified res/jitsi_external_api.min.js + # This file is also machine-generated /playwright/e2e/crypto/test_indexeddb_cryptostore_dump/dump.json +/playwright/test-results/ +/playwright/html-report/ +/playwright/logs/ +/playwright/snapshots/ diff --git a/jest.config.ts b/jest.config.ts index 9cc320d6ea6..4f75eb04db4 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -44,6 +44,8 @@ const config: Config = { // getSessionLock is piped into a different JS context via stringification, and the coverage functionality is // not available in that contest. So, turn off coverage instrumentation for it. "!/src/utils/SessionLock.ts", + // Coverage chokes on type definition files + "!/src/**/*.d.ts", ], coverageReporters: ["text-summary", "lcov"], testResultsProcessor: "@casualbot/jest-sonar-reporter", diff --git a/playwright/.gitignore b/playwright/.gitignore index 0d50077f5ad..78bb2e0277b 100644 --- a/playwright/.gitignore +++ b/playwright/.gitignore @@ -4,3 +4,5 @@ # Only commit snapshots from Linux /snapshots/**/*.png !/snapshots/**/*-linux.png +# This file is machine-generated +/e2e/crypto/test_indexeddb_cryptostore_dump/dump.json diff --git a/sonar-project.properties b/sonar-project.properties index 925cffcacdb..2d87d32efcd 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -11,5 +11,13 @@ sonar.exclusions=__mocks__,docs,element.io,nginx sonar.cpd.exclusions=src/i18n/strings/*.json sonar.typescript.tsconfigPath=./tsconfig.json sonar.javascript.lcov.reportPaths=coverage/lcov.info -sonar.coverage.exclusions=test/**/*,playwright/**/*,res/**/*,src/vector/modernizr.js,src/components/views/dialogs/devtools/**/*,src/utils/SessionLock.ts +sonar.coverage.exclusions=\ + test/**/*,\ + playwright/**/*,\ + res/**/*,\ + scripts/**/*,\ + src/vector/modernizr.js,\ + src/components/views/dialogs/devtools/**/*,\ + src/utils/SessionLock.ts,\ + src/**/*.d.ts sonar.testExecutionReportPaths=coverage/jest-sonar-report.xml