Skip to content

Commit

Permalink
update Eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
anapnoe committed Sep 20, 2024
1 parent 7743f65 commit 41f9cbf
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 103 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

98 changes: 0 additions & 98 deletions .eslintrc.js

This file was deleted.

94 changes: 94 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/* global module */
module.exports = {
ignores: [
"extensions",
"extensions-disabled",
"repositories",
"venv"
],
languageOptions: {
globals: {
gradioApp: "readonly",
executeCallbacks: "readonly",
onAfterUiUpdate: "readonly",
onOptionsChanged: "readonly",
onUiLoaded: "readonly",
onUiUpdate: "readonly",
uiCurrentTab: "writable",
uiElementInSight: "readonly",
uiElementIsVisible: "readonly",
opts: "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",
onEdit: "readonly",
requestGet: "readonly",
popup: "readonly",
createVisualizationTable: "readonly",
localization: "readonly",
randomId: "readonly",
requestProgress: "readonly",
modalPrevImage: "readonly",
modalNextImage: "readonly",
localSet: "readonly",
localGet: "readonly",
localRemove: "readonly",
setupResizeHandle: "writable"
},
parserOptions: {
ecmaVersion: "latest",
},
},
rules: {
"arrow-spacing": "error",
"block-spacing": "error",
"brace-style": "error",
"comma-dangle": ["error", "only-multiline"],
"comma-spacing": "error",
"comma-style": ["error", "last"],
"curly": ["error", "multi-line", "consistent"],
"eol-last": "error",
"func-call-spacing": "error",
"function-call-argument-newline": ["error", "consistent"],
"function-paren-newline": ["error", "consistent"],
"indent": ["error", 4],
"key-spacing": "error",
"keyword-spacing": "error",
"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",
"semi-style": ["error", "last"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", "never"],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"switch-colon-spacing": "error",
"template-curly-spacing": ["error", "never"],
"unicode-bom": "error",
},
// Add any additional configurations you need directly here,
// or extend from other configurations (if needed)
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "stable-diffusion-webui",
"version": "0.0.0",
"devDependencies": {
"eslint": "^8.40.0"
"eslint": "^8.57.1"
},
"scripts": {
"lint": "eslint .",
Expand Down

0 comments on commit 41f9cbf

Please sign in to comment.