From d5fa5693876a672154894295bf01923d0ec3b9a7 Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Tue, 15 Oct 2024 17:10:19 +0100 Subject: [PATCH] chore: Fix various object-shorthand issues --- .../message/messageActionButton.mjs | 2 +- .../components/message/messageDetails.mjs | 2 +- .../components/message/messageHeader.mjs | 26 +++++++++---------- .../components/message/messageList.mjs | 2 +- .../components/message/messageTags.mjs | 2 +- addon/content/esmodules/thunderbirdCompat.mjs | 2 +- addon/dev-frame/components/thunderbird.mjs | 4 +-- addon/gallery/gallery.mjs | 2 +- addon/options/options.mjs | 14 +++++----- 9 files changed, 28 insertions(+), 28 deletions(-) diff --git a/addon/content/components/message/messageActionButton.mjs b/addon/content/components/message/messageActionButton.mjs index db72b9828..4ba842f5a 100644 --- a/addon/content/components/message/messageActionButton.mjs +++ b/addon/content/components/message/messageActionButton.mjs @@ -73,7 +73,7 @@ export function ActionButton({ type, callback, className, showString }) { return React.createElement( "button", - { className: className || "", title: title, onClick: action }, + { className: className || "", title, onClick: action }, React.createElement(SvgIcon, { ariaHidden: true, hash: info.icon }), " ", !!showString && title diff --git a/addon/content/components/message/messageDetails.mjs b/addon/content/components/message/messageDetails.mjs index 0eaabffa4..cfe6ddddd 100644 --- a/addon/content/components/message/messageDetails.mjs +++ b/addon/content/components/message/messageDetails.mjs @@ -22,7 +22,7 @@ function ContactList({ label, contacts, className = "", msgId }) { React.createElement(DetailedContactLabel, { className: "", contact, - msgId: msgId, + msgId, }), React.createElement("br") ) diff --git a/addon/content/components/message/messageHeader.mjs b/addon/content/components/message/messageHeader.mjs index 0c06e3dae..74e6fb1a8 100644 --- a/addon/content/components/message/messageHeader.mjs +++ b/addon/content/components/message/messageHeader.mjs @@ -149,7 +149,7 @@ export function DetailedContactLabel({ contact, className, msgId }) { popup: React.createElement(ContactDetail, { name: contact.name, email: contact.displayEmail, - msgId: msgId, + msgId, realEmail: contact.email, avatar: contact.avatar, contactId: contact.contactId, @@ -193,7 +193,7 @@ export function ContactLabel({ contact, className, msgId }) { popup: React.createElement(ContactDetail, { name: contact.name, email: contact.displayEmail, - msgId: msgId, + msgId, realEmail: contact.email, avatar: contact.avatar, contactId: contact.contactId, @@ -316,7 +316,7 @@ export function MessageHeader({ const contact = allToMap.get(item.value); return React.createElement(ContactLabel, { className: "to", - contact: contact, + contact, key: item.value, msgId: id, }); @@ -394,22 +394,22 @@ export function MessageHeader({ ); }, folderName: shortFolderName, - inView: inView, + inView, }), snippet ) ), React.createElement(MessageHeaderOptions, { - dispatch: dispatch, - date: date, - detailsShowing: detailsShowing, - expanded: expanded, - fullDate: fullDate, + dispatch, + date, + detailsShowing, + expanded, + fullDate, id, - attachments: attachments, - multipleRecipients: multipleRecipients, - recipientsIncludeLists: recipientsIncludeLists, - isDraft: isDraft, + attachments, + multipleRecipients, + recipientsIncludeLists, + isDraft, }) ); } diff --git a/addon/content/components/message/messageList.mjs b/addon/content/components/message/messageList.mjs index 98406d6ee..c82682cb0 100644 --- a/addon/content/components/message/messageList.mjs +++ b/addon/content/components/message/messageList.mjs @@ -45,7 +45,7 @@ function _MessageList(props) { displayingMultipleMsgs: !!props.messages.length, hideQuickReply: props.summary.prefs.hideQuickReply, iframesLoading: props.summary.iframesLoading, - index: index, + index, isInTab: props.summary.isInTab, isLastMessage: index == props.messages.msgData.length - 1, isStandalone: props.summary.isStandalone, diff --git a/addon/content/components/message/messageTags.mjs b/addon/content/components/message/messageTags.mjs index a0dac5401..3f3ca8e85 100644 --- a/addon/content/components/message/messageTags.mjs +++ b/addon/content/components/message/messageTags.mjs @@ -84,7 +84,7 @@ export function MessageTags({ expanded, tags = [], onTagsChange }) { tags.map((tag, i) => React.createElement(MessageTag, { color: tag.color, - expanded: expanded, + expanded, key: i, name: tag.name, onClickX: () => { diff --git a/addon/content/esmodules/thunderbirdCompat.mjs b/addon/content/esmodules/thunderbirdCompat.mjs index 5fc38c551..7bbd00ea8 100644 --- a/addon/content/esmodules/thunderbirdCompat.mjs +++ b/addon/content/esmodules/thunderbirdCompat.mjs @@ -407,7 +407,7 @@ if (!browser.folders) { async getParentFolders(accountId) { return [ { - accountId: accountId, + accountId, name: "Fake", path: "/Fake", }, diff --git a/addon/dev-frame/components/thunderbird.mjs b/addon/dev-frame/components/thunderbird.mjs index b6f1711ef..e520afdea 100644 --- a/addon/dev-frame/components/thunderbird.mjs +++ b/addon/dev-frame/components/thunderbird.mjs @@ -175,10 +175,10 @@ function Thread({ thread, position = 0 }) { thread.map((message, i) => React.createElement(MessageRow, { key: i, - message: message, + message, position: i, numMessages: thread.length, - onClick: onClick, + onClick, }) ) ); diff --git a/addon/gallery/gallery.mjs b/addon/gallery/gallery.mjs index f35cf086d..a1b099547 100644 --- a/addon/gallery/gallery.mjs +++ b/addon/gallery/gallery.mjs @@ -9,7 +9,7 @@ import PropTypes from "prop-types"; const Photo = React.forwardRef(({ index, length, name, size, src }, ref) => React.createElement( "div", - { className: "photoWrap", ref: ref }, + { className: "photoWrap", ref }, React.createElement("img", { src }), React.createElement( "div", diff --git a/addon/options/options.mjs b/addon/options/options.mjs index 399df1bf9..08b335dac 100644 --- a/addon/options/options.mjs +++ b/addon/options/options.mjs @@ -284,7 +284,7 @@ export function TextOption({ id: name, type: "text", className: "pref", - value: value, + value, onChange: (e) => { onChange(name, e.target.value); }, @@ -330,7 +330,7 @@ export function NumericOption({ className: "pref hidespinbuttons", min: 0, max: 100, - value: value, + value, onChange: (e) => { onChange(name, parseInt(e.target.value || value, 10)); }, @@ -524,11 +524,11 @@ export function Main() { ReactRedux.Provider, { store }, React.createElement(ConversationOptions, { - localizedPrefsInfo: localizedPrefsInfo, - localizedName: localizedName, - localizedStartAssistant: localizedStartAssistant, - localizedUndoCustomizations: localizedUndoCustomizations, - localizedUndoCustomizationsTooltip: localizedUndoCustomizationsTooltip, + localizedPrefsInfo, + localizedName, + localizedStartAssistant, + localizedUndoCustomizations, + localizedUndoCustomizationsTooltip, startSetupAssistant: openSetupAssistant, startUndoConversations: runUndoConversations, })