From 0bbdaa4191d28062128f5f0c60e299a885c89887 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 7 Oct 2020 13:08:36 -0500 Subject: [PATCH] eslint: trailing comma fixes, unused var --- app/soapbox/actions/accounts.js | 2 +- app/soapbox/actions/emoji_reacts.js | 2 +- .../timeline_queue_button_header-test.js | 6 +++--- app/soapbox/components/home_column_header.js | 2 +- .../intersection_observer_article.js | 2 +- app/soapbox/components/media_gallery.js | 2 +- app/soapbox/components/status_action_bar.js | 2 +- .../components/__tests__/captcha-test.js | 4 ++-- .../components/__tests__/login_form-test.js | 2 +- .../components/__tests__/login_page-test.js | 4 ++-- .../components/__tests__/otp_auth_form-test.js | 2 +- .../auth_login/components/login_page.js | 2 +- .../auth_login/components/otp_auth_form.js | 2 +- app/soapbox/features/blocks/index.js | 2 +- .../chats/components/chat_message_list.js | 2 +- .../features/chats/components/chat_panes.js | 2 +- app/soapbox/features/domain_blocks/index.js | 2 +- app/soapbox/features/edit_profile/index.js | 4 ++-- app/soapbox/features/favourites/index.js | 2 +- app/soapbox/features/follow_requests/index.js | 2 +- app/soapbox/features/followers/index.js | 2 +- app/soapbox/features/following/index.js | 2 +- .../features/forms/__tests__/forms-test.js | 18 +++++++++--------- app/soapbox/features/forms/index.js | 2 +- app/soapbox/features/getting_started/index.js | 4 ++-- app/soapbox/features/lists/index.js | 2 +- app/soapbox/features/mutes/index.js | 2 +- .../public_layout/components/header.js | 2 +- app/soapbox/features/reblogs/index.js | 2 +- app/soapbox/features/soapbox_config/index.js | 6 +++--- app/soapbox/features/status/components/card.js | 2 +- .../features/ui/components/funding_panel.js | 2 +- .../ui/components/profile_info_panel.js | 2 +- .../ui/components/profile_media_panel.js | 2 +- .../features/ui/components/promo_panel.js | 2 +- app/soapbox/features/ui/components/tabs_bar.js | 4 ++-- .../features/ui/components/trends_panel.js | 2 +- .../ui/components/who_to_follow_panel.js | 2 +- .../ui/containers/notifications_container.js | 2 +- app/soapbox/reducers/index.js | 2 +- app/soapbox/reducers/notifications.js | 2 +- app/soapbox/reducers/statuses.js | 4 ++-- app/soapbox/reducers/timelines.js | 6 +++--- app/soapbox/selectors/index.js | 4 ++-- .../service_worker/web_push_notifications.js | 2 +- app/soapbox/store/configureStore.js | 2 +- app/soapbox/test_helpers.js | 2 +- app/soapbox/utils/config_db.js | 2 +- app/soapbox/utils/emoji_reacts.js | 8 ++++---- webpack/development.js | 2 +- webpack/production.js | 17 ----------------- webpack/shared.js | 4 ++-- 52 files changed, 76 insertions(+), 93 deletions(-) diff --git a/app/soapbox/actions/accounts.js b/app/soapbox/actions/accounts.js index ec1d1cb6b..55e5926e4 100644 --- a/app/soapbox/actions/accounts.js +++ b/app/soapbox/actions/accounts.js @@ -111,7 +111,7 @@ export function fetchAccount(id) { dispatch, getState, db.transaction('accounts', 'read').objectStore('accounts').index('id'), - id + id, ).then(() => db.close(), error => { db.close(); throw error; diff --git a/app/soapbox/actions/emoji_reacts.js b/app/soapbox/actions/emoji_reacts.js index 9f36e8a21..7b041d4ee 100644 --- a/app/soapbox/actions/emoji_reacts.js +++ b/app/soapbox/actions/emoji_reacts.js @@ -29,7 +29,7 @@ export const simpleEmojiReact = (status, emoji) => { emojiReacts .filter(emojiReact => emojiReact.get('me') === true) .map(emojiReact => dispatch(unEmojiReact(status, emojiReact.get('name')))), - status.get('favourited') && dispatch(unfavourite(status)) + status.get('favourited') && dispatch(unfavourite(status)), ).then(() => { if (emoji === '👍') { dispatch(favourite(status)); diff --git a/app/soapbox/components/__tests__/timeline_queue_button_header-test.js b/app/soapbox/components/__tests__/timeline_queue_button_header-test.js index 4e2ace540..9f0125a46 100644 --- a/app/soapbox/components/__tests__/timeline_queue_button_header-test.js +++ b/app/soapbox/components/__tests__/timeline_queue_button_header-test.js @@ -15,7 +15,7 @@ describe('', () => { onClick={() => {}} // eslint-disable-line react/jsx-no-bind count={0} message={messages.queue} - /> + />, ).toJSON()).toMatchSnapshot(); expect(createComponent( @@ -24,7 +24,7 @@ describe('', () => { onClick={() => {}} // eslint-disable-line react/jsx-no-bind count={1} message={messages.queue} - /> + />, ).toJSON()).toMatchSnapshot(); expect(createComponent( @@ -33,7 +33,7 @@ describe('', () => { onClick={() => {}} // eslint-disable-line react/jsx-no-bind count={9999999} message={messages.queue} - /> + />, ).toJSON()).toMatchSnapshot(); }); }); diff --git a/app/soapbox/components/home_column_header.js b/app/soapbox/components/home_column_header.js index 80cccb808..21bc3d331 100644 --- a/app/soapbox/components/home_column_header.js +++ b/app/soapbox/components/home_column_header.js @@ -130,7 +130,7 @@ class ColumnHeader extends React.PureComponent { } > {list.get('title')} - ) + ), ); } diff --git a/app/soapbox/components/intersection_observer_article.js b/app/soapbox/components/intersection_observer_article.js index 04a64dccd..d21ea2565 100644 --- a/app/soapbox/components/intersection_observer_article.js +++ b/app/soapbox/components/intersection_observer_article.js @@ -44,7 +44,7 @@ export default class IntersectionObserverArticle extends React.Component { intersectionObserverWrapper.observe( id, this.node, - this.handleIntersection + this.handleIntersection, ); this.componentMounted = true; diff --git a/app/soapbox/components/media_gallery.js b/app/soapbox/components/media_gallery.js index 3eda57795..73f14318f 100644 --- a/app/soapbox/components/media_gallery.js +++ b/app/soapbox/components/media_gallery.js @@ -323,7 +323,7 @@ class MediaGallery extends React.PureComponent { let itemsDimensions = []; const ratios = Array(size).fill().map((_, i) => - media.getIn([i, 'meta', 'small', 'aspect']) + media.getIn([i, 'meta', 'small', 'aspect']), ); const [ar1, ar2, ar3, ar4] = ratios; diff --git a/app/soapbox/components/status_action_bar.js b/app/soapbox/components/status_action_bar.js index 1ee84ca00..4f4d97407 100644 --- a/app/soapbox/components/status_action_bar.js +++ b/app/soapbox/components/status_action_bar.js @@ -406,5 +406,5 @@ const mapDispatchToProps = (dispatch) => ({ }); export default injectIntl( - connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true } + connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true }, )(StatusActionBar)); diff --git a/app/soapbox/features/auth_login/components/__tests__/captcha-test.js b/app/soapbox/features/auth_login/components/__tests__/captcha-test.js index 332849be3..71117452a 100644 --- a/app/soapbox/features/auth_login/components/__tests__/captcha-test.js +++ b/app/soapbox/features/auth_login/components/__tests__/captcha-test.js @@ -7,7 +7,7 @@ import { Map as ImmutableMap } from 'immutable'; describe('', () => { it('renders null by default', () => { expect(createComponent( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -25,7 +25,7 @@ describe('', () => { {}} // eslint-disable-line react/jsx-no-bind - /> + />, ).toJSON()).toMatchSnapshot(); }); }); diff --git a/app/soapbox/features/auth_login/components/__tests__/login_form-test.js b/app/soapbox/features/auth_login/components/__tests__/login_form-test.js index c2be4b8a8..6626ef26e 100644 --- a/app/soapbox/features/auth_login/components/__tests__/login_form-test.js +++ b/app/soapbox/features/auth_login/components/__tests__/login_form-test.js @@ -5,7 +5,7 @@ import { createComponent } from 'soapbox/test_helpers'; describe('', () => { it('renders correctly', () => { expect(createComponent( - + , ).toJSON()).toMatchSnapshot(); }); }); diff --git a/app/soapbox/features/auth_login/components/__tests__/login_page-test.js b/app/soapbox/features/auth_login/components/__tests__/login_page-test.js index 27393c6c3..ee4298a52 100644 --- a/app/soapbox/features/auth_login/components/__tests__/login_page-test.js +++ b/app/soapbox/features/auth_login/components/__tests__/login_page-test.js @@ -13,13 +13,13 @@ describe('', () => { it('renders correctly on load', () => { expect(createComponent( - + , ).toJSON()).toMatchSnapshot(); const store = mockStore(ImmutableMap({ me: '1234' })); expect(createComponent( , - { store } + { store }, ).toJSON()).toMatchSnapshot(); }); diff --git a/app/soapbox/features/auth_login/components/__tests__/otp_auth_form-test.js b/app/soapbox/features/auth_login/components/__tests__/otp_auth_form-test.js index 799a5e819..335780280 100644 --- a/app/soapbox/features/auth_login/components/__tests__/otp_auth_form-test.js +++ b/app/soapbox/features/auth_login/components/__tests__/otp_auth_form-test.js @@ -12,7 +12,7 @@ describe('', () => { , - { store } + { store }, ).toJSON(); expect(wrapper).toEqual(expect.objectContaining({ diff --git a/app/soapbox/features/auth_login/components/login_page.js b/app/soapbox/features/auth_login/components/login_page.js index c660c467e..3e2cea0e1 100644 --- a/app/soapbox/features/auth_login/components/login_page.js +++ b/app/soapbox/features/auth_login/components/login_page.js @@ -28,7 +28,7 @@ class LoginPage extends ImmutablePureComponent { getFormData = (form) => { return Object.fromEntries( - Array.from(form).map(i => [i.name, i.value]) + Array.from(form).map(i => [i.name, i.value]), ); } diff --git a/app/soapbox/features/auth_login/components/otp_auth_form.js b/app/soapbox/features/auth_login/components/otp_auth_form.js index 49aa3c735..091d2a48f 100644 --- a/app/soapbox/features/auth_login/components/otp_auth_form.js +++ b/app/soapbox/features/auth_login/components/otp_auth_form.js @@ -29,7 +29,7 @@ class OtpAuthForm extends ImmutablePureComponent { getFormData = (form) => { return Object.fromEntries( - Array.from(form).map(i => [i.name, i.value]) + Array.from(form).map(i => [i.name, i.value]), ); } diff --git a/app/soapbox/features/blocks/index.js b/app/soapbox/features/blocks/index.js index 5b34287dd..a25c6337c 100644 --- a/app/soapbox/features/blocks/index.js +++ b/app/soapbox/features/blocks/index.js @@ -62,7 +62,7 @@ class Blocks extends ImmutablePureComponent { emptyMessage={emptyMessage} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/chats/components/chat_message_list.js b/app/soapbox/features/chats/components/chat_message_list.js index af35f216d..c969566fe 100644 --- a/app/soapbox/features/chats/components/chat_message_list.js +++ b/app/soapbox/features/chats/components/chat_message_list.js @@ -87,7 +87,7 @@ class ChatMessageList extends ImmutablePureComponent { day: '2-digit', hour: '2-digit', minute: '2-digit', - } + }, ); }; diff --git a/app/soapbox/features/chats/components/chat_panes.js b/app/soapbox/features/chats/components/chat_panes.js index 6d5e82251..d16a02ee6 100644 --- a/app/soapbox/features/chats/components/chat_panes.js +++ b/app/soapbox/features/chats/components/chat_panes.js @@ -78,7 +78,7 @@ class ChatPanes extends ImmutablePureComponent {
{mainWindowPane} {panes.map((pane, i) => - + , )}
); diff --git a/app/soapbox/features/domain_blocks/index.js b/app/soapbox/features/domain_blocks/index.js index 9c1e313cc..96969f1f8 100644 --- a/app/soapbox/features/domain_blocks/index.js +++ b/app/soapbox/features/domain_blocks/index.js @@ -63,7 +63,7 @@ class Blocks extends ImmutablePureComponent { emptyMessage={emptyMessage} > {domains.map(domain => - + , )} diff --git a/app/soapbox/features/edit_profile/index.js b/app/soapbox/features/edit_profile/index.js index 75941885d..643c19c0f 100644 --- a/app/soapbox/features/edit_profile/index.js +++ b/app/soapbox/features/edit_profile/index.js @@ -40,7 +40,7 @@ const mapStateToProps = state => { // Forces fields to be maxFields size, filling empty values const normalizeFields = (fields, maxFields) => ( ImmutableList(fields).setSize(maxFields).map(field => - field ? field : ImmutableMap({ name: '', value: '' }) + field ? field : ImmutableMap({ name: '', value: '' }), ) ); @@ -91,7 +91,7 @@ class EditProfile extends ImmutablePureComponent { this.state.fields.forEach((f, i) => params = params .set(`fields_attributes[${i}][name]`, f.get('name')) - .set(`fields_attributes[${i}][value]`, f.get('value')) + .set(`fields_attributes[${i}][value]`, f.get('value')), ); return params; } diff --git a/app/soapbox/features/favourites/index.js b/app/soapbox/features/favourites/index.js index 851a4059a..1b91a0c55 100644 --- a/app/soapbox/features/favourites/index.js +++ b/app/soapbox/features/favourites/index.js @@ -56,7 +56,7 @@ class Favourites extends ImmutablePureComponent { emptyMessage={emptyMessage} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/follow_requests/index.js b/app/soapbox/features/follow_requests/index.js index b0b5d54b8..f09624cec 100644 --- a/app/soapbox/features/follow_requests/index.js +++ b/app/soapbox/features/follow_requests/index.js @@ -62,7 +62,7 @@ class FollowRequests extends ImmutablePureComponent { emptyMessage={emptyMessage} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/followers/index.js b/app/soapbox/features/followers/index.js index 5b7be99a5..ca0d6d2be 100644 --- a/app/soapbox/features/followers/index.js +++ b/app/soapbox/features/followers/index.js @@ -122,7 +122,7 @@ class Followers extends ImmutablePureComponent { emptyMessage={} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/following/index.js b/app/soapbox/features/following/index.js index df2f55fb4..6a1d4c461 100644 --- a/app/soapbox/features/following/index.js +++ b/app/soapbox/features/following/index.js @@ -122,7 +122,7 @@ class Following extends ImmutablePureComponent { emptyMessage={} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/forms/__tests__/forms-test.js b/app/soapbox/features/forms/__tests__/forms-test.js index ffb30b273..881f6f053 100644 --- a/app/soapbox/features/forms/__tests__/forms-test.js +++ b/app/soapbox/features/forms/__tests__/forms-test.js @@ -15,7 +15,7 @@ import { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -23,7 +23,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -31,7 +31,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -39,7 +39,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -47,7 +47,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -55,7 +55,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -63,7 +63,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -71,7 +71,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); @@ -79,7 +79,7 @@ describe('', () => { describe('', () => { it('renders correctly', () => { expect(renderer.create( - + , ).toJSON()).toMatchSnapshot(); }); }); diff --git a/app/soapbox/features/forms/index.js b/app/soapbox/features/forms/index.js index 5c7951ddb..edd4b1ab0 100644 --- a/app/soapbox/features/forms/index.js +++ b/app/soapbox/features/forms/index.js @@ -171,7 +171,7 @@ export class RadioGroup extends ImmutablePureComponent { const { label, children, onChange } = this.props; const childrenWithProps = React.Children.map(children, child => - React.cloneElement(child, { onChange }) + React.cloneElement(child, { onChange }), ); return ( diff --git a/app/soapbox/features/getting_started/index.js b/app/soapbox/features/getting_started/index.js index 7f2c9c0c3..34b1cbc65 100644 --- a/app/soapbox/features/getting_started/index.js +++ b/app/soapbox/features/getting_started/index.js @@ -102,7 +102,7 @@ class GettingStarted extends ImmutablePureComponent { height += 34 + 48*2; navItems.push( - + , ); height += 34; @@ -111,7 +111,7 @@ class GettingStarted extends ImmutablePureComponent { navItems.push( , , - + , ); height += 48*3; diff --git a/app/soapbox/features/lists/index.js b/app/soapbox/features/lists/index.js index 16166047f..f5dbfcf8e 100644 --- a/app/soapbox/features/lists/index.js +++ b/app/soapbox/features/lists/index.js @@ -71,7 +71,7 @@ class Lists extends ImmutablePureComponent { emptyMessage={emptyMessage} > {lists.map(list => - + , )} diff --git a/app/soapbox/features/mutes/index.js b/app/soapbox/features/mutes/index.js index abcfe2ea7..540e9f54f 100644 --- a/app/soapbox/features/mutes/index.js +++ b/app/soapbox/features/mutes/index.js @@ -62,7 +62,7 @@ class Mutes extends ImmutablePureComponent { emptyMessage={emptyMessage} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/public_layout/components/header.js b/app/soapbox/features/public_layout/components/header.js index f80c483e7..453be4b1d 100644 --- a/app/soapbox/features/public_layout/components/header.js +++ b/app/soapbox/features/public_layout/components/header.js @@ -44,7 +44,7 @@ class Header extends ImmutablePureComponent { getFormData = (form) => { return Object.fromEntries( - Array.from(form).map(i => [i.name, i.value]) + Array.from(form).map(i => [i.name, i.value]), ); } diff --git a/app/soapbox/features/reblogs/index.js b/app/soapbox/features/reblogs/index.js index 67d36ad24..bf60a10c2 100644 --- a/app/soapbox/features/reblogs/index.js +++ b/app/soapbox/features/reblogs/index.js @@ -77,7 +77,7 @@ class Reblogs extends ImmutablePureComponent { emptyMessage={emptyMessage} > {accountIds.map(id => - + , )} diff --git a/app/soapbox/features/soapbox_config/index.js b/app/soapbox/features/soapbox_config/index.js index 6c5e08410..ded6ef239 100644 --- a/app/soapbox/features/soapbox_config/index.js +++ b/app/soapbox/features/soapbox_config/index.js @@ -140,19 +140,19 @@ class SoapboxConfig extends ImmutablePureComponent { path, (e) => template .merge(field) - .set(key, e.target.value) + .set(key, e.target.value), ); }; handlePromoItemChange = (index, key, field) => { return this.handleItemChange( - ['promoPanel', 'items', index], key, field, templates.promoPanelItem + ['promoPanel', 'items', index], key, field, templates.promoPanelItem, ); }; handleHomeFooterItemChange = (index, key, field) => { return this.handleItemChange( - ['navlinks', 'homeFooter', index], key, field, templates.footerItem + ['navlinks', 'homeFooter', index], key, field, templates.footerItem, ); }; diff --git a/app/soapbox/features/status/components/card.js b/app/soapbox/features/status/components/card.js index f1b5495c0..92ffa99fc 100644 --- a/app/soapbox/features/status/components/card.js +++ b/app/soapbox/features/status/components/card.js @@ -98,7 +98,7 @@ export default class Card extends React.PureComponent { }, }, ]), - 0 + 0, ); }; diff --git a/app/soapbox/features/ui/components/funding_panel.js b/app/soapbox/features/ui/components/funding_panel.js index 6d4084784..5b0b73e8b 100644 --- a/app/soapbox/features/ui/components/funding_panel.js +++ b/app/soapbox/features/ui/components/funding_panel.js @@ -71,5 +71,5 @@ const mapStateToProps = state => { export default injectIntl( connect(mapStateToProps, null, null, { forwardRef: true, - } + }, )(FundingPanel)); diff --git a/app/soapbox/features/ui/components/profile_info_panel.js b/app/soapbox/features/ui/components/profile_info_panel.js index 25034b732..735a4145d 100644 --- a/app/soapbox/features/ui/components/profile_info_panel.js +++ b/app/soapbox/features/ui/components/profile_info_panel.js @@ -150,5 +150,5 @@ const mapStateToProps = (state, { account }) => { export default injectIntl( connect(mapStateToProps, null, null, { forwardRef: true, - } + }, )(ProfileInfoPanel)); diff --git a/app/soapbox/features/ui/components/profile_media_panel.js b/app/soapbox/features/ui/components/profile_media_panel.js index 2927c1a63..d0a861f1d 100644 --- a/app/soapbox/features/ui/components/profile_media_panel.js +++ b/app/soapbox/features/ui/components/profile_media_panel.js @@ -81,5 +81,5 @@ const mapStateToProps = (state, { account }) => ({ export default injectIntl( connect(mapStateToProps, null, null, { forwardRef: true, - } + }, )(ProfileMediaPanel)); diff --git a/app/soapbox/features/ui/components/promo_panel.js b/app/soapbox/features/ui/components/promo_panel.js index b91380bbc..41227dadc 100644 --- a/app/soapbox/features/ui/components/promo_panel.js +++ b/app/soapbox/features/ui/components/promo_panel.js @@ -28,7 +28,7 @@ class PromoPanel extends React.PureComponent { {item.get('text')} - ) + ), )} diff --git a/app/soapbox/features/ui/components/tabs_bar.js b/app/soapbox/features/ui/components/tabs_bar.js index 46c314500..a87bf7429 100644 --- a/app/soapbox/features/ui/components/tabs_bar.js +++ b/app/soapbox/features/ui/components/tabs_bar.js @@ -94,7 +94,7 @@ class TabsBar extends React.PureComponent { - + , ); return links.map((link) => React.cloneElement(link, { @@ -172,5 +172,5 @@ const mapDispatchToProps = (dispatch) => ({ }); export default injectIntl( - connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true } + connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true }, )(TabsBar)); diff --git a/app/soapbox/features/ui/components/trends_panel.js b/app/soapbox/features/ui/components/trends_panel.js index f47390a00..7e15f39f5 100644 --- a/app/soapbox/features/ui/components/trends_panel.js +++ b/app/soapbox/features/ui/components/trends_panel.js @@ -66,5 +66,5 @@ const mapDispatchToProps = dispatch => { export default injectIntl( connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true, - } + }, )(TrendsPanel)); diff --git a/app/soapbox/features/ui/components/who_to_follow_panel.js b/app/soapbox/features/ui/components/who_to_follow_panel.js index 1ca18a6a3..512f4db63 100644 --- a/app/soapbox/features/ui/components/who_to_follow_panel.js +++ b/app/soapbox/features/ui/components/who_to_follow_panel.js @@ -74,5 +74,5 @@ const mapDispatchToProps = dispatch => { export default injectIntl( connect(mapStateToProps, mapDispatchToProps, null, { forwardRef: true, - } + }, )(WhoToFollowPanel)); diff --git a/app/soapbox/features/ui/containers/notifications_container.js b/app/soapbox/features/ui/containers/notifications_container.js index 0bb26ecf9..79488b1af 100644 --- a/app/soapbox/features/ui/containers/notifications_container.js +++ b/app/soapbox/features/ui/containers/notifications_container.js @@ -8,7 +8,7 @@ const defaultBarStyleFactory = (index, style, notification) => { return Object.assign( {}, style, - { bottom: `${14 + index * 12 + index * 42}px` } + { bottom: `${14 + index * 12 + index * 42}px` }, ); }; diff --git a/app/soapbox/reducers/index.js b/app/soapbox/reducers/index.js index 5ec2b581c..00db40b1e 100644 --- a/app/soapbox/reducers/index.js +++ b/app/soapbox/reducers/index.js @@ -109,7 +109,7 @@ const logOut = (state = ImmutableMap()) => { whitelist.reduce((acc, curr) => { acc[curr] = state.get(curr); return acc; - }, {}) + }, {}), ); }; diff --git a/app/soapbox/reducers/notifications.js b/app/soapbox/reducers/notifications.js index 3d0d14dfb..68cc90c29 100644 --- a/app/soapbox/reducers/notifications.js +++ b/app/soapbox/reducers/notifications.js @@ -70,7 +70,7 @@ const processRawNotifications = notifications => ( ImmutableOrderedMap( notifications .filter(isValid) - .map(n => [n.id, notificationToMap(n)]) + .map(n => [n.id, notificationToMap(n)]), )); const expandNormalizedNotifications = (state, notifications, next) => { diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.js index b7f09ef22..202a36d77 100644 --- a/app/soapbox/reducers/statuses.js +++ b/app/soapbox/reducers/statuses.js @@ -55,13 +55,13 @@ export default function statuses(state = initialState, action) { return state .updateIn( [action.status.get('id'), 'pleroma', 'emoji_reactions'], - emojiReacts => simulateEmojiReact(emojiReacts, action.emoji) + emojiReacts => simulateEmojiReact(emojiReacts, action.emoji), ); case UNEMOJI_REACT_REQUEST: return state .updateIn( [action.status.get('id'), 'pleroma', 'emoji_reactions'], - emojiReacts => simulateUnEmojiReact(emojiReacts, action.emoji) + emojiReacts => simulateUnEmojiReact(emojiReacts, action.emoji), ); case FAVOURITE_FAIL: return state.get(action.status.get('id')) === undefined ? state : state.setIn([action.status.get('id'), 'favourited'], false); diff --git a/app/soapbox/reducers/timelines.js b/app/soapbox/reducers/timelines.js index c86376406..013af81b4 100644 --- a/app/soapbox/reducers/timelines.js +++ b/app/soapbox/reducers/timelines.js @@ -58,7 +58,7 @@ const expandNormalizedTimeline = (state, timeline, statuses, next, isPartial, is return oldIds.take(firstIndex + 1).concat( isPartial && oldIds.get(firstIndex) !== null ? newIds.unshift(null) : newIds, - oldIds.skip(lastIndex) + oldIds.skip(lastIndex), ); }); } @@ -149,7 +149,7 @@ const updateTop = (state, timeline, top) => { const filterTimeline = (timeline, state, relationship, statuses) => state.updateIn([timeline, 'items'], ImmutableList(), list => list.filterNot(statusId => - statuses.getIn([statusId, 'account']) === relationship.id + statuses.getIn([statusId, 'account']) === relationship.id, )); const removeStatusFromGroup = (state, groupId, statusId) => { @@ -190,7 +190,7 @@ export default function timelines(state = initialState, action) { return state.update( action.timeline, initialTimeline, - map => map.set('online', false).update('items', items => items.first() ? items.unshift(null) : items) + map => map.set('online', false).update('items', items => items.first() ? items.unshift(null) : items), ); case GROUP_REMOVE_STATUS_SUCCESS: return removeStatusFromGroup(state, action.groupId, action.id); diff --git a/app/soapbox/selectors/index.js b/app/soapbox/selectors/index.js index 30d3e971f..89d20b209 100644 --- a/app/soapbox/selectors/index.js +++ b/app/soapbox/selectors/index.js @@ -110,7 +110,7 @@ export const makeGetStatus = () => { map.set('account', accountBase); map.set('filtered', filtered); }); - } + }, ); }; @@ -172,6 +172,6 @@ export const makeGetChat = () => { map.set('account', account); map.set('last_message', lastMessage); }); - } + }, ); }; diff --git a/app/soapbox/service_worker/web_push_notifications.js b/app/soapbox/service_worker/web_push_notifications.js index 220f93d09..00e948251 100644 --- a/app/soapbox/service_worker/web_push_notifications.js +++ b/app/soapbox/service_worker/web_push_notifications.js @@ -118,7 +118,7 @@ const handlePush = (event) => { badge: '/badge.png', data: { access_token, preferred_locale, url: '/notifications' }, }); - }) + }), ); }; diff --git a/app/soapbox/store/configureStore.js b/app/soapbox/store/configureStore.js index 7e7472841..e18af842f 100644 --- a/app/soapbox/store/configureStore.js +++ b/app/soapbox/store/configureStore.js @@ -10,6 +10,6 @@ export default function configureStore() { thunk, loadingBarMiddleware({ promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'] }), errorsMiddleware(), - soundsMiddleware() + soundsMiddleware(), ), window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__() : f => f)); }; diff --git a/app/soapbox/test_helpers.js b/app/soapbox/test_helpers.js index 7f7052ae3..544650141 100644 --- a/app/soapbox/test_helpers.js +++ b/app/soapbox/test_helpers.js @@ -28,6 +28,6 @@ export const createComponent = (children, props = {}) => { {children} - + , ); }; diff --git a/app/soapbox/utils/config_db.js b/app/soapbox/utils/config_db.js index c4661ad00..8a1e78a50 100644 --- a/app/soapbox/utils/config_db.js +++ b/app/soapbox/utils/config_db.js @@ -1,7 +1,7 @@ export const ConfigDB = { find: (configs, group, key) => { return configs.find(config => - config.isSuperset({ group, key }) + config.isSuperset({ group, key }), ); }, }; diff --git a/app/soapbox/utils/emoji_reacts.js b/app/soapbox/utils/emoji_reacts.js index 39c194101..03b80a39a 100644 --- a/app/soapbox/utils/emoji_reacts.js +++ b/app/soapbox/utils/emoji_reacts.js @@ -39,8 +39,8 @@ export const mergeEmojiFavourites = (emojiReacts, favouritesCount, favourited) = const hasMultiReactions = (emojiReacts, account) => ( emojiReacts.filter( e => e.get('accounts').filter( - a => a.get('id') === account.get('id') - ).count() > 0 + a => a.get('id') === account.get('id'), + ).count() > 0, ).count() > 1 ); @@ -72,14 +72,14 @@ export const filterEmoji = (emojiReacts, allowedEmoji=ALLOWED_EMOJI) => ( export const reduceEmoji = (emojiReacts, favouritesCount, favourited, allowedEmoji=ALLOWED_EMOJI) => ( filterEmoji(sortEmoji(mergeEmoji(mergeEmojiFavourites( - emojiReacts, favouritesCount, favourited + emojiReacts, favouritesCount, favourited, ))), allowedEmoji)); export const getReactForStatus = status => { return reduceEmoji( status.getIn(['pleroma', 'emoji_reactions'], ImmutableList()), status.get('favourites_count'), - status.get('favourited') + status.get('favourited'), ).filter(e => e.get('me') === true) .getIn([0, 'name']); }; diff --git a/webpack/development.js b/webpack/development.js index 52a47eaa1..bb59c6a83 100644 --- a/webpack/development.js +++ b/webpack/development.js @@ -89,7 +89,7 @@ module.exports = merge(sharedConfig, { watchOptions: Object.assign( {}, settings.dev_server.watch_options, - watchOptions + watchOptions, ), serveIndex: true, proxy: makeProxyConfig(), diff --git a/webpack/production.js b/webpack/production.js index 9ed66b400..b592c36ce 100644 --- a/webpack/production.js +++ b/webpack/production.js @@ -1,7 +1,6 @@ // Note: You must restart bin/webpack-dev-server for changes to take effect console.log('Running in production mode'); // eslint-disable-line no-console -const { URL } = require('url'); const merge = require('webpack-merge'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const OfflinePlugin = require('offline-plugin'); @@ -10,22 +9,6 @@ const CompressionPlugin = require('compression-webpack-plugin'); const { output } = require('./configuration'); const sharedConfig = require('./shared'); -// eslint-disable-next-line no-unused-vars -let attachmentHost; - -if (process.env.S3_ENABLED === 'true') { - if (process.env.S3_ALIAS_HOST || process.env.S3_CLOUDFRONT_HOST) { - attachmentHost = process.env.S3_ALIAS_HOST || process.env.S3_CLOUDFRONT_HOST; - } else { - attachmentHost = process.env.S3_HOSTNAME || `s3-${process.env.S3_REGION || 'us-east-1'}.amazonaws.com`; - } -} else if (process.env.SWIFT_ENABLED === 'true') { - const { host } = new URL(process.env.SWIFT_OBJECT_URL); - attachmentHost = host; -} else { - attachmentHost = null; -} - module.exports = merge(sharedConfig, { mode: 'production', devtool: 'source-map', diff --git a/webpack/shared.js b/webpack/shared.js index 7f6da74e9..f59e28c2b 100644 --- a/webpack/shared.js +++ b/webpack/shared.js @@ -12,7 +12,7 @@ const rules = require('./rules'); module.exports = { entry: Object.assign( { application: resolve('app/application.js') }, - { styles: resolve(join(settings.source_path, 'styles/application.scss')) } + { styles: resolve(join(settings.source_path, 'styles/application.scss')) }, ), output: { @@ -54,7 +54,7 @@ module.exports = { // temporary fix for https://github.com/ReactTraining/react-router/issues/5576 // to reduce bundle size resource.request = resource.request.replace(/^history/, 'history/es'); - } + }, ), new MiniCssExtractPlugin({ filename: 'css/[name]-[contenthash:8].css',