aboutsummaryrefslogtreecommitdiffstats
path: root/.eslintrc.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-19 13:34:27 +0000
committerGitHub <noreply@github.com>2023-05-19 13:34:27 +0000
commitd41a31a50805fa70f7299f5c0384ad41db7142e5 (patch)
tree52c960e60d3fa4f5b59edf4eb9a41da4277b5805 /.eslintrc.js
parenta6bf4aae309db608b4ea974559df711047992478 (diff)
parent67d4360453e0316b494a43320e2e5df53a93d5ea (diff)
downloadstable-diffusion-webui-gfx803-d41a31a50805fa70f7299f5c0384ad41db7142e5.tar.gz
stable-diffusion-webui-gfx803-d41a31a50805fa70f7299f5c0384ad41db7142e5.tar.bz2
stable-diffusion-webui-gfx803-d41a31a50805fa70f7299f5c0384ad41db7142e5.zip
Merge pull request #10552 from akx/eslint-moar
More Eslint fixes
Diffstat (limited to '.eslintrc.js')
-rw-r--r--.eslintrc.js70
1 files changed, 34 insertions, 36 deletions
diff --git a/.eslintrc.js b/.eslintrc.js
index 9e7ab34d..944cc869 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,3 +1,4 @@
+/* global module */
module.exports = {
env: {
browser: true,
@@ -25,9 +26,14 @@ module.exports = {
"linebreak-style": ["error", "unix"],
"no-extra-semi": "error",
"no-mixed-spaces-and-tabs": "error",
+ "no-multi-spaces": "error",
+ "no-redeclare": ["error", {builtinGlobals: false}],
"no-trailing-spaces": "error",
+ "no-unused-vars": "off",
"no-whitespace-before-property": "error",
"object-curly-newline": ["error", {consistent: true, multiline: true}],
+ "object-curly-spacing": ["error", "never"],
+ "operator-linebreak": ["error", "after"],
"quote-props": ["error", "consistent-as-needed"],
"semi": ["error", "always"],
"semi-spacing": "error",
@@ -40,51 +46,43 @@ module.exports = {
"switch-colon-spacing": "error",
"template-curly-spacing": ["error", "never"],
"unicode-bom": "error",
- "no-multi-spaces": "error",
- "object-curly-spacing": ["error", "never"],
- "operator-linebreak": ["error", "after"],
- "no-unused-vars": "off",
- "no-redeclare": "off",
},
globals: {
- // this file
- module: "writable",
//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",
+ 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",
}
};