about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/utils
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch/utils')
-rw-r--r--app/javascript/flavours/glitch/utils/hashtag.js8
-rw-r--r--app/javascript/flavours/glitch/utils/icons.jsx (renamed from app/javascript/flavours/glitch/utils/icons.js)0
-rw-r--r--app/javascript/flavours/glitch/utils/notifications.js2
-rw-r--r--app/javascript/flavours/glitch/utils/privacy_preference.js2
-rw-r--r--app/javascript/flavours/glitch/utils/react_helpers.js2
5 files changed, 7 insertions, 7 deletions
diff --git a/app/javascript/flavours/glitch/utils/hashtag.js b/app/javascript/flavours/glitch/utils/hashtag.js
index 9b663487f..d91cd5591 100644
--- a/app/javascript/flavours/glitch/utils/hashtag.js
+++ b/app/javascript/flavours/glitch/utils/hashtag.js
@@ -1,8 +1,8 @@
 export function recoverHashtags (recognizedTags, text) {
   return recognizedTags.map(tag => {
-      const re = new RegExp(`(?:^|[^\/\)\w])#(${tag.name})`, 'i');
-      const matched_hashtag = text.match(re);
-      return matched_hashtag ? matched_hashtag[1] : null;
-    }
+    const re = new RegExp(`(?:^|[^/)\w])#(${tag.name})`, 'i');
+    const matched_hashtag = text.match(re);
+    return matched_hashtag ? matched_hashtag[1] : null;
+  },
   ).filter(x => x !== null);
 }
diff --git a/app/javascript/flavours/glitch/utils/icons.js b/app/javascript/flavours/glitch/utils/icons.jsx
index c3e362e39..c3e362e39 100644
--- a/app/javascript/flavours/glitch/utils/icons.js
+++ b/app/javascript/flavours/glitch/utils/icons.jsx
diff --git a/app/javascript/flavours/glitch/utils/notifications.js b/app/javascript/flavours/glitch/utils/notifications.js
index 7634cac21..3cdf7caea 100644
--- a/app/javascript/flavours/glitch/utils/notifications.js
+++ b/app/javascript/flavours/glitch/utils/notifications.js
@@ -3,7 +3,7 @@
 
 const checkNotificationPromise = () => {
   try {
-    // eslint-disable-next-line promise/catch-or-return
+    // eslint-disable-next-line promise/catch-or-return, promise/valid-params
     Notification.requestPermission().then();
   } catch(e) {
     return false;
diff --git a/app/javascript/flavours/glitch/utils/privacy_preference.js b/app/javascript/flavours/glitch/utils/privacy_preference.js
index 7781ca7fa..51bdf072d 100644
--- a/app/javascript/flavours/glitch/utils/privacy_preference.js
+++ b/app/javascript/flavours/glitch/utils/privacy_preference.js
@@ -2,4 +2,4 @@ export const order = ['public', 'unlisted', 'private', 'direct'];
 
 export function privacyPreference (a, b) {
   return order[Math.max(order.indexOf(a), order.indexOf(b), 0)];
-};
+}
diff --git a/app/javascript/flavours/glitch/utils/react_helpers.js b/app/javascript/flavours/glitch/utils/react_helpers.js
index 082a58e62..ea11acdb6 100644
--- a/app/javascript/flavours/glitch/utils/react_helpers.js
+++ b/app/javascript/flavours/glitch/utils/react_helpers.js
@@ -7,7 +7,7 @@ export function assignHandlers (target, handlers) {
   //  We just bind each handler to the `target`.
   const handle = target.handlers = {};
   Object.keys(handlers).forEach(
-    key => handle[key] = handlers[key].bind(target)
+    key => handle[key] = handlers[key].bind(target),
   );
 }