mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
eslint: Fix unicorn/prefer-number-properties.
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v24.0.0/docs/rules/prefer-number-properties.md Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
dd8e14d3e6
commit
d72f7d1d69
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 keys
|
||||
function partial_sums(array) {
|
||||
|
||||
Reference in New Issue
Block a user