Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Fix unicorn/prefer-number-properties.
Anders Kaseorgd72f7d1d694f
diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.jsindex aa746b55b89..edf2a2d6e3c 100644--- a/static/js/composebox_typeahead.js+++ b/static/js/composebox_typeahead.js@@ -320,7 +320,7 @@ exports.broadcast_mentions = function () {// Always sort above, under the assumption that names will// be longer and only contain "all" as a substring.- pm_recipient_count: Infinity,+ pm_recipient_count: Number.POSITIVE_INFINITY,full_name: mention,is_broadcast: true,diff --git a/static/js/emoji_picker.js b/static/js/emoji_picker.jsindex b8707a7d0cf..decc522b4ad 100644--- a/static/js/emoji_picker.js+++ b/static/js/emoji_picker.js@@ -463,7 +463,7 @@ exports.navigate = function (event_name, e) {// goes to beginning) with something reasonable and// consistent (cursor goes to the end of the filter// string).- $(".emoji-popover-filter").trigger("focus").caret(Infinity);+ $(".emoji-popover-filter").trigger("focus").caret(Number.POSITIVE_INFINITY);ui.get_scroll_element($emoji_map).scrollTop(0);ui.get_scroll_element($(".emoji-search-results-container")).scrollTop(0);current_section = 0;diff --git a/static/js/hotkey.js b/static/js/hotkey.jsindex ff8d62e31e8..471bdfb4438 100644--- a/static/js/hotkey.js+++ b/static/js/hotkey.js@@ -646,7 +646,7 @@ exports.process_hotkey = function (e, hotkey) {} else if (event_name === "page_down") {// so that it always goes to the end of the text box.const height = $(":focus")[0].scrollHeight;- $(":focus").caret(Infinity).animate({scrollTop: height}, "fast");+ $(":focus").caret(Number.POSITIVE_INFINITY).animate({scrollTop: height}, "fast");return true;} else if (event_name === "search_with_k") {// Do nothing; this allows one to use Ctrl+K inside compose.diff --git a/static/js/localstorage.js b/static/js/localstorage.jsindex c2462b74a45..51969646615 100644--- a/static/js/localstorage.js+++ b/static/js/localstorage.js@@ -81,7 +81,7 @@ const ls = {if (old && old.__valid) {const data = callback(old.data);- this.setData(v2, name, data, Infinity);+ this.setData(v2, name, data, Number.POSITIVE_INFINITY);return data;}@@ -94,7 +94,7 @@ const ls = {const localstorage = function () {const _data = {VERSION: 1,- expires: Infinity,+ expires: Number.POSITIVE_INFINITY,expiresIsGlobal: false,};@@ -127,7 +127,7 @@ const localstorage = function () {// make sure to return it back to Infinity to not impose// constraints on the next key.if (!_data.expiresIsGlobal) {- _data.expires = Infinity;+ _data.expires = Number.POSITIVE_INFINITY;}return true;diff --git a/static/js/stats/stats.js b/static/js/stats/stats.jsindex d250b1b8ff2..6fba87703fa 100644--- a/static/js/stats/stats.js+++ b/static/js/stats/stats.js@@ -10,7 +10,7 @@ const font_14pt = {color: "#000000",};-let last_full_update = Infinity;+let last_full_update = Number.POSITIVE_INFINITY;// TODO: should take a dict of arrays and do it for all keysfunction partial_sums(array) {