From fd76955f3942bbd7ec830ab535bc31621cac14a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A8r=20Kessels?= Date: Sun, 8 Mar 2020 16:02:36 +0100 Subject: [PATCH] Code style improvements in JavaScript (#13159) * JS-linter: fix trailing comma's * Configure eslinter to ignore this onchange error. --- app/javascript/mastodon/actions/accounts.js | 2 +- .../mastodon/components/intersection_observer_article.js | 2 +- app/javascript/mastodon/features/blocks/index.js | 2 +- .../mastodon/features/compose/components/poll_form.js | 1 + app/javascript/mastodon/features/domain_blocks/index.js | 2 +- app/javascript/mastodon/features/favourites/index.js | 2 +- app/javascript/mastodon/features/follow_requests/index.js | 2 +- app/javascript/mastodon/features/followers/index.js | 2 +- app/javascript/mastodon/features/following/index.js | 2 +- app/javascript/mastodon/features/getting_started/index.js | 8 ++++---- app/javascript/mastodon/features/lists/index.js | 2 +- app/javascript/mastodon/features/mutes/index.js | 2 +- app/javascript/mastodon/features/reblogs/index.js | 2 +- .../mastodon/features/status/components/card.js | 2 +- .../features/ui/components/__tests__/column-test.js | 2 +- app/javascript/mastodon/reducers/notifications.js | 4 ++-- app/javascript/mastodon/reducers/timelines.js | 4 ++-- app/javascript/mastodon/selectors/index.js | 2 +- .../mastodon/service_worker/web_push_notifications.js | 2 +- app/javascript/mastodon/store/configureStore.js | 2 +- config/webpack/development.js | 2 +- config/webpack/shared.js | 4 ++-- 22 files changed, 28 insertions(+), 27 deletions(-) diff --git a/app/javascript/mastodon/actions/accounts.js b/app/javascript/mastodon/actions/accounts.js index d4a824e2c9d..4af36e9983e 100644 --- a/app/javascript/mastodon/actions/accounts.js +++ b/app/javascript/mastodon/actions/accounts.js @@ -106,7 +106,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/javascript/mastodon/components/intersection_observer_article.js b/app/javascript/mastodon/components/intersection_observer_article.js index e453730ba4f..124b34b02f9 100644 --- a/app/javascript/mastodon/components/intersection_observer_article.js +++ b/app/javascript/mastodon/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/javascript/mastodon/features/blocks/index.js b/app/javascript/mastodon/features/blocks/index.js index 051431ed293..870c0de0998 100644 --- a/app/javascript/mastodon/features/blocks/index.js +++ b/app/javascript/mastodon/features/blocks/index.js @@ -68,7 +68,7 @@ class Blocks extends ImmutablePureComponent { bindToDocument={!multiColumn} > {accountIds.map(id => - + , )} diff --git a/app/javascript/mastodon/features/compose/components/poll_form.js b/app/javascript/mastodon/features/compose/components/poll_form.js index 01df31d3a84..fa2b0609e2f 100644 --- a/app/javascript/mastodon/features/compose/components/poll_form.js +++ b/app/javascript/mastodon/features/compose/components/poll_form.js @@ -155,6 +155,7 @@ class PollForm extends ImmutablePureComponent {
+ {/* eslint-disable-next-line jsx-a11y/no-onchange */}