Browse Source

eslintrc: mark most globals read-only

Aarni Koskela 2 năm trước cách đây
mục cha
commit
247f371d3e
1 tập tin đã thay đổi với 29 bổ sung29 xóa
  1. 29 29
      .eslintrc.js

+ 29 - 29
.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",
     }
 };