From 7b325aa81b7551cc89fc91a99a5741ef602cc325 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Mon, 9 Oct 2023 13:38:29 +0200 Subject: [PATCH] [Glitch] Autofix missing comma and indentation in JS files Port 774e1189d26fffd914107a4236f6287043c988f8 to glitch-soc Signed-off-by: Claire --- .../glitch/actions/importer/normalizer.js | 6 +++--- .../flavours/glitch/components/column.jsx | 2 +- .../flavours/glitch/components/poll.jsx | 2 +- .../features/compose/components/search.jsx | 18 +++++++++--------- .../glitch/features/explore/results.jsx | 6 +++--- .../glitch/features/firehose/index.jsx | 2 +- .../features/interaction_modal/index.jsx | 8 ++++---- .../glitch/features/report/comment.jsx | 2 +- .../glitch/features/ui/components/header.jsx | 4 ++-- .../features/ui/components/modal_root.jsx | 2 +- .../features/ui/components/sign_in_banner.jsx | 2 +- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js index 97f94d9e4..f30e193c4 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -96,7 +96,7 @@ export function normalizeStatus(status, normalOldStatus, settings) { normalStatus.media_attachments.forEach(item => { const oldItem = list.find(i => i.get('id') === item.id); if (oldItem && oldItem.get('description') === item.description) { - item.translation = oldItem.get('translation') + item.translation = oldItem.get('translation'); } }); } @@ -129,13 +129,13 @@ export function normalizePoll(poll, normalOldPoll) { ...option, voted: poll.own_votes && poll.own_votes.includes(index), titleHtml: emojify(escapeTextContentForBrowser(option.title), emojiMap), - } + }; if (normalOldPoll && normalOldPoll.getIn(['options', index, 'title']) === option.title) { normalOption.translation = normalOldPoll.getIn(['options', index, 'translation']); } - return normalOption + return normalOption; }); return normalPoll; diff --git a/app/javascript/flavours/glitch/components/column.jsx b/app/javascript/flavours/glitch/components/column.jsx index 3c5813052..116d85216 100644 --- a/app/javascript/flavours/glitch/components/column.jsx +++ b/app/javascript/flavours/glitch/components/column.jsx @@ -30,7 +30,7 @@ export default class Column extends PureComponent { if (scrollable.classList.contains('scrollable--flex')) { scrollable = scrollable?.querySelector('.scrollable') || scrollable; } - } + } if (!scrollable) { return; diff --git a/app/javascript/flavours/glitch/components/poll.jsx b/app/javascript/flavours/glitch/components/poll.jsx index 623d34380..03dd6b576 100644 --- a/app/javascript/flavours/glitch/components/poll.jsx +++ b/app/javascript/flavours/glitch/components/poll.jsx @@ -133,7 +133,7 @@ class Poll extends ImmutablePureComponent { handleReveal = () => { this.setState({ revealed: true }); - } + }; renderOption (option, optionIndex, showResults) { const { poll, lang, disabled, intl } = this.props; diff --git a/app/javascript/flavours/glitch/features/compose/components/search.jsx b/app/javascript/flavours/glitch/features/compose/components/search.jsx index 3d79e43c5..0b659f99e 100644 --- a/app/javascript/flavours/glitch/features/compose/components/search.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/search.jsx @@ -59,14 +59,14 @@ class Search extends PureComponent { }; defaultOptions = [ - { label: <>has: , action: e => { e.preventDefault(); this._insertText('has:') } }, - { label: <>is: , action: e => { e.preventDefault(); this._insertText('is:') } }, - { label: <>language: , action: e => { e.preventDefault(); this._insertText('language:') } }, - { label: <>from: , action: e => { e.preventDefault(); this._insertText('from:') } }, - { label: <>before: , action: e => { e.preventDefault(); this._insertText('before:') } }, - { label: <>during: , action: e => { e.preventDefault(); this._insertText('during:') } }, - { label: <>after: , action: e => { e.preventDefault(); this._insertText('after:') } }, - { label: <>in: , action: e => { e.preventDefault(); this._insertText('in:') } } + { label: <>has: , action: e => { e.preventDefault(); this._insertText('has:'); } }, + { label: <>is: , action: e => { e.preventDefault(); this._insertText('is:'); } }, + { label: <>language: , action: e => { e.preventDefault(); this._insertText('language:'); } }, + { label: <>from: , action: e => { e.preventDefault(); this._insertText('from:'); } }, + { label: <>before: , action: e => { e.preventDefault(); this._insertText('before:'); } }, + { label: <>during: , action: e => { e.preventDefault(); this._insertText('during:'); } }, + { label: <>after: , action: e => { e.preventDefault(); this._insertText('after:'); } }, + { label: <>in: , action: e => { e.preventDefault(); this._insertText('in:'); } } ]; setRef = c => { @@ -92,7 +92,7 @@ class Search extends PureComponent { if (value.length > 0 || submitted) { onClear(); - this.setState({ options: [], selectedOption: -1 }) + this.setState({ options: [], selectedOption: -1 }); } }; diff --git a/app/javascript/flavours/glitch/features/explore/results.jsx b/app/javascript/flavours/glitch/features/explore/results.jsx index 1e3fb1bb1..b7e9d22ee 100644 --- a/app/javascript/flavours/glitch/features/explore/results.jsx +++ b/app/javascript/flavours/glitch/features/explore/results.jsx @@ -80,7 +80,7 @@ class Results extends PureComponent { } return null; - }; + } handleSelectAll = () => { const { submittedType, dispatch } = this.props; @@ -116,7 +116,7 @@ class Results extends PureComponent { } this.setState({ type: 'hashtags' }); - } + }; handleSelectStatuses = () => { const { submittedType, dispatch } = this.props; @@ -128,7 +128,7 @@ class Results extends PureComponent { } this.setState({ type: 'statuses' }); - } + }; handleLoadMoreAccounts = () => this._loadMore('accounts'); handleLoadMoreStatuses = () => this._loadMore('statuses'); diff --git a/app/javascript/flavours/glitch/features/firehose/index.jsx b/app/javascript/flavours/glitch/features/firehose/index.jsx index 71f5a1de6..3cdeda97c 100644 --- a/app/javascript/flavours/glitch/features/firehose/index.jsx +++ b/app/javascript/flavours/glitch/features/firehose/index.jsx @@ -221,7 +221,7 @@ const Firehose = ({ feedType, multiColumn }) => { ); -} +}; Firehose.propTypes = { multiColumn: PropTypes.bool, diff --git a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx index 77c0122e2..1afa852cf 100644 --- a/app/javascript/flavours/glitch/features/interaction_modal/index.jsx +++ b/app/javascript/flavours/glitch/features/interaction_modal/index.jsx @@ -27,9 +27,9 @@ const mapStateToProps = (state, { accountId }) => ({ const mapDispatchToProps = (dispatch) => ({ onSignupClick() { dispatch(closeModal({ - modalType: undefined, - ignoreFocus: false, - })); + modalType: undefined, + ignoreFocus: false, + })); dispatch(openModal({ modalType: 'CLOSED_REGISTRATIONS' })); }, }); @@ -187,7 +187,7 @@ class LoginForm extends React.PureComponent { setIFrameRef = (iframe) => { this.iframeRef = iframe; - } + }; handleFocus = () => { this.setState({ expanded: true }); diff --git a/app/javascript/flavours/glitch/features/report/comment.jsx b/app/javascript/flavours/glitch/features/report/comment.jsx index 6a3605215..a7305e8f3 100644 --- a/app/javascript/flavours/glitch/features/report/comment.jsx +++ b/app/javascript/flavours/glitch/features/report/comment.jsx @@ -104,7 +104,7 @@ const Comment = ({ comment, domain, statusIds, isRemote, isSubmitting, selectedD ); -} +}; Comment.propTypes = { comment: PropTypes.string.isRequired, diff --git a/app/javascript/flavours/glitch/features/ui/components/header.jsx b/app/javascript/flavours/glitch/features/ui/components/header.jsx index 114d348d4..6132ce771 100644 --- a/app/javascript/flavours/glitch/features/ui/components/header.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/header.jsx @@ -77,8 +77,8 @@ class Header extends PureComponent { if (sso_redirect) { content = ( - - ) + + ); } else { let signupButton; diff --git a/app/javascript/flavours/glitch/features/ui/components/modal_root.jsx b/app/javascript/flavours/glitch/features/ui/components/modal_root.jsx index 94adbf8f8..78a7ac229 100644 --- a/app/javascript/flavours/glitch/features/ui/components/modal_root.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/modal_root.jsx @@ -128,7 +128,7 @@ export default class ModalRoot extends PureComponent { {(SpecificComponent) => { const ref = typeof SpecificComponent !== 'function' ? this.setModalRef : undefined; - return + return ; }} diff --git a/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx b/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx index 82a7fcdb9..184a8d103 100644 --- a/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx +++ b/app/javascript/flavours/glitch/features/ui/components/sign_in_banner.jsx @@ -24,7 +24,7 @@ const SignInBanner = () => {

- ) + ); } if (registrationsOpen) {