DEV: linting of discourse-presence (#10722)

DEV: linting of discourse-presence (#10722)

diff --git a/plugins/discourse-presence/assets/javascripts/discourse/lib/presence.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/lib/presence.js.es6
index 7b1fb00..da8b7ef 100644
--- a/plugins/discourse-presence/assets/javascripts/discourse/lib/presence.js.es6
+++ b/plugins/discourse-presence/assets/javascripts/discourse/lib/presence.js.es6
@@ -54,7 +54,9 @@ const Presence = EmberObject.extend({
         this.channel,
         (message) => {
           const { user, state } = message;
-          if (this.get("currentUser.id") === user.id) return;
+          if (this.get("currentUser.id") === user.id) {
+            return;
+          }
 
           switch (state) {
             case REPLYING:
@@ -100,7 +102,9 @@ const Presence = EmberObject.extend({
   },
 
   publish(state, whisper, postId, staffOnly) {
-    if (this.get("currentUser.hide_profile_and_presence")) return;
+    if (this.get("currentUser.hide_profile_and_presence")) {
+      return;
+    }
 
     const data = {
       state,
@@ -128,7 +132,9 @@ const Presence = EmberObject.extend({
   _removeUser(user) {
     [this.users, this.editingUsers].forEach((users) => {
       const existingUser = users.findBy("id", user.id);
-      if (existingUser) users.removeObject(existingUser);
+      if (existingUser) {
+        users.removeObject(existingUser);
+      }
     });
   },
 
@@ -158,7 +164,9 @@ const Presence = EmberObject.extend({
       }
 
       if (attrs && attrs.post_id) {
-        if (u.post_id === attrs.post_id) usersLength++;
+        if (u.post_id === attrs.post_id) {
+          usersLength++;
+        }
       } else {
         usersLength++;
       }
diff --git a/plugins/discourse-presence/assets/javascripts/discourse/services/presence-manager.js.es6 b/plugins/discourse-presence/assets/javascripts/discourse/services/presence-manager.js.es6
index 3968289..fa8cc51 100644
--- a/plugins/discourse-presence/assets/javascripts/discourse/services/presence-manager.js.es6
+++ b/plugins/discourse-presence/assets/javascripts/discourse/services/presence-manager.js.es6
@@ -15,12 +15,16 @@ const PresenceManager = Service.extend({
   },
 
   subscribe(topicId, type) {
-    if (!topicId) return;
+    if (!topicId) {
+      return;
+    }
     this._getPresence(topicId).subscribe(type);
   },
 
   unsubscribe(topicId, type) {
-    if (!topicId) return;
+    if (!topicId) {
+      return;
+    }
     const presence = this._getPresence(topicId);
 
     if (presence.unsubscribe(type)) {
@@ -29,17 +33,23 @@ const PresenceManager = Service.extend({
   },
 
   users(topicId) {
-    if (!topicId) return [];
+    if (!topicId) {
+      return [];
+    }
     return this._getPresence(topicId).users;
   },
 
   editingUsers(topicId) {
-    if (!topicId) return [];
+    if (!topicId) {
+      return [];
+    }
     return this._getPresence(topicId).editingUsers;
   },
 
   publish(topicId, state, whisper, postId, staffOnly) {
-    if (!topicId) return;
+    if (!topicId) {
+      return;
+    }
     return this._getPresence(topicId).publish(
       state,
       whisper,

GitHub sha: 4b94af07

This commit appears in #10722 which was approved by eviltrout. It was merged by jjaffeux.