From f6250c48c6d1195fc1b710d3ab2cada6ec9d2aa0 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Fri, 29 Jan 2021 21:30:55 +0530 Subject: [PATCH] style: Fix formatting issue --- frappe/desk/page/user_profile/user_profile_controller.js | 1 + frappe/public/js/frappe/color_picker/color_picker.js | 4 +++- frappe/public/js/frappe/utils/common.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frappe/desk/page/user_profile/user_profile_controller.js b/frappe/desk/page/user_profile/user_profile_controller.js index ea23cff1d2..61f8ec3c06 100644 --- a/frappe/desk/page/user_profile/user_profile_controller.js +++ b/frappe/desk/page/user_profile/user_profile_controller.js @@ -149,6 +149,7 @@ class UserProfile { }); } + // eslint-disable-next-line no-unused-vars render_percentage_chart(field, title) { // REDESIGN-TODO: chart seems to be broken. Enable this once fixed. this.wrapper.find('.percentage-chart-container').hide(); diff --git a/frappe/public/js/frappe/color_picker/color_picker.js b/frappe/public/js/frappe/color_picker/color_picker.js index 99d2bd7186..aa26bb1c90 100644 --- a/frappe/public/js/frappe/color_picker/color_picker.js +++ b/frappe/public/js/frappe/color_picker/color_picker.js @@ -119,7 +119,8 @@ class Picker { } setup_hue_event() { - let on_drag = (x, _y) => { + // eslint-disable-next-line no-unused-vars + let on_drag = (x, y) => { this.hue_selector_position.x = x; this.hue = Math.round(x * 360 / this.hue_map.offsetWidth); this.update_color_map(); @@ -150,6 +151,7 @@ class Picker { get_pointer_coords() { // eslint-disable-next-line no-unused-vars let h, s, v; + // eslint-disable-next-line no-unused-vars [h, s, v] = utils.get_hsv(this.get_color()); let width = this.color_map.offsetWidth; let height = this.color_map.offsetHeight; diff --git a/frappe/public/js/frappe/utils/common.js b/frappe/public/js/frappe/utils/common.js index 85abedba9d..113ba3ee60 100644 --- a/frappe/public/js/frappe/utils/common.js +++ b/frappe/public/js/frappe/utils/common.js @@ -203,7 +203,7 @@ window.rstrip = function (s, chars) { if (!chars) chars = ['\n', '\t', ' ']; var last_char = s.substr(s.length - 1); while (in_list(chars, last_char)) { - var s = s.substr(0, s.length - 1); + let s = s.substr(0, s.length - 1); last_char = s.substr(s.length - 1); } return s;