eslint: Enable prefer-arrow-callback.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-01 16:45:54 -07:00
committed by Tim Abbott
parent 960174408f
commit a79322bc94
160 changed files with 873 additions and 1012 deletions

View File

@@ -203,7 +203,7 @@ function insert_hotspot_into_DOM(hotspot) {
'<div class="bounce"><span class="bounce-icon">?</span></div>' +
'</div>';
setTimeout(function () {
setTimeout(() => {
$('body').prepend(hotspot_icon_HTML);
$('body').prepend(hotspot_overlay_HTML);
if (place_icon(hotspot)) {
@@ -211,8 +211,8 @@ function insert_hotspot_into_DOM(hotspot) {
}
// reposition on any event that might update the UI
['resize', 'scroll', 'onkeydown', 'click'].forEach(function (event_name) {
window.addEventListener(event_name, _.debounce(function () {
['resize', 'scroll', 'onkeydown', 'click'].forEach((event_name) => {
window.addEventListener(event_name, _.debounce(() => {
if (place_icon(hotspot)) {
place_popover(hotspot);
}
@@ -247,7 +247,7 @@ function close_read_hotspots(new_hotspots) {
exports.load_new = function (new_hotspots) {
close_read_hotspots(new_hotspots);
new_hotspots.forEach(function (hotspot) {
new_hotspots.forEach((hotspot) => {
hotspot.location = HOTSPOT_LOCATIONS.get(hotspot.name);
});
new_hotspots.forEach(insert_hotspot_into_DOM);