From acae7d57e41606c94d5b0e5be91a2e32ad1fc912 Mon Sep 17 00:00:00 2001
From: Essem <smswessem@gmail.com>
Date: Sun, 28 Jan 2024 13:52:08 -0600
Subject: [PATCH] Fix JS linting issues

---
 .../flavours/glitch/reducers/accounts.ts      | 22 +++++++------------
 app/javascript/mastodon/reducers/accounts.ts  | 22 +++++++------------
 2 files changed, 16 insertions(+), 28 deletions(-)

diff --git a/app/javascript/flavours/glitch/reducers/accounts.ts b/app/javascript/flavours/glitch/reducers/accounts.ts
index 345bff06ce..c9d7b5fe12 100644
--- a/app/javascript/flavours/glitch/reducers/accounts.ts
+++ b/app/javascript/flavours/glitch/reducers/accounts.ts
@@ -59,25 +59,19 @@ export const accountsReducer: Reducer<typeof initialState> = (
     return normalizeAccounts(state, action.payload.accounts);
   else if (followAccountSuccess.match(action)) {
     return state
-      .update(
-        action.payload.relationship.id,
-        (account) => account?.update('followers_count', (n) => n + 1),
+      .update(action.payload.relationship.id, (account) =>
+        account?.update('followers_count', (n) => n + 1),
       )
-      .update(
-        getCurrentUser(),
-        (account) => account?.update('following_count', (n) => n + 1),
+      .update(getCurrentUser(), (account) =>
+        account?.update('following_count', (n) => n + 1),
       );
   } else if (unfollowAccountSuccess.match(action))
     return state
-      .update(
-        action.payload.relationship.id,
-        (account) =>
-          account?.update('followers_count', (n) => Math.max(0, n - 1)),
+      .update(action.payload.relationship.id, (account) =>
+        account?.update('followers_count', (n) => Math.max(0, n - 1)),
       )
-      .update(
-        getCurrentUser(),
-        (account) =>
-          account?.update('following_count', (n) => Math.max(0, n - 1)),
+      .update(getCurrentUser(), (account) =>
+        account?.update('following_count', (n) => Math.max(0, n - 1)),
       );
   else return state;
 };
diff --git a/app/javascript/mastodon/reducers/accounts.ts b/app/javascript/mastodon/reducers/accounts.ts
index e6f07340c0..5a9cc7220c 100644
--- a/app/javascript/mastodon/reducers/accounts.ts
+++ b/app/javascript/mastodon/reducers/accounts.ts
@@ -59,25 +59,19 @@ export const accountsReducer: Reducer<typeof initialState> = (
     return normalizeAccounts(state, action.payload.accounts);
   else if (followAccountSuccess.match(action)) {
     return state
-      .update(
-        action.payload.relationship.id,
-        (account) => account?.update('followers_count', (n) => n + 1),
+      .update(action.payload.relationship.id, (account) =>
+        account?.update('followers_count', (n) => n + 1),
       )
-      .update(
-        getCurrentUser(),
-        (account) => account?.update('following_count', (n) => n + 1),
+      .update(getCurrentUser(), (account) =>
+        account?.update('following_count', (n) => n + 1),
       );
   } else if (unfollowAccountSuccess.match(action))
     return state
-      .update(
-        action.payload.relationship.id,
-        (account) =>
-          account?.update('followers_count', (n) => Math.max(0, n - 1)),
+      .update(action.payload.relationship.id, (account) =>
+        account?.update('followers_count', (n) => Math.max(0, n - 1)),
       )
-      .update(
-        getCurrentUser(),
-        (account) =>
-          account?.update('following_count', (n) => Math.max(0, n - 1)),
+      .update(getCurrentUser(), (account) =>
+        account?.update('following_count', (n) => Math.max(0, n - 1)),
       );
   else return state;
 };