From 3f31ab5fd190c09b8666ae79fe960c1b1b9dfa74 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Fri, 24 Mar 2017 18:13:00 -0300 Subject: [PATCH] ESLint add rule `no-void` --- .eslintrc | 1 + .../server/config/configFileUploadFileSystem.js | 2 +- server/methods/loadHistory.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 0dd9f5a3deb2..3c9e29446b60 100644 --- a/.eslintrc +++ b/.eslintrc @@ -48,6 +48,7 @@ "vars": "all", "args": "after-used" }], + "no-void": 2, "no-var": 2, "one-var": [2, "never"], "no-lonely-if": 2, diff --git a/packages/rocketchat-file-upload/server/config/configFileUploadFileSystem.js b/packages/rocketchat-file-upload/server/config/configFileUploadFileSystem.js index f4a0de0f219b..f97534577abf 100644 --- a/packages/rocketchat-file-upload/server/config/configFileUploadFileSystem.js +++ b/packages/rocketchat-file-upload/server/config/configFileUploadFileSystem.js @@ -21,7 +21,7 @@ const createFileSystemStore = _.debounce(function() { return readStream.pipe(writeStream); } - let stream = void 0; + let stream = undefined; const identify = function(err, data) { if (err != null) { diff --git a/server/methods/loadHistory.js b/server/methods/loadHistory.js index c55727eb81bd..4fbc65137de7 100644 --- a/server/methods/loadHistory.js +++ b/server/methods/loadHistory.js @@ -71,7 +71,7 @@ Meteor.methods({ if (ls != null) { const firstMessage = messages[messages.length - 1]; - if ((firstMessage != null ? firstMessage.ts : void 0) > ls) { + if ((firstMessage != null ? firstMessage.ts : undefined) > ls) { delete options.limit; const unreadMessages = RocketChat.models.Messages.findVisibleByRoomIdBetweenTimestampsNotContainingTypes(rid, ls, firstMessage.ts, hideMessagesOfType, {