From 247f371d3eaa9807d1f5986937cd10bf467ef9ca Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Fri, 19 May 2023 12:50:47 +0300 Subject: [PATCH] eslintrc: mark most globals read-only --- .eslintrc.js | 58 ++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index e33a22c3..1591795b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -49,41 +49,41 @@ module.exports = { }, globals: { //script.js - gradioApp: "writable", - onUiLoaded: "writable", - onUiUpdate: "writable", - onOptionsChanged: "writable", + gradioApp: "readonly", + onUiLoaded: "readonly", + onUiUpdate: "readonly", + onOptionsChanged: "readonly", uiCurrentTab: "writable", - uiElementIsVisible: "writable", - uiElementInSight: "writable", - executeCallbacks: "writable", + uiElementIsVisible: "readonly", + uiElementInSight: "readonly", + executeCallbacks: "readonly", //ui.js opts: "writable", - all_gallery_buttons: "writable", - selected_gallery_button: "writable", - selected_gallery_index: "writable", - args_to_array: "writable", - switch_to_txt2img: "writable", - switch_to_img2img_tab: "writable", - switch_to_img2img: "writable", - switch_to_sketch: "writable", - switch_to_inpaint: "writable", - switch_to_inpaint_sketch: "writable", - switch_to_extras: "writable", - get_tab_index: "writable", - create_submit_args: "writable", - restart_reload: "writable", - updateInput: "writable", + all_gallery_buttons: "readonly", + selected_gallery_button: "readonly", + selected_gallery_index: "readonly", + args_to_array: "readonly", + switch_to_txt2img: "readonly", + switch_to_img2img_tab: "readonly", + switch_to_img2img: "readonly", + switch_to_sketch: "readonly", + switch_to_inpaint: "readonly", + switch_to_inpaint_sketch: "readonly", + switch_to_extras: "readonly", + get_tab_index: "readonly", + create_submit_args: "readonly", + restart_reload: "readonly", + updateInput: "readonly", //extraNetworks.js - requestGet: "writable", - popup: "writable", + requestGet: "readonly", + popup: "readonly", // from python - localization: "writable", + localization: "readonly", // progrssbar.js - randomId: "writable", - requestProgress: "writable", + randomId: "readonly", + requestProgress: "readonly", // imageviewer.js - modalPrevImage: "writable", - modalNextImage: "writable", + modalPrevImage: "readonly", + modalNextImage: "readonly", } };