From a0c8575113ac74119cd7841e956cc13463ff9244 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:56:39 +0000 Subject: [PATCH] Update dependency prettier to v3 (#12095) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .../consent/res/templates/privacy/en/1.0.html | 2 +- .../res/templates/privacy/en/success.html | 2 +- package.json | 7 +- playwright/e2e/read-receipts/index.ts | 12 +++- playwright/pages/bot.ts | 6 +- playwright/pages/network.ts | 5 +- .../consent/res/templates/privacy/en/1.0.html | 2 +- .../res/templates/privacy/en/success.html | 2 +- res/css/_common.pcss | 5 +- .../dialogs/polls/_PollDetailHeader.pcss | 2 +- .../dialogs/polls/_PollListItemEnded.pcss | 2 +- .../views/elements/_FilterTabGroup.pcss | 2 +- .../components/views/polls/_PollOption.pcss | 3 +- .../devices/_CurrentDeviceSection.pcss | 2 +- .../devices/_DeviceDetailHeading.pcss | 2 +- .../settings/devices/_FilteredDeviceList.pcss | 4 +- .../settings/shared/_SettingsSubsection.pcss | 3 +- res/css/structures/_AutocompleteInput.pcss | 2 +- res/css/structures/_MessagePanel.pcss | 4 +- res/css/structures/_SpacePanel.pcss | 3 +- res/css/structures/_SplashPage.pcss | 3 +- res/css/views/auth/_AuthBody.pcss | 6 +- .../views/avatars/_DecoratedRoomAvatar.pcss | 4 +- .../context_menus/_IconizedContextMenu.pcss | 2 +- .../dialogs/_AddExistingToSpaceDialog.pcss | 4 +- res/css/views/dialogs/_FeedbackDialog.pcss | 4 +- res/css/views/elements/_Dropdown.pcss | 2 +- res/css/views/elements/_Field.pcss | 10 ++- .../elements/_GenericEventListSummary.pcss | 2 +- .../views/elements/_InteractiveTooltip.pcss | 4 +- res/css/views/elements/_ReplyChain.pcss | 2 +- res/css/views/elements/_Slider.pcss | 4 +- res/css/views/right_panel/_BaseCard.pcss | 6 +- res/css/views/right_panel/_UserInfo.pcss | 2 +- res/css/views/rooms/_EventBubbleTile.pcss | 4 +- res/css/views/rooms/_EventTile.pcss | 20 +++--- res/css/views/rooms/_ReadReceiptGroup.pcss | 6 +- res/css/views/rooms/_ReplyTile.pcss | 12 ++-- res/css/views/rooms/_RoomHeader.pcss | 2 +- .../wysiwyg_composer/components/_Editor.pcss | 4 +- res/css/views/settings/_Notifications.pcss | 4 +- .../tabs/user/_AppearanceUserSettingsTab.pcss | 3 +- .../tabs/user/_SidebarUserSettingsTab.pcss | 2 +- res/themes/light/css/_fonts.pcss | 40 +++++++---- src/@types/common.ts | 12 ++-- src/DecryptionFailureTracker.ts | 10 ++- src/HtmlUtils.tsx | 5 +- src/ScalarAuthClient.ts | 5 +- src/Terms.ts | 6 +- src/UserActivity.ts | 5 +- src/audio/ManagedPlayback.ts | 6 +- src/audio/Playback.ts | 5 +- src/audio/VoiceMessageRecording.ts | 5 +- src/autocomplete/NotifProvider.tsx | 5 +- src/autocomplete/RoomProvider.tsx | 5 +- src/components/structures/ThreadPanel.tsx | 3 +- .../dialogs/AddExistingToSpaceDialog.tsx | 51 +++++++------- .../dialogs/spotlight/SpotlightDialog.tsx | 15 +++-- .../views/elements/LazyRenderList.tsx | 6 +- .../elements/SpellCheckLanguagesDropdown.tsx | 3 +- src/components/views/messages/MPollBody.tsx | 6 +- src/components/views/right_panel/UserInfo.tsx | 12 ++-- .../views/settings/CrossSigningPanel.tsx | 5 +- .../settings/tabs/user/SessionManagerTab.tsx | 15 +++-- src/customisations/Media.ts | 5 +- src/editor/model.ts | 6 +- src/editor/offset.ts | 5 +- src/editor/parts.ts | 22 +++++-- src/editor/position.ts | 5 +- src/editor/range.ts | 6 +- src/models/Call.ts | 17 +++-- src/rageshake/rageshake.ts | 5 +- .../PushToMatrixClientController.ts | 5 +- .../controllers/UIFeatureController.ts | 5 +- .../handlers/DefaultSettingsHandler.ts | 5 +- .../handlers/DeviceSettingsHandler.ts | 5 +- src/settings/handlers/LocalEchoWrapper.ts | 5 +- src/stores/AsyncStore.ts | 5 +- src/stores/RoomViewStore.tsx | 21 +++--- src/stores/local-echo/EchoTransaction.ts | 5 +- src/stores/local-echo/GenericEchoChamber.ts | 5 +- .../notifications/ListNotificationState.ts | 5 +- src/stores/room-list/SlidingRoomListStore.ts | 5 +- .../list-ordering/OrderingAlgorithm.ts | 5 +- src/utils/DMRoomMap.ts | 21 +++--- src/utils/FixedRollingArray.ts | 5 +- src/utils/MarkedExecution.ts | 5 +- src/utils/RoomUpgrade.ts | 4 +- src/utils/Singleflight.ts | 5 +- src/utils/exportUtils/exportCustomCSS.css | 23 +++++-- src/utils/permalinks/Permalinks.ts | 6 +- .../audio/VoiceBroadcastRecorder.ts | 5 +- src/widgets/WidgetType.ts | 5 +- test/PosthogAnalytics-test.ts | 4 +- .../structures/AutocompleteInput-test.tsx | 2 +- .../views/context_menus/ContextMenu-test.tsx | 2 +- .../context_menus/MessageContextMenu-test.tsx | 2 +- .../context_menus/SpaceContextMenu-test.tsx | 2 +- .../views/messages/TextualBody-test.tsx | 13 +--- .../__snapshots__/TextualBody-test.tsx.snap | 66 +------------------ .../right_panel/PinnedMessagesCard-test.tsx | 2 +- .../right_panel/RoomSummaryCard-test.tsx | 2 +- .../views/rooms/RoomPreviewBar-test.tsx | 2 +- .../components/WysiwygAutocomplete-test.tsx | 2 +- .../components/WysiwygComposer-test.tsx | 2 +- test/models/Call-test.ts | 2 +- test/test-utils/call.ts | 5 +- test/toasts/IncomingCallToast-test.tsx | 2 +- .../shouldDisplayAsVoiceBroadcastTile-test.ts | 4 +- yarn.lock | 13 ++-- 110 files changed, 449 insertions(+), 313 deletions(-) diff --git a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html index 8ee888518a..bcc7a590bb 100644 --- a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html +++ b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html @@ -1,4 +1,4 @@ - + Test Privacy policy diff --git a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html index 8db01e8a6e..2a2b21eef4 100644 --- a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html +++ b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html @@ -1,4 +1,4 @@ - + Test Privacy policy diff --git a/package.json b/package.json index ea78eb25aa..c24bfe5230 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "prepublishOnly": "yarn build", "i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint", "i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json", - "i18n:lint": "matrix-i18n-lint && prettier --loglevel silent --write src/i18n/strings/ --ignore-path /dev/null", + "i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null", "i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json", "make-component": "node scripts/make-react-component.js", "rethemendex": "res/css/rethemendex.sh", @@ -47,7 +47,7 @@ "start:build": "babel src -w -s -d lib --verbose --extensions \".ts,.js\"", "lint": "yarn lint:types && yarn lint:js && yarn lint:style && yarn lint:workflows", "lint:js": "eslint --max-warnings 0 src test cypress playwright && prettier --check .", - "lint:js-fix": "eslint --fix src test cypress playwright && prettier --loglevel=warn --write .", + "lint:js-fix": "eslint --fix src test cypress playwright && prettier --log-level=warn --write .", "lint:types": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p cypress && tsc --noEmit --jsx react -p playwright", "lint:style": "stylelint \"res/css/**/*.pcss\"", "test": "jest", @@ -178,7 +178,6 @@ "@types/node": "^16", "@types/node-fetch": "^2.6.2", "@types/pako": "^2.0.0", - "@types/prettier": "^2.7.0", "@types/qrcode": "^1.3.5", "@types/react": "17.0.68", "@types/react-beautiful-dnd": "^13.0.0", @@ -226,7 +225,7 @@ "mocha-junit-reporter": "^2.2.0", "node-fetch": "2", "postcss-scss": "^4.0.4", - "prettier": "2.8.8", + "prettier": "3.1.1", "raw-loader": "^4.0.2", "rimraf": "^5.0.0", "stylelint": "^16.0.0", diff --git a/playwright/e2e/read-receipts/index.ts b/playwright/e2e/read-receipts/index.ts index 1a25d0946f..6b9a8381d2 100644 --- a/playwright/e2e/read-receipts/index.ts +++ b/playwright/e2e/read-receipts/index.ts @@ -68,7 +68,11 @@ export const test = base.extend<{ * which finds a message and then constructs a reply to it. */ export class MessageBuilder { - constructor(private page: Page, private app: ElementAppPage, private helpers: Helpers) {} + constructor( + private page: Page, + private app: ElementAppPage, + private helpers: Helpers, + ) {} /** * Map of message content -> event. @@ -334,7 +338,11 @@ export abstract class BotActionSpec { export type Message = string | MessageContentSpec | BotActionSpec; class Helpers { - constructor(private page: Page, private app: ElementAppPage, private bot: Bot) {} + constructor( + private page: Page, + private app: ElementAppPage, + private bot: Bot, + ) {} /** * Use the supplied client to send messages or perform actions as specified by diff --git a/playwright/pages/bot.ts b/playwright/pages/bot.ts index 69833bffa4..d6b729420c 100644 --- a/playwright/pages/bot.ts +++ b/playwright/pages/bot.ts @@ -68,7 +68,11 @@ export class Bot extends Client { public credentials?: Credentials; private handlePromise: Promise>; - constructor(page: Page, private homeserver: HomeserverInstance, private readonly opts: CreateBotOpts) { + constructor( + page: Page, + private homeserver: HomeserverInstance, + private readonly opts: CreateBotOpts, + ) { super(page); this.opts = Object.assign({}, defaultCreateBotOptions, opts); } diff --git a/playwright/pages/network.ts b/playwright/pages/network.ts index cfc23353ec..f53c32ad99 100644 --- a/playwright/pages/network.ts +++ b/playwright/pages/network.ts @@ -21,7 +21,10 @@ export class Network { private isOffline = false; private readonly setupPromise: Promise; - constructor(private page: Page, private client: Client) { + constructor( + private page: Page, + private client: Client, + ) { this.setupPromise = this.setupRoute(); } diff --git a/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/1.0.html b/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/1.0.html index 8ee888518a..bcc7a590bb 100644 --- a/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/1.0.html +++ b/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/1.0.html @@ -1,4 +1,4 @@ - + Test Privacy policy diff --git a/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/success.html b/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/success.html index 8db01e8a6e..2a2b21eef4 100644 --- a/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/success.html +++ b/playwright/plugins/homeserver/synapse/templates/consent/res/templates/privacy/en/success.html @@ -1,4 +1,4 @@ - + Test Privacy policy diff --git a/res/css/_common.pcss b/res/css/_common.pcss index c807689dd3..8eed973e75 100644 --- a/res/css/_common.pcss +++ b/res/css/_common.pcss @@ -102,7 +102,10 @@ body { * `font-feature-settings` allows us to override this behaviour and have the * correct ligatures and the proper dynamic metric spacing. */ - font-feature-settings: "kern" 1, "liga" 1, "calt" 1; + font-feature-settings: + "kern" 1, + "liga" 1, + "calt" 1; background-color: $background; color: $primary-content; diff --git a/res/css/components/views/dialogs/polls/_PollDetailHeader.pcss b/res/css/components/views/dialogs/polls/_PollDetailHeader.pcss index 6f29b6e08f..af3a9c2a70 100644 --- a/res/css/components/views/dialogs/polls/_PollDetailHeader.pcss +++ b/res/css/components/views/dialogs/polls/_PollDetailHeader.pcss @@ -15,7 +15,7 @@ limitations under the License. */ .mx_PollDetailHeader { - // override accessiblebutton style + /* override accessiblebutton style */ font-size: $font-15px !important; } diff --git a/res/css/components/views/dialogs/polls/_PollListItemEnded.pcss b/res/css/components/views/dialogs/polls/_PollListItemEnded.pcss index 16ea5dcce0..51b2a07d9b 100644 --- a/res/css/components/views/dialogs/polls/_PollListItemEnded.pcss +++ b/res/css/components/views/dialogs/polls/_PollListItemEnded.pcss @@ -60,6 +60,6 @@ limitations under the License. } .mx_PollListItemEnded_voteCount { - // 6px to match PollOption padding + /* 6px to match PollOption padding */ margin: $spacing-8 0 0 6px; } diff --git a/res/css/components/views/elements/_FilterTabGroup.pcss b/res/css/components/views/elements/_FilterTabGroup.pcss index 946bd7f543..5f7338f81e 100644 --- a/res/css/components/views/elements/_FilterTabGroup.pcss +++ b/res/css/components/views/elements/_FilterTabGroup.pcss @@ -39,7 +39,7 @@ limitations under the License. &:checked + span { color: $accent; font-weight: var(--cpd-font-weight-semibold); - // underline + /* underline */ box-shadow: 0 1.5px 0 0 currentColor; } } diff --git a/res/css/components/views/polls/_PollOption.pcss b/res/css/components/views/polls/_PollOption.pcss index da4c66d6cf..f8766de6a4 100644 --- a/res/css/components/views/polls/_PollOption.pcss +++ b/res/css/components/views/polls/_PollOption.pcss @@ -66,8 +66,7 @@ limitations under the License. } } - // override checked radio button styling - // to show checkmark instead + /* override checked radio button styling to show checkmark instead */ .mx_StyledRadioButton_checked { input[type="radio"] + div { border-width: 2px; diff --git a/res/css/components/views/settings/devices/_CurrentDeviceSection.pcss b/res/css/components/views/settings/devices/_CurrentDeviceSection.pcss index 552270db1d..d91dd64575 100644 --- a/res/css/components/views/settings/devices/_CurrentDeviceSection.pcss +++ b/res/css/components/views/settings/devices/_CurrentDeviceSection.pcss @@ -15,6 +15,6 @@ limitations under the License. */ .mx_CurrentDeviceSection_deviceDetails { - // align with text of session tile + /* align with text of session tile */ margin-left: 56px; } diff --git a/res/css/components/views/settings/devices/_DeviceDetailHeading.pcss b/res/css/components/views/settings/devices/_DeviceDetailHeading.pcss index b62cc53189..841102536f 100644 --- a/res/css/components/views/settings/devices/_DeviceDetailHeading.pcss +++ b/res/css/components/views/settings/devices/_DeviceDetailHeading.pcss @@ -44,7 +44,7 @@ limitations under the License. } .mx_DeviceDetailHeading_renameFormInput { - // override field styles + /* override field styles */ margin: 0 0 $spacing-4 0 !important; } diff --git a/res/css/components/views/settings/devices/_FilteredDeviceList.pcss b/res/css/components/views/settings/devices/_FilteredDeviceList.pcss index 9f9bd0cc71..857e56e34c 100644 --- a/res/css/components/views/settings/devices/_FilteredDeviceList.pcss +++ b/res/css/components/views/settings/devices/_FilteredDeviceList.pcss @@ -45,13 +45,13 @@ limitations under the License. .mx_FilteredDeviceList_headerButton { flex-shrink: 0; - // override inline button styling + /* override inline button styling */ display: flex !important; flex-direction: row; gap: $spacing-8; } .mx_FilteredDeviceList_deviceDetails { - // align with text of session tile + /* align with text of session tile */ margin-left: 88px; } diff --git a/res/css/components/views/settings/shared/_SettingsSubsection.pcss b/res/css/components/views/settings/shared/_SettingsSubsection.pcss index 6ee9ac429c..44d0a34426 100644 --- a/res/css/components/views/settings/shared/_SettingsSubsection.pcss +++ b/res/css/components/views/settings/shared/_SettingsSubsection.pcss @@ -33,8 +33,7 @@ limitations under the License. width: 100%; display: grid; grid-gap: $spacing-8; - // setting minwidth 0 makes columns definitely sized - // fixing horizontal overflow + /* setting minwidth 0 makes columns definitely sized fixing horizontal overflow */ grid-template-columns: minmax(0, 1fr); justify-items: flex-start; margin-top: $spacing-24; diff --git a/res/css/structures/_AutocompleteInput.pcss b/res/css/structures/_AutocompleteInput.pcss index 754c8ae194..5e799c95a7 100644 --- a/res/css/structures/_AutocompleteInput.pcss +++ b/res/css/structures/_AutocompleteInput.pcss @@ -38,7 +38,7 @@ limitations under the License. flex: 1; min-width: 40%; resize: none; - // `!important` is required to bypass global input styles. + /* `!important` is required to bypass global input styles. */ margin: 0 !important; padding: $spacing-8 9px; border: none !important; diff --git a/res/css/structures/_MessagePanel.pcss b/res/css/structures/_MessagePanel.pcss index c5e777b3e6..487f6dd801 100644 --- a/res/css/structures/_MessagePanel.pcss +++ b/res/css/structures/_MessagePanel.pcss @@ -28,7 +28,9 @@ limitations under the License. top: -1px; z-index: 1; will-change: width; - transition: width 400ms easeinsine 1s, opacity 400ms easeinsine 1s; + transition: + width 400ms easeinsine 1s, + opacity 400ms easeinsine 1s; width: 99%; opacity: 1; } diff --git a/res/css/structures/_SpacePanel.pcss b/res/css/structures/_SpacePanel.pcss index 02f6f50363..d23f6f8c69 100644 --- a/res/css/structures/_SpacePanel.pcss +++ b/res/css/structures/_SpacePanel.pcss @@ -266,7 +266,7 @@ limitations under the License. flex-grow: 1; .mx_SpaceTreeLevel { - // Indent subspaces + /* Indent subspaces */ padding-left: 16px; } } @@ -416,7 +416,6 @@ limitations under the License. font-size: $font-10px; line-height: $font-12px; font-weight: var(--cpd-font-weight-semibold); - //margin-left: 8px; } } diff --git a/res/css/structures/_SplashPage.pcss b/res/css/structures/_SplashPage.pcss index be87b04c78..58c462a226 100644 --- a/res/css/structures/_SplashPage.pcss +++ b/res/css/structures/_SplashPage.pcss @@ -36,7 +36,8 @@ limitations under the License. filter: blur(8px); inset: -9px; mask: - /* mask to dither resulting combined gradient */ url("$(res)/img/noise.png"), + /* mask to dither resulting combined gradient */ + url("$(res)/img/noise.png"), /* gradient to apply different amounts of dithering to different parts of the gradient */ linear-gradient( to bottom, diff --git a/res/css/views/auth/_AuthBody.pcss b/res/css/views/auth/_AuthBody.pcss index 5bce1bbfea..770438e972 100644 --- a/res/css/views/auth/_AuthBody.pcss +++ b/res/css/views/auth/_AuthBody.pcss @@ -67,7 +67,7 @@ limitations under the License. .mx_AuthBody_lockIcon { color: $secondary-content; height: 32px; - margin-bottom: -3px; // tweak to align all icons on different forgot password steps + margin-bottom: -3px; /* tweak to align all icons on different forgot password steps */ } .mx_AuthBody_text { @@ -211,9 +211,9 @@ limitations under the License. } .mx_AuthBody_emailPromptIcon--shifted { - margin-bottom: -17px; // Prevent layout jump by relative positioning. + margin-bottom: -17px; /* Prevent layout jump by relative positioning. */ position: relative; - top: -17px; // This icon is higher than the other icons. Shift up to prevent icon jumping. + top: -17px; /* This icon is higher than the other icons. Shift up to prevent icon jumping. */ width: 57px; } diff --git a/res/css/views/avatars/_DecoratedRoomAvatar.pcss b/res/css/views/avatars/_DecoratedRoomAvatar.pcss index 2d430981a3..e5ff87b11d 100644 --- a/res/css/views/avatars/_DecoratedRoomAvatar.pcss +++ b/res/css/views/avatars/_DecoratedRoomAvatar.pcss @@ -30,9 +30,9 @@ limitations under the License. .mx_DecoratedRoomAvatar_icon { position: absolute; /* the following percentage based sizings are to match the scalable svg mask for the cutout */ - bottom: 6.25%; // 2px for a 32x32 avatar + bottom: 6.25%; /* 2px for a 32x32 avatar */ right: 6.25%; - width: 25%; // 8px for a 32x32 avatar + width: 25%; /* 8px for a 32x32 avatar */ height: 25%; border-radius: 50%; } diff --git a/res/css/views/context_menus/_IconizedContextMenu.pcss b/res/css/views/context_menus/_IconizedContextMenu.pcss index eaad0adbb8..f36c807b60 100644 --- a/res/css/views/context_menus/_IconizedContextMenu.pcss +++ b/res/css/views/context_menus/_IconizedContextMenu.pcss @@ -18,7 +18,7 @@ limitations under the License. .mx_IconizedContextMenu { min-width: 146px; width: max-content; - // override default ul styles + /* override default ul styles */ margin: 0; padding: 0; diff --git a/res/css/views/dialogs/_AddExistingToSpaceDialog.pcss b/res/css/views/dialogs/_AddExistingToSpaceDialog.pcss index 3a0a95811c..87372e6c47 100644 --- a/res/css/views/dialogs/_AddExistingToSpaceDialog.pcss +++ b/res/css/views/dialogs/_AddExistingToSpaceDialog.pcss @@ -38,7 +38,9 @@ limitations under the License. } .mx_AddExistingToSpace_section { - margin-right: 12px; // provides space for scrollbar so that checkbox and scrollbar do not collide + margin-right: 12px; + + // provides space for scrollbar so that checkbox and scrollbar do not collide &:not(:first-child) { margin-top: 24px; diff --git a/res/css/views/dialogs/_FeedbackDialog.pcss b/res/css/views/dialogs/_FeedbackDialog.pcss index 06c18ceddb..2efc6bc047 100644 --- a/res/css/views/dialogs/_FeedbackDialog.pcss +++ b/res/css/views/dialogs/_FeedbackDialog.pcss @@ -97,7 +97,9 @@ limitations under the License. .mx_StyledRadioButton { display: inline-flex; font-size: 20px; - transition: font-size 1s, border 0.5s; + transition: + font-size 1s, + border 0.5s; border-radius: 50%; border: 2px solid transparent; margin-top: 12px; diff --git a/res/css/views/elements/_Dropdown.pcss b/res/css/views/elements/_Dropdown.pcss index 8ab577a4cf..28e96f0146 100644 --- a/res/css/views/elements/_Dropdown.pcss +++ b/res/css/views/elements/_Dropdown.pcss @@ -58,7 +58,7 @@ limitations under the License. .mx_Dropdown_option { height: 35px; line-height: $font-35px; - // Overwrites the default padding for any li elements + /* Overwrites the default padding for any li elements */ padding: 0 8px; } diff --git a/res/css/views/elements/_Field.pcss b/res/css/views/elements/_Field.pcss index 52ebb0f895..02b0e482b5 100644 --- a/res/css/views/elements/_Field.pcss +++ b/res/css/views/elements/_Field.pcss @@ -95,7 +95,10 @@ limitations under the License. } .mx_Field label { - transition: font-size 0.25s ease-out 0.1s, color 0.25s ease-out 0.1s, transform 0.25s ease-out 0.1s, + transition: + font-size 0.25s ease-out 0.1s, + color 0.25s ease-out 0.1s, + transform 0.25s ease-out 0.1s, background-color 0.25s ease-out 0.1s; background-color: transparent; font: var(--cpd-font-body-md-regular); @@ -117,7 +120,10 @@ limitations under the License. .mx_Field input:not(:placeholder-shown) + label, .mx_Field textarea:focus + label, .mx_Field textarea:not(:placeholder-shown) + label { - transition: font-size 0.25s ease-out 0s, color 0.25s ease-out 0s, transform 0.25s ease-out 0s, + transition: + font-size 0.25s ease-out 0s, + color 0.25s ease-out 0s, + transform 0.25s ease-out 0s, background-color 0.25s ease-out 0s; font-size: $font-10px; transform: translateY(-13px); diff --git a/res/css/views/elements/_GenericEventListSummary.pcss b/res/css/views/elements/_GenericEventListSummary.pcss index f05a15b44d..679078659c 100644 --- a/res/css/views/elements/_GenericEventListSummary.pcss +++ b/res/css/views/elements/_GenericEventListSummary.pcss @@ -32,7 +32,7 @@ limitations under the License. } .mx_GenericEventListSummary_toggle { - // We reuse a title cased translation + /* We reuse a title cased translation */ text-transform: lowercase; } diff --git a/res/css/views/elements/_InteractiveTooltip.pcss b/res/css/views/elements/_InteractiveTooltip.pcss index 553e9edf98..1711b31aa0 100644 --- a/res/css/views/elements/_InteractiveTooltip.pcss +++ b/res/css/views/elements/_InteractiveTooltip.pcss @@ -25,7 +25,9 @@ limitations under the License. color: $primary-content; position: absolute; z-index: 5001; - box-shadow: 0 24px 8px rgb(17 17 26 / 4%), 0 8px 32px rgb(17 17 26 / 4%); + box-shadow: + 0 24px 8px rgb(17 17 26 / 4%), + 0 8px 32px rgb(17 17 26 / 4%); } .mx_InteractiveTooltip.mx_InteractiveTooltip_withChevron_top { diff --git a/res/css/views/elements/_ReplyChain.pcss b/res/css/views/elements/_ReplyChain.pcss index 8e054e7d6c..e142ab128c 100644 --- a/res/css/views/elements/_ReplyChain.pcss +++ b/res/css/views/elements/_ReplyChain.pcss @@ -15,7 +15,7 @@ limitations under the License. */ .mx_ReplyChain { - margin: 0; // Reset default blockquote margin + margin: 0; /* Reset default blockquote margin */ padding-left: 10px; border-left: 2px solid var(--username-color); border-radius: 2px; diff --git a/res/css/views/elements/_Slider.pcss b/res/css/views/elements/_Slider.pcss index 7fd3520c8b..58d4484919 100644 --- a/res/css/views/elements/_Slider.pcss +++ b/res/css/views/elements/_Slider.pcss @@ -24,7 +24,7 @@ limitations under the License. appearance: none; width: 100%; background: none; - font-size: 1em; // set base multiplier for em units applied later + font-size: 1em; /* set base multiplier for em units applied later */ --active-color: $accent; --selection-dot-size: 2.4em; @@ -114,7 +114,7 @@ limitations under the License. left: 50%; transform: translateX(-50%); - font-size: 1em; // set base multiplier for em units applied later + font-size: 1em; /* set base multiplier for em units applied later */ text-align: center; top: 3em; diff --git a/res/css/views/right_panel/_BaseCard.pcss b/res/css/views/right_panel/_BaseCard.pcss index 79d18a7dbb..ae5b1ac2c5 100644 --- a/res/css/views/right_panel/_BaseCard.pcss +++ b/res/css/views/right_panel/_BaseCard.pcss @@ -158,9 +158,9 @@ limitations under the License. .mx_BaseCard_close { flex-shrink: 0; position: relative; - // @TODO(kerrya) background colours here are not semantic - // these buttons to be replaced with IconButton after secondary variant is added - // https://github.com/vector-im/compound/issues/279 + /* @TODO(kerrya) background colours here are not semantic + these buttons to be replaced with IconButton after secondary variant is added + https://github.com/vector-im/compound/issues/279 */ background-color: var(--cpd-color-bg-subtle-secondary); width: var(--BaseCard_header-button-size); height: var(--BaseCard_header-button-size); diff --git a/res/css/views/right_panel/_UserInfo.pcss b/res/css/views/right_panel/_UserInfo.pcss index 13e64cb903..1dfd39dd25 100644 --- a/res/css/views/right_panel/_UserInfo.pcss +++ b/res/css/views/right_panel/_UserInfo.pcss @@ -133,7 +133,7 @@ limitations under the License. line-height: $font-25px; flex: 1; justify-content: center; - // We reverse things here so for accessible technologies the name comes before the e2e shield + /* We reverse things here so for accessible technologies the name comes before the e2e shield */ flex-direction: row-reverse; span { diff --git a/res/css/views/rooms/_EventBubbleTile.pcss b/res/css/views/rooms/_EventBubbleTile.pcss index ad94b3c58e..6abf1ac837 100644 --- a/res/css/views/rooms/_EventBubbleTile.pcss +++ b/res/css/views/rooms/_EventBubbleTile.pcss @@ -355,12 +355,12 @@ limitations under the License. .mx_EventTile_e2eIcon { flex-shrink: 0; /* keep it at full size */ - // Keep height equal to text for shield alignment, additional 2px because of 1px padding on text + /* Keep height equal to text for shield alignment, additional 2px because of 1px padding on text */ height: calc($font-18px + 2px); } .mx_MPollEndBody { - // Prevent the poll end body from exceeding the tile width + /* Prevent the poll end body from exceeding the tile width */ width: 100%; } } diff --git a/res/css/views/rooms/_EventTile.pcss b/res/css/views/rooms/_EventTile.pcss index 198e8d5e51..20753d94b9 100644 --- a/res/css/views/rooms/_EventTile.pcss +++ b/res/css/views/rooms/_EventTile.pcss @@ -488,7 +488,7 @@ $left-gutter: 64px; .mx_EventTile_e2eIcon { inset: 0 0 0 44px; - // Keep height equal to text for alignment + /* Keep height equal to text for alignment */ height: var(--EventTile_group_line-line-height); margin: 1px; } @@ -701,11 +701,11 @@ $left-gutter: 64px; background-color: $inlinecode-background-color; border: 1px solid $inlinecode-border-color; border-radius: 4px; - // The horizontal padding is added by gfm.css .markdown-body + /* The horizontal padding is added by gfm.css .markdown-body */ padding: $spacing-2 0; - // Avoid inline code blocks to be sticked when on multiple lines + /* Avoid inline code blocks to be sticked when on multiple lines */ line-height: $font-22px; - // Avoid the border to be glued to the other words + /* Avoid the border to be glued to the other words */ margin-right: $spacing-2; } @@ -792,7 +792,7 @@ $left-gutter: 64px; .mx_EventTile_spoiler { cursor: pointer; - // clear button styles + /* clear button styles */ appearance: none; background: none; border: none; @@ -852,17 +852,17 @@ $left-gutter: 64px; } &.mx_EventTile_e2eIcon_warning::after { - mask-image: url("$(res)/img/e2e/warning.svg"); // (!) in a shield - background-color: $e2e-warning-color; // red + mask-image: url("$(res)/img/e2e/warning.svg"); /* (!) in a shield */ + background-color: $e2e-warning-color; /* red */ } &.mx_EventTile_e2eIcon_normal::after { - mask-image: url("$(res)/img/e2e/normal.svg"); // regular shield - background-color: $header-panel-text-primary-color; // grey + mask-image: url("$(res)/img/e2e/normal.svg"); /* regular shield */ + background-color: $header-panel-text-primary-color; /* grey */ } &.mx_EventTile_e2eIcon_decryption_failure::after { - mask-image: url("$(res)/img/e2e/decryption-failure.svg"); // key in a circle + mask-image: url("$(res)/img/e2e/decryption-failure.svg"); /* key in a circle */ background-color: $secondary-content; } } diff --git a/res/css/views/rooms/_ReadReceiptGroup.pcss b/res/css/views/rooms/_ReadReceiptGroup.pcss index 7970d1f9aa..5176a3208f 100644 --- a/res/css/views/rooms/_ReadReceiptGroup.pcss +++ b/res/css/views/rooms/_ReadReceiptGroup.pcss @@ -55,7 +55,9 @@ limitations under the License. width: 14px; height: 14px; will-change: left, top; - transition: left var(--transition-short) ease-out, top var(--transition-standard) ease-out; + transition: + left var(--transition-short) ease-out, + top var(--transition-standard) ease-out; } } } @@ -109,7 +111,7 @@ limitations under the License. margin: 6px 8px; align-self: center; justify-self: center; - flex-shrink: 0; // Long names should not shrink the picture + flex-shrink: 0; /* Long names should not shrink the picture */ } .mx_ReadReceiptGroup_name { diff --git a/res/css/views/rooms/_ReplyTile.pcss b/res/css/views/rooms/_ReplyTile.pcss index 1ffee9703f..63b9e57c0d 100644 --- a/res/css/views/rooms/_ReplyTile.pcss +++ b/res/css/views/rooms/_ReplyTile.pcss @@ -37,7 +37,9 @@ limitations under the License. color: $secondary-content; transition: color ease 0.15s; gap: 2px; - max-width: 100%; // avoid overflow with wide content + max-width: 100%; + + // avoid overflow with wide content &:hover { color: $primary-content; @@ -112,7 +114,7 @@ limitations under the License. grid-template: "sender message" auto / max-content auto; - gap: 4px; // increase spacing + gap: 4px; /* increase spacing */ } .mx_ReplyTile_sender { @@ -124,18 +126,18 @@ limitations under the License. .mx_DisambiguatedProfile { font: var(--cpd-font-body-md-regular); - display: inline-block; // anti-zalgo, with overflow hidden + display: inline-block; /* anti-zalgo, with overflow hidden */ padding: 0; margin: 0; - // truncate long display names + /* truncate long display names */ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .mx_BaseAvatar { - line-height: 14px; // To match size + line-height: 14px; /* To match size */ } } } diff --git a/res/css/views/rooms/_RoomHeader.pcss b/res/css/views/rooms/_RoomHeader.pcss index a93366f520..bc66cd2141 100644 --- a/res/css/views/rooms/_RoomHeader.pcss +++ b/res/css/views/rooms/_RoomHeader.pcss @@ -28,7 +28,7 @@ limitations under the License. } .mx_RoomHeader_infoWrapper { - // unset button styles + /* unset button styles */ background: unset; border: unset; flex: 1; diff --git a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss index c4591c4c07..d4194052fe 100644 --- a/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss +++ b/res/css/views/rooms/wysiwyg_composer/components/_Editor.pcss @@ -46,8 +46,8 @@ limitations under the License. p { margin-top: 0; margin-bottom: 0; - // this may seem redundant, but we need to handle zero content formatting tags, which occur when we split a - // formatting tag into paragraphs + /* this may seem redundant, but we need to handle zero content formatting tags, which occur when we split a + formatting tag into paragraphs */ min-height: $font-22px; } diff --git a/res/css/views/settings/_Notifications.pcss b/res/css/views/settings/_Notifications.pcss index 2a1c450545..cc6ce5699b 100644 --- a/res/css/views/settings/_Notifications.pcss +++ b/res/css/views/settings/_Notifications.pcss @@ -61,11 +61,11 @@ limitations under the License. font: var(--cpd-font-body-sm-semibold); } .mx_UserNotifSettings_gridRowError { - // occupy full row + /* occupy full row */ grid-column: 1/-1; justify-self: start; padding-right: 30%; - // collapse half of the grid-gap + /* collapse half of the grid-gap */ margin-top: -$spacing-4; } diff --git a/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.pcss b/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.pcss index e27751ebe1..ff4e2f17be 100644 --- a/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.pcss +++ b/res/css/views/settings/tabs/user/_AppearanceUserSettingsTab.pcss @@ -16,7 +16,6 @@ limitations under the License. .mx_Field.mx_AppearanceUserSettingsTab_checkboxControlledField { width: 256px; - // matches checkbox box + padding - // to align with checkbox label + /* matches checkbox box + padding to align with checkbox label */ margin-inline-start: calc($font-16px + 10px); } diff --git a/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.pcss b/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.pcss index cb90c0c15f..26e042bffb 100644 --- a/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.pcss +++ b/res/css/views/settings/tabs/user/_SidebarUserSettingsTab.pcss @@ -24,7 +24,7 @@ limitations under the License. .mx_SidebarUserSettingsTab_checkbox { margin-bottom: $spacing-8; - // override checkbox styles˚ + /* override checkbox styles */ label { align-items: flex-start !important; } diff --git a/res/themes/light/css/_fonts.pcss b/res/themes/light/css/_fonts.pcss index 64a81ce48d..62613fcee5 100644 --- a/res/themes/light/css/_fonts.pcss +++ b/res/themes/light/css/_fonts.pcss @@ -16,7 +16,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 400; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-Regular.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-Regular.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-Regular.woff?v=3.18") format("woff"); } @font-face { @@ -25,7 +26,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 400; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-Italic.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-Italic.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-Italic.woff?v=3.18") format("woff"); } @@ -35,7 +37,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 500; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-Medium.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-Medium.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-Medium.woff?v=3.18") format("woff"); } @font-face { @@ -44,7 +47,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 500; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-MediumItalic.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-MediumItalic.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-MediumItalic.woff?v=3.18") format("woff"); } @@ -54,7 +58,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 600; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-SemiBold.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-SemiBold.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-SemiBold.woff?v=3.18") format("woff"); } @font-face { @@ -63,7 +68,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 600; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-SemiBoldItalic.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-SemiBoldItalic.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-SemiBoldItalic.woff?v=3.18") format("woff"); } @@ -73,7 +79,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 700; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-Bold.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-Bold.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-Bold.woff?v=3.18") format("woff"); } @font-face { @@ -82,7 +89,8 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-weight: 700; font-display: swap; unicode-range: $inter-unicode-range; - src: url("$(res)/fonts/Inter/Inter-BoldItalic.woff2?v=3.18") format("woff2"), + src: + url("$(res)/fonts/Inter/Inter-BoldItalic.woff2?v=3.18") format("woff2"), url("$(res)/fonts/Inter/Inter-BoldItalic.woff?v=3.18") format("woff"); } @@ -91,7 +99,9 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-family: "Inconsolata"; font-style: normal; font-weight: 400; - src: local("Inconsolata Regular"), local("Inconsolata-Regular"), + src: + local("Inconsolata Regular"), + local("Inconsolata-Regular"), url("$(res)/fonts/Inconsolata/QldKNThLqRwH-OJ1UHjlKGlX5qhExfHwNJU.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -101,7 +111,9 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-style: normal; font-weight: 400; font-display: swap; - src: local("Inconsolata Regular"), local("Inconsolata-Regular"), + src: + local("Inconsolata Regular"), + local("Inconsolata-Regular"), url("$(res)/fonts/Inconsolata/QldKNThLqRwH-OJ1UHjlKGlZ5qhExfHw.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; @@ -112,7 +124,9 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-style: normal; font-weight: 700; font-display: swap; - src: local("Inconsolata Bold"), local("Inconsolata-Bold"), + src: + local("Inconsolata Bold"), + local("Inconsolata-Bold"), url("$(res)/fonts/Inconsolata/QldXNThLqRwH-OJ1UHjlKGHiw71n5_zaDpwm80E.woff2") format("woff2"); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -122,7 +136,9 @@ $inter-unicode-range: U+0000-20e2, U+20e4-23ce, U+23d0-24c1, U+24c3-259f, U+25c2 font-style: normal; font-weight: 700; font-display: swap; - src: local("Inconsolata Bold"), local("Inconsolata-Bold"), + src: + local("Inconsolata Bold"), + local("Inconsolata-Bold"), url("$(res)/fonts/Inconsolata/QldXNThLqRwH-OJ1UHjlKGHiw71p5_zaDpwm.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; diff --git a/src/@types/common.ts b/src/@types/common.ts index ba2401f6a8..4169429bbe 100644 --- a/src/@types/common.ts +++ b/src/@types/common.ts @@ -29,8 +29,8 @@ export type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] : T[P] extends object - ? RecursivePartial - : T[P]; + ? RecursivePartial + : T[P]; }; export type KeysStartingWith = { @@ -51,10 +51,10 @@ export type Defaultize = P extends any export type DeepReadonly = T extends (infer R)[] ? DeepReadonlyArray : T extends Function - ? T - : T extends object - ? DeepReadonlyObject - : T; + ? T + : T extends object + ? DeepReadonlyObject + : T; interface DeepReadonlyArray extends ReadonlyArray> {} diff --git a/src/DecryptionFailureTracker.ts b/src/DecryptionFailureTracker.ts index 668a3bc6fc..96526c034a 100644 --- a/src/DecryptionFailureTracker.ts +++ b/src/DecryptionFailureTracker.ts @@ -23,7 +23,10 @@ import { PosthogAnalytics } from "./PosthogAnalytics"; export class DecryptionFailure { public readonly ts: number; - public constructor(public readonly failedEventId: string, public readonly errorCode: string) { + public constructor( + public readonly failedEventId: string, + public readonly errorCode: string, + ) { this.ts = Date.now(); } } @@ -110,7 +113,10 @@ export class DecryptionFailureTracker { * @param {function?} errorCodeMapFn The function used to map error codes to the * trackedErrorCode. If not provided, the `.code` of errors will be used. */ - private constructor(private readonly fn: TrackingFn, private readonly errorCodeMapFn: ErrCodeMapFn) { + private constructor( + private readonly fn: TrackingFn, + private readonly errorCodeMapFn: ErrCodeMapFn, + ) { if (!fn || typeof fn !== "function") { throw new Error("DecryptionFailureTracker requires tracking function"); } diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index 78dcd4a139..9a37e76ca8 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -327,7 +327,10 @@ const topicSanitizeHtmlParams: IExtendedSanitizeOptions = { }; abstract class BaseHighlighter { - public constructor(public highlightClass: string, public highlightLink?: string) {} + public constructor( + public highlightClass: string, + public highlightLink?: string, + ) {} /** * Apply the highlights to a section of text diff --git a/src/ScalarAuthClient.ts b/src/ScalarAuthClient.ts index 56069c2103..5be7a5d86a 100644 --- a/src/ScalarAuthClient.ts +++ b/src/ScalarAuthClient.ts @@ -34,7 +34,10 @@ export default class ScalarAuthClient { private termsInteractionCallback?: TermsInteractionCallback; private isDefaultManager: boolean; - public constructor(private apiUrl: string, private uiUrl: string) { + public constructor( + private apiUrl: string, + private uiUrl: string, + ) { this.scalarToken = null; // `undefined` to allow `startTermsFlow` to fallback to a default // callback if this is unset. diff --git a/src/Terms.ts b/src/Terms.ts index 41400ef872..afa6524828 100644 --- a/src/Terms.ts +++ b/src/Terms.ts @@ -33,7 +33,11 @@ export class Service { * @param {string} baseUrl The Base URL of the service (ie. before '/_matrix') * @param {string} accessToken The user's access token for the service */ - public constructor(public serviceType: SERVICE_TYPES, public baseUrl: string, public accessToken: string) {} + public constructor( + public serviceType: SERVICE_TYPES, + public baseUrl: string, + public accessToken: string, + ) {} } export interface LocalisedPolicy { diff --git a/src/UserActivity.ts b/src/UserActivity.ts index ae6417d4f4..e65f627e76 100644 --- a/src/UserActivity.ts +++ b/src/UserActivity.ts @@ -45,7 +45,10 @@ export default class UserActivity { private lastScreenX = 0; private lastScreenY = 0; - public constructor(private readonly window: Window, private readonly document: Document) { + public constructor( + private readonly window: Window, + private readonly document: Document, + ) { this.activeNowTimeout = new Timer(CURRENTLY_ACTIVE_THRESHOLD_MS); this.activeRecentlyTimeout = new Timer(RECENTLY_ACTIVE_THRESHOLD_MS); } diff --git a/src/audio/ManagedPlayback.ts b/src/audio/ManagedPlayback.ts index 6ecedd6766..1751545573 100644 --- a/src/audio/ManagedPlayback.ts +++ b/src/audio/ManagedPlayback.ts @@ -22,7 +22,11 @@ import { DEFAULT_WAVEFORM } from "./consts"; * A managed playback is a Playback instance that is guided by a PlaybackManager. */ export class ManagedPlayback extends Playback { - public constructor(private manager: PlaybackManager, buf: ArrayBuffer, seedWaveform = DEFAULT_WAVEFORM) { + public constructor( + private manager: PlaybackManager, + buf: ArrayBuffer, + seedWaveform = DEFAULT_WAVEFORM, + ) { super(buf, seedWaveform); } diff --git a/src/audio/Playback.ts b/src/audio/Playback.ts index a40e0a463c..dc2619d692 100644 --- a/src/audio/Playback.ts +++ b/src/audio/Playback.ts @@ -72,7 +72,10 @@ export class Playback extends EventEmitter implements IDestroyable, PlaybackInte * @param {number[]} seedWaveform Optional seed waveform to present until the proper waveform * can be calculated. Contains values between zero and one, inclusive. */ - public constructor(private buf: ArrayBuffer, seedWaveform = DEFAULT_WAVEFORM) { + public constructor( + private buf: ArrayBuffer, + seedWaveform = DEFAULT_WAVEFORM, + ) { super(); // Capture the file size early as reading the buffer will result in a 0-length buffer left behind this.fileSize = this.buf.byteLength; diff --git a/src/audio/VoiceMessageRecording.ts b/src/audio/VoiceMessageRecording.ts index b46fd0da23..de00bea312 100644 --- a/src/audio/VoiceMessageRecording.ts +++ b/src/audio/VoiceMessageRecording.ts @@ -37,7 +37,10 @@ export class VoiceMessageRecording implements IDestroyable { private buffer = new Uint8Array(0); // use this.audioBuffer to access private playback?: Playback; - public constructor(private matrixClient: MatrixClient, private voiceRecording: VoiceRecording) { + public constructor( + private matrixClient: MatrixClient, + private voiceRecording: VoiceRecording, + ) { this.voiceRecording.onDataAvailable = this.onDataAvailable; } diff --git a/src/autocomplete/NotifProvider.tsx b/src/autocomplete/NotifProvider.tsx index 88eca2f096..b524454bc7 100644 --- a/src/autocomplete/NotifProvider.tsx +++ b/src/autocomplete/NotifProvider.tsx @@ -28,7 +28,10 @@ import { TimelineRenderingType } from "../contexts/RoomContext"; const AT_ROOM_REGEX = /@\S*/g; export default class NotifProvider extends AutocompleteProvider { - public constructor(public room: Room, renderingType?: TimelineRenderingType) { + public constructor( + public room: Room, + renderingType?: TimelineRenderingType, + ) { super({ commandRegex: AT_ROOM_REGEX, renderingType }); } diff --git a/src/autocomplete/RoomProvider.tsx b/src/autocomplete/RoomProvider.tsx index a710b71231..f12fdd004d 100644 --- a/src/autocomplete/RoomProvider.tsx +++ b/src/autocomplete/RoomProvider.tsx @@ -57,7 +57,10 @@ function matcherObject( export default class RoomProvider extends AutocompleteProvider { protected matcher: QueryMatcher>; - public constructor(private readonly room: Room, renderingType?: TimelineRenderingType) { + public constructor( + private readonly room: Room, + renderingType?: TimelineRenderingType, + ) { super({ commandRegex: ROOM_REGEX, renderingType }); this.matcher = new QueryMatcher>([], { keys: ["displayedAlias", "matchName"], diff --git a/src/components/structures/ThreadPanel.tsx b/src/components/structures/ThreadPanel.tsx index 2e8b579567..d43b4e25d1 100644 --- a/src/components/structures/ThreadPanel.tsx +++ b/src/components/structures/ThreadPanel.tsx @@ -204,7 +204,8 @@ const ThreadPanel: React.FC = ({ roomId, onClose, permalinkCreator }) => useEffect(() => { const room = mxClient.getRoom(roomId); - room?.createThreadsTimelineSets() + room + ?.createThreadsTimelineSets() .then(() => room.fetchRoomThreads()) .then(() => { setFilterOption(ThreadFilterType.All); diff --git a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx index 77fb046bfa..39a00f1034 100644 --- a/src/components/views/dialogs/AddExistingToSpaceDialog.tsx +++ b/src/components/views/dialogs/AddExistingToSpaceDialog.tsx @@ -362,32 +362,31 @@ export const AddExistingToSpace: React.FC = ({ const defaultRendererFactory = (title: TranslationKey): Renderer => - (rooms, selectedToAdd, { scrollTop, height }, onChange) => - ( -
-

{_t(title)}

- ( - { - onChange(checked, room); - } - : undefined - } - /> - )} - /> -
- ); + (rooms, selectedToAdd, { scrollTop, height }, onChange) => ( +
+

{_t(title)}

+ ( + { + onChange(checked, room); + } + : undefined + } + /> + )} + /> +
+ ); export const defaultRoomsRenderer = defaultRendererFactory(_td("common|rooms")); export const defaultSpacesRenderer = defaultRendererFactory(_td("common|spaces")); diff --git a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx index 4771cd29d9..04df85e79f 100644 --- a/src/components/views/dialogs/spotlight/SpotlightDialog.tsx +++ b/src/components/views/dialogs/spotlight/SpotlightDialog.tsx @@ -252,12 +252,15 @@ const findVisibleRoomMembers = (visibleRooms: Room[], cli: MatrixClient, filterD return Object.values( visibleRooms .filter((room) => !filterDMs || !DMRoomMap.shared().getUserIdForRoomId(room.roomId)) - .reduce((members, room) => { - for (const member of room.getJoinedMembers()) { - members[member.userId] = member; - } - return members; - }, {} as Record), + .reduce( + (members, room) => { + for (const member of room.getJoinedMembers()) { + members[member.userId] = member; + } + return members; + }, + {} as Record, + ), ).filter((it) => it.userId !== cli.getUserId()); }; diff --git a/src/components/views/elements/LazyRenderList.tsx b/src/components/views/elements/LazyRenderList.tsx index 355d673404..8e816bbfcf 100644 --- a/src/components/views/elements/LazyRenderList.tsx +++ b/src/components/views/elements/LazyRenderList.tsx @@ -17,7 +17,11 @@ limitations under the License. import React from "react"; class ItemRange { - public constructor(public topCount: number, public renderCount: number, public bottomCount: number) {} + public constructor( + public topCount: number, + public renderCount: number, + public bottomCount: number, + ) {} public contains(range: ItemRange): boolean { // don't contain empty ranges diff --git a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx index 65ff1a9f68..e5c927ad4c 100644 --- a/src/components/views/elements/SpellCheckLanguagesDropdown.tsx +++ b/src/components/views/elements/SpellCheckLanguagesDropdown.tsx @@ -61,7 +61,8 @@ export default class SpellCheckLanguagesDropdown extends React.Component< const plaf = PlatformPeg.get(); if (plaf) { const languageNames = new Intl.DisplayNames([getUserLanguage()], { type: "language", style: "short" }); - plaf.getAvailableSpellCheckLanguages() + plaf + .getAvailableSpellCheckLanguages() ?.then((languages) => { languages.sort(function (a, b) { if (a < b) return -1; diff --git a/src/components/views/messages/MPollBody.tsx b/src/components/views/messages/MPollBody.tsx index 78be675dfc..fcf92c7f62 100644 --- a/src/components/views/messages/MPollBody.tsx +++ b/src/components/views/messages/MPollBody.tsx @@ -366,7 +366,11 @@ export default class MPollBody extends React.Component { } } export class UserVote { - public constructor(public readonly ts: number, public readonly sender: string, public readonly answers: string[]) {} + public constructor( + public readonly ts: number, + public readonly sender: string, + public readonly answers: string[], + ) {} } function userResponseFromPollResponseEvent(event: MatrixEvent): UserVote { diff --git a/src/components/views/right_panel/UserInfo.tsx b/src/components/views/right_panel/UserInfo.tsx index 66f1bf4375..b2587fe539 100644 --- a/src/components/views/right_panel/UserInfo.tsx +++ b/src/components/views/right_panel/UserInfo.tsx @@ -650,8 +650,8 @@ export const RoomKickButton = ({ ? _t("user_info|disinvite_button_space") : _t("user_info|kick_button_space") : member.membership === "invite" - ? _t("user_info|disinvite_button_room") - : _t("user_info|kick_button_room"), + ? _t("user_info|disinvite_button_room") + : _t("user_info|kick_button_room"), title: member.membership === "invite" ? _t("user_info|disinvite_button_room_name", { roomName: room.name }) @@ -721,8 +721,8 @@ export const RoomKickButton = ({ ? _t("user_info|disinvite_button_space") : _t("user_info|kick_button_space") : member.membership === "invite" - ? _t("user_info|disinvite_button_room") - : _t("user_info|kick_button_room"); + ? _t("user_info|disinvite_button_room") + : _t("user_info|kick_button_room"); return ( { const masterPrivateKeyCached = crossSigningStatus.privateKeysCachedLocally.masterKey; const selfSigningPrivateKeyCached = crossSigningStatus.privateKeysCachedLocally.selfSigningKey; const userSigningPrivateKeyCached = crossSigningStatus.privateKeysCachedLocally.userSigningKey; - const homeserverSupportsCrossSigning = await cli.doesServerSupportUnstableFeature( - "org.matrix.e2e_cross_signing", - ); + const homeserverSupportsCrossSigning = + await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"); const crossSigningReady = await crypto.isCrossSigningReady(); this.setState({ diff --git a/src/components/views/settings/tabs/user/SessionManagerTab.tsx b/src/components/views/settings/tabs/user/SessionManagerTab.tsx index bc06103255..3f80c03d7c 100644 --- a/src/components/views/settings/tabs/user/SessionManagerTab.tsx +++ b/src/components/views/settings/tabs/user/SessionManagerTab.tsx @@ -194,13 +194,14 @@ const SessionManagerTab: React.FC = () => { setFilter(filter); clearTimeout(scrollIntoViewTimeoutRef.current); // wait a tick for the filtered section to rerender with different height - scrollIntoViewTimeoutRef.current = window.setTimeout(() => - filteredDeviceListRef.current?.scrollIntoView({ - // align element to top of scrollbox - block: "start", - inline: "nearest", - behavior: "smooth", - }), + scrollIntoViewTimeoutRef.current = window.setTimeout( + () => + filteredDeviceListRef.current?.scrollIntoView({ + // align element to top of scrollbox + block: "start", + inline: "nearest", + behavior: "smooth", + }), ); }; diff --git a/src/customisations/Media.ts b/src/customisations/Media.ts index 2177c013b7..415a7f4c5d 100644 --- a/src/customisations/Media.ts +++ b/src/customisations/Media.ts @@ -36,7 +36,10 @@ export class Media { private client: MatrixClient; // Per above, this constructor signature can be whatever is helpful for you. - public constructor(private prepared: IPreparedMedia, client?: MatrixClient) { + public constructor( + private prepared: IPreparedMedia, + client?: MatrixClient, + ) { this.client = client ?? MatrixClientPeg.safeGet(); if (!this.client) { throw new Error("No possible MatrixClient for media resolution. Please provide one or log in."); diff --git a/src/editor/model.ts b/src/editor/model.ts index 232971adf0..cefdc86661 100644 --- a/src/editor/model.ts +++ b/src/editor/model.ts @@ -57,7 +57,11 @@ export default class EditorModel { private autoCompletePartCount = 0; private transformCallback: TransformCallback | null = null; - public constructor(parts: Part[], partCreator: PartCreator, private updateCallback: UpdateCallback | null = null) { + public constructor( + parts: Part[], + partCreator: PartCreator, + private updateCallback: UpdateCallback | null = null, + ) { this._parts = parts; this._partCreator = partCreator; this.transformCallback = null; diff --git a/src/editor/offset.ts b/src/editor/offset.ts index ad358dd92f..acad566047 100644 --- a/src/editor/offset.ts +++ b/src/editor/offset.ts @@ -18,7 +18,10 @@ import EditorModel from "./model"; import DocumentPosition from "./position"; export default class DocumentOffset { - public constructor(public offset: number, public readonly atNodeEnd: boolean) {} + public constructor( + public offset: number, + public readonly atNodeEnd: boolean, + ) {} public asPosition(model: EditorModel): DocumentPosition { return model.positionForOffset(this.offset, this.atNodeEnd); diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 970093c43f..12262280ae 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -254,7 +254,10 @@ export class PlainPart extends PlainBasePart implements IBasePart { } export abstract class PillPart extends BasePart implements IPillPart { - public constructor(public resourceId: string, label: string) { + public constructor( + public resourceId: string, + label: string, + ) { super(label); } @@ -414,7 +417,11 @@ export class EmojiPart extends BasePart implements IBasePart { } class RoomPillPart extends PillPart { - public constructor(resourceId: string, label: string, private room?: Room) { + public constructor( + resourceId: string, + label: string, + private room?: Room, + ) { super(resourceId, label); } @@ -455,7 +462,11 @@ class AtRoomPillPart extends RoomPillPart { } class UserPillPart extends PillPart { - public constructor(userId: string, displayName: string, private member?: RoomMember) { + public constructor( + userId: string, + displayName: string, + private member?: RoomMember, + ) { super(userId, displayName); } @@ -490,7 +501,10 @@ class UserPillPart extends PillPart { } class PillCandidatePart extends PlainBasePart implements IPillCandidatePart { - public constructor(text: string, private autoCompleteCreator: IAutocompleteCreator) { + public constructor( + text: string, + private autoCompleteCreator: IAutocompleteCreator, + ) { super(text); } diff --git a/src/editor/position.ts b/src/editor/position.ts index 3f23016a8a..243c7970c8 100644 --- a/src/editor/position.ts +++ b/src/editor/position.ts @@ -27,7 +27,10 @@ type Callback = (part: Part, startIdx: number, endIdx: number) => void; export type Predicate = (index: number, offset: number, part: Part) => boolean; export default class DocumentPosition implements IPosition { - public constructor(public readonly index: number, public readonly offset: number) {} + public constructor( + public readonly index: number, + public readonly offset: number, + ) {} public compare(otherPos: DocumentPosition): number { if (this.index === otherPos.index) { diff --git a/src/editor/range.ts b/src/editor/range.ts index 445185c375..2c95dc7a89 100644 --- a/src/editor/range.ts +++ b/src/editor/range.ts @@ -28,7 +28,11 @@ export default class Range { private _lastStart: DocumentPosition; private _initializedEmpty: boolean; - public constructor(public readonly model: EditorModel, positionA: DocumentPosition, positionB = positionA) { + public constructor( + public readonly model: EditorModel, + positionA: DocumentPosition, + positionB = positionA, + ) { const bIsLarger = positionA.compare(positionB) < 0; this._start = bIsLarger ? positionA : positionB; this._end = bIsLarger ? positionB : positionA; diff --git a/src/models/Call.ts b/src/models/Call.ts index 004782120e..c2bb25bada 100644 --- a/src/models/Call.ts +++ b/src/models/Call.ts @@ -570,10 +570,13 @@ export class JitsiCall extends Call { // Tell others that we're connected, by adding our device to room state await this.addOurDevice(); // Re-add this device every so often so our video member event doesn't become stale - this.resendDevicesTimer = window.setInterval(async (): Promise => { - logger.log(`Resending video member event for ${this.roomId}`); - await this.addOurDevice(); - }, (this.STUCK_DEVICE_TIMEOUT_MS * 3) / 4); + this.resendDevicesTimer = window.setInterval( + async (): Promise => { + logger.log(`Resending video member event for ${this.roomId}`); + await this.addOurDevice(); + }, + (this.STUCK_DEVICE_TIMEOUT_MS * 3) / 4, + ); } else if (state === ConnectionState.Disconnected && isConnected(prevState)) { this.updateParticipants(); // Local echo @@ -717,7 +720,11 @@ export class ElementCall extends Call { this.widget.url = ElementCall.generateWidgetUrl(this.client, this.roomId).toString(); } - private constructor(public session: MatrixRTCSession, widget: IApp, client: MatrixClient) { + private constructor( + public session: MatrixRTCSession, + widget: IApp, + client: MatrixClient, + ) { super(widget, client); this.session.on(MatrixRTCSessionEvent.MembershipsChanged, this.onMembershipChanged); diff --git a/src/rageshake/rageshake.ts b/src/rageshake/rageshake.ts index aa80e463fb..45a5a40c4c 100644 --- a/src/rageshake/rageshake.ts +++ b/src/rageshake/rageshake.ts @@ -138,7 +138,10 @@ export class IndexedDBLogStore { private flushPromise: Promise | null = null; private flushAgainPromise: Promise | null = null; - public constructor(private indexedDB: IDBFactory, private logger: ConsoleLogger) { + public constructor( + private indexedDB: IDBFactory, + private logger: ConsoleLogger, + ) { this.id = "instance-" + randomString(16); } diff --git a/src/settings/controllers/PushToMatrixClientController.ts b/src/settings/controllers/PushToMatrixClientController.ts index f525f8368f..f6985c25f5 100644 --- a/src/settings/controllers/PushToMatrixClientController.ts +++ b/src/settings/controllers/PushToMatrixClientController.ts @@ -22,7 +22,10 @@ import SettingController from "./SettingController"; * When the value changes, call a setter function on the matrix client with the new value */ export default class PushToMatrixClientController extends SettingController { - public constructor(private setter: Function, private inverse: boolean) { + public constructor( + private setter: Function, + private inverse: boolean, + ) { super(); } diff --git a/src/settings/controllers/UIFeatureController.ts b/src/settings/controllers/UIFeatureController.ts index 31a2be0efc..6822d74c62 100644 --- a/src/settings/controllers/UIFeatureController.ts +++ b/src/settings/controllers/UIFeatureController.ts @@ -26,7 +26,10 @@ import SettingsStore from "../SettingsStore"; * Settings using this controller are assumed to return `false` when disabled. */ export default class UIFeatureController extends SettingController { - public constructor(private uiFeatureName: string, private forcedValue = false) { + public constructor( + private uiFeatureName: string, + private forcedValue = false, + ) { super(); } diff --git a/src/settings/handlers/DefaultSettingsHandler.ts b/src/settings/handlers/DefaultSettingsHandler.ts index 06ddff7a0f..fe8dcb36df 100644 --- a/src/settings/handlers/DefaultSettingsHandler.ts +++ b/src/settings/handlers/DefaultSettingsHandler.ts @@ -27,7 +27,10 @@ export default class DefaultSettingsHandler extends SettingsHandler { * @param {object} defaults The default setting values, keyed by setting name. * @param {object} invertedDefaults The default inverted setting values, keyed by setting name. */ - public constructor(private defaults: Record, private invertedDefaults: Record) { + public constructor( + private defaults: Record, + private invertedDefaults: Record, + ) { super(); } diff --git a/src/settings/handlers/DeviceSettingsHandler.ts b/src/settings/handlers/DeviceSettingsHandler.ts index 978c83c1a6..0423ba72d1 100644 --- a/src/settings/handlers/DeviceSettingsHandler.ts +++ b/src/settings/handlers/DeviceSettingsHandler.ts @@ -31,7 +31,10 @@ export default class DeviceSettingsHandler extends AbstractLocalStorageSettingsH * @param {string[]} featureNames The names of known features. * @param {WatchManager} watchers The watch manager to notify updates to */ - public constructor(private featureNames: string[], public readonly watchers: WatchManager) { + public constructor( + private featureNames: string[], + public readonly watchers: WatchManager, + ) { super(); } diff --git a/src/settings/handlers/LocalEchoWrapper.ts b/src/settings/handlers/LocalEchoWrapper.ts index 75cc4636e6..ea216710e7 100644 --- a/src/settings/handlers/LocalEchoWrapper.ts +++ b/src/settings/handlers/LocalEchoWrapper.ts @@ -35,7 +35,10 @@ export default class LocalEchoWrapper extends SettingsHandler { * @param {SettingsHandler} handler The handler to wrap * @param {SettingLevel} level The level to notify updates at */ - public constructor(private readonly handler: SettingsHandler, private readonly level: SettingLevel) { + public constructor( + private readonly handler: SettingsHandler, + private readonly level: SettingLevel, + ) { super(); } diff --git a/src/stores/AsyncStore.ts b/src/stores/AsyncStore.ts index d8f5bbdd1e..3a1e8c4756 100644 --- a/src/stores/AsyncStore.ts +++ b/src/stores/AsyncStore.ts @@ -52,7 +52,10 @@ export abstract class AsyncStore extends EventEmitter { * @param {Dispatcher} dispatcher The dispatcher to rely upon. * @param {T} initialState The initial state for the store. */ - protected constructor(private dispatcher: MatrixDispatcher, initialState: T = {}) { + protected constructor( + private dispatcher: MatrixDispatcher, + initialState: T = {}, + ) { super(); this.dispatcherRef = dispatcher.register(this.onDispatch.bind(this)); diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index 78b6660b3d..8a3f712e6b 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -160,7 +160,10 @@ export class RoomViewStore extends EventEmitter { private dis?: MatrixDispatcher; private dispatchToken?: string; - public constructor(dis: MatrixDispatcher, private readonly stores: SdkContextClass) { + public constructor( + dis: MatrixDispatcher, + private readonly stores: SdkContextClass, + ) { super(); this.resetDispatcher(dis); this.stores.voiceBroadcastRecordingsStore.addListener( @@ -319,14 +322,14 @@ export class RoomViewStore extends EventEmitter { numMembers > 1000 ? "MoreThanAThousand" : numMembers > 100 - ? "OneHundredAndOneToAThousand" - : numMembers > 10 - ? "ElevenToOneHundred" - : numMembers > 2 - ? "ThreeToTen" - : numMembers > 1 - ? "Two" - : "One"; + ? "OneHundredAndOneToAThousand" + : numMembers > 10 + ? "ElevenToOneHundred" + : numMembers > 2 + ? "ThreeToTen" + : numMembers > 1 + ? "Two" + : "One"; this.stores.posthogAnalytics.trackEvent({ eventName: "JoinedRoom", diff --git a/src/stores/local-echo/EchoTransaction.ts b/src/stores/local-echo/EchoTransaction.ts index 9f5563d5d7..bc5418eb2c 100644 --- a/src/stores/local-echo/EchoTransaction.ts +++ b/src/stores/local-echo/EchoTransaction.ts @@ -30,7 +30,10 @@ export class EchoTransaction extends Whenable { public readonly startTime = new Date(); - public constructor(public readonly auditName: string, public runFn: RunFn) { + public constructor( + public readonly auditName: string, + public runFn: RunFn, + ) { super(); } diff --git a/src/stores/local-echo/GenericEchoChamber.ts b/src/stores/local-echo/GenericEchoChamber.ts index be552aebdf..1fa01d0f27 100644 --- a/src/stores/local-echo/GenericEchoChamber.ts +++ b/src/stores/local-echo/GenericEchoChamber.ts @@ -30,7 +30,10 @@ export abstract class GenericEchoChamber extends Ev private cache = new Map(); protected matrixClient: MatrixClient | null = null; - protected constructor(public readonly context: C, private lookupFn: (key: K) => V) { + protected constructor( + public readonly context: C, + private lookupFn: (key: K) => V, + ) { super(); } diff --git a/src/stores/notifications/ListNotificationState.ts b/src/stores/notifications/ListNotificationState.ts index ca65161472..7d24678620 100644 --- a/src/stores/notifications/ListNotificationState.ts +++ b/src/stores/notifications/ListNotificationState.ts @@ -27,7 +27,10 @@ export class ListNotificationState extends NotificationState { private rooms: Room[] = []; private states: { [roomId: string]: RoomNotificationState } = {}; - public constructor(private byTileCount = false, private getRoomFn: FetchRoomFn) { + public constructor( + private byTileCount = false, + private getRoomFn: FetchRoomFn, + ) { super(); } diff --git a/src/stores/room-list/SlidingRoomListStore.ts b/src/stores/room-list/SlidingRoomListStore.ts index 76b66c9e7a..5218881c2f 100644 --- a/src/stores/room-list/SlidingRoomListStore.ts +++ b/src/stores/room-list/SlidingRoomListStore.ts @@ -80,7 +80,10 @@ export class SlidingRoomListStoreClass extends AsyncStoreWithClient impl private counts: Record = {}; private stickyRoomId: Optional; - public constructor(dis: MatrixDispatcher, private readonly context: SdkContextClass) { + public constructor( + dis: MatrixDispatcher, + private readonly context: SdkContextClass, + ) { super(dis); this.setMaxListeners(20); // RoomList + LeftPanel + 8xRoomSubList + spares } diff --git a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts index 1592eb4597..1b6472a018 100644 --- a/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts +++ b/src/stores/room-list/algorithms/list-ordering/OrderingAlgorithm.ts @@ -30,7 +30,10 @@ export abstract class OrderingAlgorithm { // set by setSortAlgorithm() in ctor protected sortingAlgorithm!: SortAlgorithm; - protected constructor(protected tagId: TagID, initialSortingAlgorithm: SortAlgorithm) { + protected constructor( + protected tagId: TagID, + initialSortingAlgorithm: SortAlgorithm, + ) { // noinspection JSIgnoredPromiseFromCall this.setSortAlgorithm(initialSortingAlgorithm); // we use the setter for validation } diff --git a/src/utils/DMRoomMap.ts b/src/utils/DMRoomMap.ts index dc232d862e..eafbe07d5d 100644 --- a/src/utils/DMRoomMap.ts +++ b/src/utils/DMRoomMap.ts @@ -202,15 +202,18 @@ export default class DMRoomMap { public getUniqueRoomsWithIndividuals(): { [userId: string]: Room } { if (!this.roomToUser) return {}; // No rooms means no map. // map roomToUser to valid rooms with two participants - return Object.keys(this.roomToUser).reduce((acc, roomId: string) => { - const userId = this.getUserIdForRoomId(roomId); - const room = this.matrixClient.getRoom(roomId); - const hasTwoMembers = room?.getInvitedAndJoinedMemberCount() === 2; - if (userId && room && hasTwoMembers) { - acc[userId] = room; - } - return acc; - }, {} as Record); + return Object.keys(this.roomToUser).reduce( + (acc, roomId: string) => { + const userId = this.getUserIdForRoomId(roomId); + const room = this.matrixClient.getRoom(roomId); + const hasTwoMembers = room?.getInvitedAndJoinedMemberCount() === 2; + if (userId && room && hasTwoMembers) { + acc[userId] = room; + } + return acc; + }, + {} as Record, + ); } /** diff --git a/src/utils/FixedRollingArray.ts b/src/utils/FixedRollingArray.ts index 8b9a1a68c8..376120532c 100644 --- a/src/utils/FixedRollingArray.ts +++ b/src/utils/FixedRollingArray.ts @@ -28,7 +28,10 @@ export class FixedRollingArray { * @param width The width of the array. * @param padValue The value to seed the array with. */ - public constructor(private width: number, padValue: T) { + public constructor( + private width: number, + padValue: T, + ) { this.samples = arraySeed(padValue, this.width); } diff --git a/src/utils/MarkedExecution.ts b/src/utils/MarkedExecution.ts index 6c32f8111d..722f9e7041 100644 --- a/src/utils/MarkedExecution.ts +++ b/src/utils/MarkedExecution.ts @@ -30,7 +30,10 @@ export class MarkedExecution { * @param {Function} onMarkCallback A function that is called when a new mark is made. Not * called if a mark is already flagged. */ - public constructor(private fn: () => void, private onMarkCallback?: () => void) {} + public constructor( + private fn: () => void, + private onMarkCallback?: () => void, + ) {} /** * Resets the mark without calling the function. diff --git a/src/utils/RoomUpgrade.ts b/src/utils/RoomUpgrade.ts index 88fc904541..9646bd52c4 100644 --- a/src/utils/RoomUpgrade.ts +++ b/src/utils/RoomUpgrade.ts @@ -76,8 +76,8 @@ export async function upgradeRoom( if (updateSpaces) { parentsToRelink = Array.from(SpaceStore.instance.getKnownParents(room.roomId)) .map((roomId) => cli.getRoom(roomId)) - .filter((parent) => - parent?.currentState.maySendStateEvent(EventType.SpaceChild, cli.getUserId()!), + .filter( + (parent) => parent?.currentState.maySendStateEvent(EventType.SpaceChild, cli.getUserId()!), ) as Room[]; } diff --git a/src/utils/Singleflight.ts b/src/utils/Singleflight.ts index 0d0829d1c0..125d643443 100644 --- a/src/utils/Singleflight.ts +++ b/src/utils/Singleflight.ts @@ -79,7 +79,10 @@ export class Singleflight { } class SingleflightContext { - public constructor(private instance: Object, private key: string) {} + public constructor( + private instance: Object, + private key: string, + ) {} /** * Forget this particular instance and key combination, discarding the result. diff --git a/src/utils/exportUtils/exportCustomCSS.css b/src/utils/exportUtils/exportCustomCSS.css index 47dd4e5ec5..4807e316a8 100644 --- a/src/utils/exportUtils/exportCustomCSS.css +++ b/src/utils/exportUtils/exportCustomCSS.css @@ -32,8 +32,19 @@ limitations under the License. bottom: 30px; font-size: 17px; padding: 6px 16px; - font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, - roboto, noto, arial, sans-serif; + font-family: + -apple-system, + BlinkMacSystemFont, + avenir next, + avenir, + segoe ui, + helvetica neue, + helvetica, + Ubuntu, + roboto, + noto, + arial, + sans-serif; font-weight: 400; line-height: 1.43; border-radius: 4px; @@ -42,8 +53,12 @@ limitations under the License. #snackbar.mx_show { visibility: visible; - -webkit-animation: mx_snackbar_fadein 0.5s, mx_snackbar_fadeout 0.5s 2.5s; - animation: mx_snackbar_fadein 0.5s, mx_snackbar_fadeout 0.5s 2.5s; + -webkit-animation: + mx_snackbar_fadein 0.5s, + mx_snackbar_fadeout 0.5s 2.5s; + animation: + mx_snackbar_fadein 0.5s, + mx_snackbar_fadeout 0.5s 2.5s; } a.mx_reply_anchor { diff --git a/src/utils/permalinks/Permalinks.ts b/src/utils/permalinks/Permalinks.ts index 1a55b8408e..9af7476a39 100644 --- a/src/utils/permalinks/Permalinks.ts +++ b/src/utils/permalinks/Permalinks.ts @@ -93,7 +93,11 @@ export class RoomPermalinkCreator { // Some of the tests done by this class are relatively expensive, so normally // throttled to not happen on every update. Pass false as the shouldThrottle // param to disable this behaviour, eg. for tests. - public constructor(private room: Room | null, roomId: string | null = null, shouldThrottle = true) { + public constructor( + private room: Room | null, + roomId: string | null = null, + shouldThrottle = true, + ) { this.roomId = room ? room.roomId : roomId!; if (!this.roomId) { diff --git a/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts b/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts index 80241de156..55788af9ad 100644 --- a/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts +++ b/src/voice-broadcast/audio/VoiceBroadcastRecorder.ts @@ -63,7 +63,10 @@ export class VoiceBroadcastRecorder // current chunk length in seconds private currentChunkLength = 0; - public constructor(private voiceRecording: VoiceRecording, public readonly targetChunkLength: number) { + public constructor( + private voiceRecording: VoiceRecording, + public readonly targetChunkLength: number, + ) { super(); this.voiceRecording.onDataAvailable = this.onDataAvailable; } diff --git a/src/widgets/WidgetType.ts b/src/widgets/WidgetType.ts index 8dc02e70f8..e6f8c78051 100644 --- a/src/widgets/WidgetType.ts +++ b/src/widgets/WidgetType.ts @@ -22,7 +22,10 @@ export class WidgetType { public static readonly CUSTOM = new WidgetType("m.custom", "m.custom"); public static readonly CALL = new WidgetType("m.call", "m.call"); - public constructor(public readonly preferred: string, public readonly legacy: string) {} + public constructor( + public readonly preferred: string, + public readonly legacy: string, + ) {} public matches(type: string): boolean { return type === this.preferred || type === this.legacy; diff --git a/test/PosthogAnalytics-test.ts b/test/PosthogAnalytics-test.ts index d73ee1ec66..748c8f17f6 100644 --- a/test/PosthogAnalytics-test.ts +++ b/test/PosthogAnalytics-test.ts @@ -39,7 +39,7 @@ const getFakePosthog = (): PostHog => get_user_state: jest.fn(), }, identifyUser: jest.fn(), - } as unknown as PostHog); + }) as unknown as PostHog; interface ITestEvent extends IPosthogEvent { eventName: "JestTestEvents"; @@ -288,7 +288,7 @@ describe("PosthogAnalytics", () => { id: "0000000", pseudonymousAnalyticsOptIn: true, }), - } as unknown as MatrixClient); + }) as unknown as MatrixClient; beforeEach(async () => { SdkConfig.put({ diff --git a/test/components/structures/AutocompleteInput-test.tsx b/test/components/structures/AutocompleteInput-test.tsx index 76a007a25e..0baa43fb44 100644 --- a/test/components/structures/AutocompleteInput-test.tsx +++ b/test/components/structures/AutocompleteInput-test.tsx @@ -43,7 +43,7 @@ describe("AutocompleteInput", () => { const constructMockProvider = (data: ICompletion[]) => ({ getCompletions: jest.fn().mockImplementation(async () => data), - } as unknown as AutocompleteProvider); + }) as unknown as AutocompleteProvider; beforeEach(() => { TestUtils.stubClient(); diff --git a/test/components/views/context_menus/ContextMenu-test.tsx b/test/components/views/context_menus/ContextMenu-test.tsx index 8ffa186aa7..55974d3daf 100644 --- a/test/components/views/context_menus/ContextMenu-test.tsx +++ b/test/components/views/context_menus/ContextMenu-test.tsx @@ -31,7 +31,7 @@ describe("", () => { ({ windowWidth: windowSize, windowHeight: windowSize, - } as unknown as UIStore), + }) as unknown as UIStore, ); window.Element.prototype.getBoundingClientRect = jest.fn().mockReturnValue({ width: menuSize, diff --git a/test/components/views/context_menus/MessageContextMenu-test.tsx b/test/components/views/context_menus/MessageContextMenu-test.tsx index 8da114a2e1..8fd2f9f416 100644 --- a/test/components/views/context_menus/MessageContextMenu-test.tsx +++ b/test/components/views/context_menus/MessageContextMenu-test.tsx @@ -480,7 +480,7 @@ describe("MessageContextMenu", () => { it("shows view in room button when the event is a thread root", () => { const eventContent = createMessageEventContent("hello"); const mxEvent = new MatrixEvent({ type: EventType.RoomMessage, content: eventContent }); - mxEvent.getThread = () => ({ rootEvent: mxEvent } as Thread); + mxEvent.getThread = () => ({ rootEvent: mxEvent }) as Thread; const props = { rightClick: true, }; diff --git a/test/components/views/context_menus/SpaceContextMenu-test.tsx b/test/components/views/context_menus/SpaceContextMenu-test.tsx index cf6d607ec7..9e787b8bd0 100644 --- a/test/components/views/context_menus/SpaceContextMenu-test.tsx +++ b/test/components/views/context_menus/SpaceContextMenu-test.tsx @@ -69,7 +69,7 @@ describe("", () => { client: mockClient, getMyMembership: jest.fn(), ...props, - } as unknown as Room); + }) as unknown as Room; const defaultProps = { space: makeMockSpace(), diff --git a/test/components/views/messages/TextualBody-test.tsx b/test/components/views/messages/TextualBody-test.tsx index fb34f85a59..3c7a62f105 100644 --- a/test/components/views/messages/TextualBody-test.tsx +++ b/test/components/views/messages/TextualBody-test.tsx @@ -18,7 +18,6 @@ import React from "react"; import { MatrixClient, MatrixEvent } from "matrix-js-sdk/src/matrix"; import { mocked, MockedObject } from "jest-mock"; import { render } from "@testing-library/react"; -import * as prettier from "prettier"; import { getMockClientWithEventEmitter, mkEvent, mkMessage, mkStubRoom } from "../../../test-utils"; import { MatrixClientPeg } from "../../../../src/MatrixClientPeg"; @@ -225,11 +224,7 @@ describe("", () => { const ev = mkRoomTextMessage(`Visit https://matrix.to/#/${room1Id}/${defaultEvent.getId()}`); const { container } = getComponent({ mxEvent: ev }); const content = container.querySelector(".mx_EventTile_body"); - expect( - prettier.format(content.innerHTML.replace(defaultEvent.getId(), "%event_id%"), { - parser: "html", - }), - ).toMatchSnapshot(); + expect(content.innerHTML.replace(defaultEvent.getId(), "%event_id%")).toMatchSnapshot(); }); it("should pillify a permalink to an unknown message in the same room with the label »Message«", () => { @@ -243,11 +238,7 @@ describe("", () => { const ev = mkRoomTextMessage(`Visit https://matrix.to/#/${room2Id}/${defaultEvent.getId()}`); const { container } = getComponent({ mxEvent: ev }); const content = container.querySelector(".mx_EventTile_body"); - expect( - prettier.format(content.innerHTML.replace(defaultEvent.getId(), "%event_id%"), { - parser: "html", - }), - ).toMatchSnapshot(); + expect(content.innerHTML.replace(defaultEvent.getId(), "%event_id%")).toMatchSnapshot(); }); }); diff --git a/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap b/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap index 383f7d5515..b0e02453b6 100644 --- a/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap +++ b/test/components/views/messages/__snapshots__/TextualBody-test.tsx.snap @@ -296,71 +296,9 @@ exports[` renders formatted m.text correctly pills get injected c `; -exports[` renders plain-text m.text correctly should pillify a permalink to a message in the same room with the label »Message from Member« 1`] = ` -"Visit -Message from Member -" -`; +exports[` renders plain-text m.text correctly should pillify a permalink to a message in the same room with the label »Message from Member« 1`] = `"Visit Message from Member"`; -exports[` renders plain-text m.text correctly should pillify a permalink to an event in another room with the label »Message in Room 2« 1`] = ` -"Visit -Message in Room 2 -" -`; +exports[` renders plain-text m.text correctly should pillify a permalink to an event in another room with the label »Message in Room 2« 1`] = `"Visit Message in Room 2"`; exports[` renders plain-text m.text correctly should pillify a permalink to an unknown message in the same room with the label »Message« 1`] = ` ", () => { getTimelineForEvent: () => ({ getEvents: () => localPins, }), - } as unknown as EventTimelineSet); + }) as unknown as EventTimelineSet; // Return all pins over fetchRoomEvent cli.fetchRoomEvent.mockImplementation((roomId, eventId) => { diff --git a/test/components/views/right_panel/RoomSummaryCard-test.tsx b/test/components/views/right_panel/RoomSummaryCard-test.tsx index 986b3de2cf..735b190b7f 100644 --- a/test/components/views/right_panel/RoomSummaryCard-test.tsx +++ b/test/components/views/right_panel/RoomSummaryCard-test.tsx @@ -255,7 +255,7 @@ describe("", () => { "@ernie:sesame.st": ["some-other-room-id", room.roomId], }, }), - }[eventType]), + })[eventType], ); getComponent(); diff --git a/test/components/views/rooms/RoomPreviewBar-test.tsx b/test/components/views/rooms/RoomPreviewBar-test.tsx index 80359a8dee..3a52cf290e 100644 --- a/test/components/views/rooms/RoomPreviewBar-test.tsx +++ b/test/components/views/rooms/RoomPreviewBar-test.tsx @@ -68,7 +68,7 @@ const makeMockRoomMember = ({ getPrevContent: jest.fn().mockReturnValue({ membership: oldMembership, ...memberContent }), }, }, - } as unknown as RoomMember); + }) as unknown as RoomMember; describe("", () => { const roomId = "RoomPreviewBar-test-room"; diff --git a/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx b/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx index 68815b2e42..0b20cc61b2 100644 --- a/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx +++ b/test/components/views/rooms/wysiwyg_composer/components/WysiwygAutocomplete-test.tsx @@ -48,7 +48,7 @@ const constructMockProvider = (data: ICompletion[]) => getCompletions: jest.fn().mockImplementation(async () => data), getName: jest.fn().mockReturnValue("test provider"), renderCompletions: jest.fn().mockImplementation((components) => components), - } as unknown as AutocompleteProvider); + }) as unknown as AutocompleteProvider; describe("WysiwygAutocomplete", () => { beforeAll(() => { diff --git a/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx b/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx index cd008db2ea..5e3346b6c1 100644 --- a/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx +++ b/test/components/views/rooms/wysiwyg_composer/components/WysiwygComposer-test.tsx @@ -227,7 +227,7 @@ describe("WysiwygComposer", () => { getCompletions: jest.fn().mockImplementation(async () => data), getName: jest.fn().mockReturnValue("test provider"), renderCompletions: jest.fn().mockImplementation((components) => components), - } as unknown as AutocompleteProvider); + }) as unknown as AutocompleteProvider; // for each test we will insert input simulating a user mention const initialInput = "@abc"; diff --git a/test/models/Call-test.ts b/test/models/Call-test.ts index 3b00e1cdd7..a43849c943 100644 --- a/test/models/Call-test.ts +++ b/test/models/Call-test.ts @@ -984,7 +984,7 @@ describe("ElementCall", () => { }); describe("create call", () => { function setRoomMembers(memberIds: string[]) { - jest.spyOn(room, "getJoinedMembers").mockReturnValue(memberIds.map((id) => ({ userId: id } as RoomMember))); + jest.spyOn(room, "getJoinedMembers").mockReturnValue(memberIds.map((id) => ({ userId: id }) as RoomMember)); } beforeEach(async () => { setRoomMembers(["@user:example.com", "@user2:example.com", "@user4:example.com"]); diff --git a/test/test-utils/call.ts b/test/test-utils/call.ts index ed3eb82174..2d049c258e 100644 --- a/test/test-utils/call.ts +++ b/test/test-utils/call.ts @@ -25,7 +25,10 @@ export class MockedCall extends Call { public static readonly EVENT_TYPE = "org.example.mocked_call"; public readonly STUCK_DEVICE_TIMEOUT_MS = 1000 * 60 * 60; // 1 hour - private constructor(room: Room, public readonly event: MatrixEvent) { + private constructor( + room: Room, + public readonly event: MatrixEvent, + ) { super( { id: event.getStateKey()!, diff --git a/test/toasts/IncomingCallToast-test.tsx b/test/toasts/IncomingCallToast-test.tsx index de3dd8be88..20aae4a64e 100644 --- a/test/toasts/IncomingCallToast-test.tsx +++ b/test/toasts/IncomingCallToast-test.tsx @@ -136,7 +136,7 @@ describe("IncomingCallEvent", () => { ({ ...notifyContent, notify_type: "ring", - } as any); + }) as any; const playMock = jest.fn(); const audio = { play: playMock, paused: true }; diff --git a/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts b/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts index f3295d4d16..4002d7de5a 100644 --- a/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts +++ b/test/voice-broadcast/utils/shouldDisplayAsVoiceBroadcastTile-test.ts @@ -85,7 +85,7 @@ describe("shouldDisplayAsVoiceBroadcastTile", () => { user: senderId, content: {}, }); - event.getContent = () => ({} as any); + event.getContent = () => ({}) as any; }); itShouldReturnFalse(); @@ -119,7 +119,7 @@ describe("shouldDisplayAsVoiceBroadcastTile", () => { redacted_because: {} as unknown as IEvent, }, }); - event.getContent = () => ({} as any); + event.getContent = () => ({}) as any; }); itShouldReturnTrue(); diff --git a/yarn.lock b/yarn.lock index 492ace8750..839a2fc82a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3034,11 +3034,6 @@ resolved "https://registry.yarnpkg.com/@types/pbf/-/pbf-3.0.5.tgz#a9495a58d8c75be4ffe9a0bd749a307715c07404" integrity sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA== -"@types/prettier@^2.7.0": - version "2.7.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f" - integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA== - "@types/prop-types@*": version "15.7.11" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.11.tgz#2596fb352ee96a1379c657734d4b913a613ad563" @@ -8538,10 +8533,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@2.8.8: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" + integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== pretty-bytes@^5.6.0: version "5.6.0"