From 697efbc3764474fb6379fd2c2c7682f9ceaad804 Mon Sep 17 00:00:00 2001 From: Sindrake Date: Wed, 17 Jul 2024 08:43:55 -0700 Subject: [PATCH 1/3] [JS] Add ESLint support --- .devcontainer/devcontainer.json | 51 ++-- .eslintrc.yml | 88 ------- .vscode/settings.json | 15 ++ docker-compose.yml | 9 + eslint.config.mjs | 89 +++++++ package.json | 10 +- yarn.lock | 399 +++++++++++++++++++++++++++++++- 7 files changed, 542 insertions(+), 119 deletions(-) delete mode 100644 .eslintrc.yml create mode 100644 eslint.config.mjs diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d86ea604b..64b6cf840 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,30 +2,31 @@ "name": "E621ng project development", "dockerComposeFile": ["../docker-compose.yml", "docker-compose.extend.yml"], "service": "dev-container", - "overrideCommand": true, - "workspaceFolder": "/app", - "features": { + "overrideCommand": true, + "workspaceFolder": "/app", + "features": { "ghcr.io/devcontainers/features/common-utils:2": {} - }, - // Workaround for https://github.com/microsoft/vscode-remote-release/issues/6810 - "onCreateCommand": { - "remove-gitconfig": "rm ~/.gitconfig" - }, - "postAttachCommand": { - "git-safe-dir": "git config --global --add safe.directory /app" - }, - "postCreateCommand": { - "bash-completion": "sudo apk --no-cache add bash-completion && echo 'source /etc/bash/bash_completion.sh' >> ~/.bash_profile" - }, - "customizations": { - "vscode": { - "extensions": [ - "Shopify.ruby-lsp", - "Vue.volar" - ], - "settings": { - "terminal.integrated.defaultProfile.linux": "bash" - } - } - } + }, + // Workaround for https://github.com/microsoft/vscode-remote-release/issues/6810 + "onCreateCommand": { + "remove-gitconfig": "rm ~/.gitconfig" + }, + "postAttachCommand": { + "git-safe-dir": "git config --global --add safe.directory /app" + }, + "postCreateCommand": { + "bash-completion": "sudo apk --no-cache add bash-completion && echo 'source /etc/bash/bash_completion.sh' >> ~/.bash_profile" + }, + "customizations": { + "vscode": { + "extensions": [ + "Shopify.ruby-lsp", + "Vue.volar", + "dbaeumer.vscode-eslint" + ], + "settings": { + "terminal.integrated.defaultProfile.linux": "bash" + } + } + } } diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index acf33ef17..000000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,88 +0,0 @@ -env: - browser: true - es6: true -extends: 'eslint:recommended' -parserOptions: - sourceType: module -globals: - $: false - require: false -rules: - # https://eslint.org/docs/rules/ - array-callback-return: error - block-scoped-var: error - consistent-return: error - default-case: error - dot-notation: error - eqeqeq: error - init-declarations: error - no-caller: error - no-empty-function: error - no-eval: error - no-extend-native: error - no-implicit-coercion: error - no-lone-blocks: error - no-lonely-if: error - no-mixed-operators: error - no-new: error - no-new-wrappers: error - no-return-assign: error - no-self-compare: error - no-sequences: error - no-shadow: error - no-shadow-restricted-names: error - no-unused-expressions: error - no-unused-vars: - - error - - argsIgnorePattern: "^_" - args: none - no-use-before-define: error - no-useless-call: error - no-useless-concat: error - no-useless-return: error - - # formatting issues - array-bracket-spacing: warn - brace-style: [warn, 1tbs, allowSingleLine: true] - comma-spacing: warn - curly: warn - dot-location: [warn, property] - eol-last: warn - func-call-spacing: warn - indent: [warn, 2] - linebreak-style: [warn, unix] - key-spacing: warn - keyword-spacing: warn - no-multiple-empty-lines: warn - no-tabs: warn - no-trailing-spaces: warn - no-whitespace-before-property: warn - space-before-blocks: warn - space-in-parens: warn - space-infix-ops: warn - space-unary-ops: warn - spaced-comment: warn - -# These rules are potentially useful, but are currently too noisy to enable. - -# block-spacing: warn -# no-alert: warn -# no-extra-parens: warn -# no-magic-numbers: -# - warn -# - ignore: [-1, 0, 1] -# ignoreArrayIndexes: true -# enforceConst: true -# no-multi-spaces: warn -# no-negated-condition: warn -# no-param-reassign: warn -# no-var: warn -# object-curly-spacing: warn -# prefer-arrow-callback: warn -# prefer-const: warn -# prefer-template: warn -# quote-props: [warn, consistent-as-needed] -# radix: warn -# semi: warn -# space-before-function-paren: warn -# vars-on-top: warn diff --git a/.vscode/settings.json b/.vscode/settings.json index 1e8e8c669..87bfb1559 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,21 @@ "[ruby]": { "editor.formatOnSave": false }, + "files.associations": { + "*.erb": "Ruby ERB" + }, // Trick ruby-lsp into not doing any updates "rubyLsp.bundleGemfile": "Gemfile", + + "npm.packageManager": "yarn", + "editor.detectIndentation": false, + "editor.tabSize": 2, + "editor.insertSpaces": true, + "editor.formatOnSave": false, + + // Eslint shenanigans + "eslint.useFlatConfig": true, + "eslint.validate": [ + "javascript" + ], } diff --git a/docker-compose.yml b/docker-compose.yml index 8dc62b9e1..d62f0d111 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -180,6 +180,15 @@ services: profiles: - rubocop + linter: + image: e621 + volumes: + - .:/app + - node_modules:/app/node_modules + entrypoint: yarn run lint + profiles: + - linter + volumes: post_data: iqdb_data: diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..38b23b7fe --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,89 @@ +import globals from "globals"; +import eslint from "@eslint/js"; +import stylistic from "@stylistic/eslint-plugin-js"; + +export default [ + eslint.configs.recommended, + { + files: ["**/*.js"], + languageOptions: { + ecmaVersion: "latest", + globals: { + ...globals.browser, + $: false, + Danbooru: false, + }, + }, + plugins: { + "@stylistic/js": stylistic, + }, + rules: { + "no-unused-vars": "off", + + // https://eslint.style/packages/js + /* + "array-bracket-newline": "warn", + "array-bracket-spacing": "off", + "array-element-newline": ["warn", "consistent"], + "arrow-parens": "off", + "arrow-spacing": "warn", + "block-spacing": "warn", + "brace-style": "warn", + "comma-dangle": ["warn", "always-multiline"], + "comma-spacing": "warn", + "comma-style": "warn", + "computed-property-spacing": "warn", + "dot-location": ["warn", "property"], + "eol-last": "warn", + "function-call-argument-newline": ["warn", "consistent"], + "func-call-spacing": "warn", // function-call-spacing does not work ??? + "implicit-arrow-linebreak": "warn", + "indent": ["warn", 2], + "key-spacing": ["warn", { "align": "value" }], // Might get annoying + "keyword-spacing": "warn", + "line-comment-position": "off", + "linebreak-style": "error", + "lines-around-comment": "off", + "lines-between-class-members": "warn", + "max-len": "warn", // Might get annoying, see https://eslint.style/rules/js/max-len + "max-statements-per-line": "warn", + "multiline-comment-style": "off", + "multiline-ternary": ["warn", "always-multiline"], + "new-parens": "warn", + "newline-per-chained-call": "off", + "no-confusing-arrow": "warn", + "no-extra-parens": "warn", + "no-extra-semi": "warn", + "no-floating-decimal": "warn", + "no-mixed-operators": "error", + "no-mixed-spaces-and-tabs": "error", + "no-multi-spaces": ["warn", { ignoreEOLComments: false }], + "no-multiple-empty-lines": "warn", + "no-tabs": "warn", + "no-trailing-spaces": "warn", + "no-whitespace-before-property": "warn", + "nonblock-statement-body-position": "off", + "object-curly-newline": ["warn", { "consistent": true }], + "one-var-declaration-per-line": "off", + "operator-linebreak": ["warn", "before"], + "padded-blocks": "off", + "padding-line-between-statements": "off", + "quote-props": ["warn", "consistent"], + "quotes": "warn", + "rest-spread-spacing": "warn", + "semi": "warn", + "semi-spacing": "warn", + "semi-style": "warn", + "space-before-blocks": "warn", + "space-before-function-paren": "warn", // good idea? + "space-in-parens": "warn", + "space-infix-ops": "warn", + "space-unary-ops": "warn", + "spaced-comment": "warn", + "switch-colon-spacing": "warn", + "template-curly-spacing": "warn", + "template-tag-spacing": "warn", + */ + }, + }, +] diff --git a/package.json b/package.json index f55439132..4993b8e2a 100644 --- a/package.json +++ b/package.json @@ -24,5 +24,13 @@ "zingtouch": "^1.0.6" }, "version": "0.1.0", - "devDependencies": {} + "devDependencies": { + "@eslint/js": "^9.7.0", + "@stylistic/eslint-plugin-js": "^2.3.0", + "eslint": "9.x", + "globals": "^15.8.0" + }, + "scripts": { + "lint": "yarn run eslint ./app/javascript/src/**/*.js" + } } diff --git a/yarn.lock b/yarn.lock index e9640dc44..0fa0597a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -976,11 +976,67 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.11.0": + version "4.11.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" + integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== + +"@eslint/config-array@^0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.17.0.tgz#ff305e1ee618a00e6e5d0485454c8d92d94a860d" + integrity sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^14.0.0" + ignore "^5.2.0" + import-fresh "^3.2.1" + js-yaml "^4.1.0" + minimatch "^3.1.2" + strip-json-comments "^3.1.1" + +"@eslint/js@9.7.0", "@eslint/js@^9.7.0": + version "9.7.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.7.0.tgz#b712d802582f02b11cfdf83a85040a296afec3f0" + integrity sha512-ChuWDQenef8OSFnvuxv0TCVxEwmu3+hPNKvM9B34qpM0rDRbjL8t5QkQeHHeAfsKQjuH9wS82WeCi1J/owatng== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + "@fortawesome/fontawesome-free@^6.2.1": version "6.5.2" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.2.tgz#310fe90cb5a8dee9698833171b98e7835404293d" integrity sha512-hRILoInAx8GNT5IMkrtIt9blOdrqHOnPBH+k70aWUAqPZPgopb9G5EQJFpaBx/S8zp2fC+mPW349Bziuk1o28Q== +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/retry@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" + integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== + "@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" @@ -1040,6 +1096,27 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.8": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@rails/ujs@^7.0.4": version "7.1.3" resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.1.3.tgz#6d94a68b7da5046147d31716e0c187a4ead4fb93" @@ -1073,6 +1150,16 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@stylistic/eslint-plugin-js@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz#a3faee05863c50c0bb6f879db72b7ee895bfa74e" + integrity sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w== + dependencies: + "@types/eslint" "^8.56.10" + acorn "^8.11.3" + eslint-visitor-keys "^4.0.0" + espree "^10.0.1" + "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" @@ -1086,7 +1173,7 @@ "@types/eslint" "*" "@types/estree" "*" -"@types/eslint@*": +"@types/eslint@*", "@types/eslint@^8.56.10": version "8.56.10" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.10.tgz#eb2370a73bf04a901eeba8f22595c7ee0f7eb58d" integrity sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ== @@ -1379,6 +1466,16 @@ acorn-import-assertions@^1.9.0: resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac" integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== +acorn-jsx@^5.3.2: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn@^8.11.3, acorn@^8.12.0: + version "8.12.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" + integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== + acorn@^8.7.1, acorn@^8.8.2: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" @@ -1423,6 +1520,11 @@ ajv@^8.0.0, ajv@^8.9.0: require-from-string "^2.0.2" uri-js "^4.2.2" +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -1699,7 +1801,7 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cross-spawn@^7.0.3: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1844,6 +1946,18 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: dependencies: ms "2.1.2" +debug@^4.3.2: + version "4.3.5" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e" + integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg== + dependencies: + ms "2.1.2" + +deep-is@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== + deepmerge@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" @@ -1929,6 +2043,11 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" @@ -1937,6 +2056,80 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.2.tgz#5cbb33d4384c9136083a71190d548158fe128f94" + integrity sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + +eslint-visitor-keys@^3.3.0: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" + integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== + +eslint@9.x: + version "9.7.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.7.0.tgz#bedb48e1cdc2362a0caaa106a4c6ed943e8b09e4" + integrity sha512-FzJ9D/0nGiCGBf8UXO/IGLTgLVzIxze1zpfA8Ton2mjLovXdAPlYDv+MQDcqj3TmrhAGYfOpz9RfR+ent0AgAw== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.11.0" + "@eslint/config-array" "^0.17.0" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.7.0" + "@humanwhocodes/module-importer" "^1.0.1" + "@humanwhocodes/retry" "^0.3.0" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.3.2" + escape-string-regexp "^4.0.0" + eslint-scope "^8.0.2" + eslint-visitor-keys "^4.0.0" + espree "^10.1.0" + esquery "^1.5.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^8.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + ignore "^5.2.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + is-path-inside "^3.0.3" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.1.2" + natural-compare "^1.4.0" + optionator "^0.9.3" + strip-ansi "^6.0.1" + text-table "^0.2.0" + +espree@^10.0.1, espree@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.1.0.tgz#8788dae611574c0f070691f522e4116c5a11fc56" + integrity sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA== + dependencies: + acorn "^8.12.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.0.0" + +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== + dependencies: + estraverse "^5.1.0" + esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" @@ -1949,7 +2142,7 @@ estraverse@^4.1.1: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== @@ -1979,11 +2172,30 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-levenshtein@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== + fastest-levenshtein@^1.0.12: version "1.0.16" resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== +fastq@^1.6.0: + version "1.17.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== + dependencies: + flat-cache "^4.0.0" + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -2008,11 +2220,32 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== + dependencies: + flatted "^3.2.9" + keyv "^4.5.4" + flat@^5.0.2: version "5.0.2" resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -2033,6 +2266,13 @@ gensync@^1.0.0-beta.2: resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -2062,6 +2302,16 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== + +globals@^15.8.0: + version "15.8.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.8.0.tgz#e64bb47b619dd8cbf32b3c1a0a61714e33cbbb41" + integrity sha512-VZAJ4cewHTExBWDHR6yptdIBlx9YSSZuwojj9Nt5mBRXQzrKakDsVKQ1J63sklLvzAJm0X5+RpO4i3Y2hcOnFw== + graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -2094,6 +2344,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-5.1.0.tgz#c6be6858abd013d768e98366ae47e25d5887b1ae" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== +ignore@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" + integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== + immutable@^4.0.0: version "4.3.5" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.5.tgz#f8b436e66d59f99760dc577f5c99a4fd2a5cc5a0" @@ -2115,6 +2370,11 @@ import-local@^3.0.2: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -2157,7 +2417,7 @@ is-extglob@^2.1.1: resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== -is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -2169,6 +2429,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -2256,6 +2521,11 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -2271,6 +2541,11 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== + json5@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" @@ -2283,11 +2558,26 @@ json5@^2.1.2, json5@^2.2.3: resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + lilconfig@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-3.1.1.tgz#9d8a246fa753106cfc205fd2d77042faca56e5e3" @@ -2328,6 +2618,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lockfile@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" @@ -2360,6 +2657,11 @@ lodash.memoize@^4.1.2: resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag== +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -2428,7 +2730,7 @@ mini-css-extract-plugin@^2.3.0: schema-utils "^4.0.0" tapable "^2.2.1" -minimatch@^3.1.1: +minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -2450,6 +2752,11 @@ nanoid@^3.3.7: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8" integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== + neo-async@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" @@ -2479,6 +2786,18 @@ once@^1.3.0: dependencies: wrappy "1" +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.5" + p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -2486,6 +2805,13 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -2493,6 +2819,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -2815,11 +3148,21 @@ postcss@^8.4.33, postcss@^8.4.38: picocolors "^1.0.0" source-map-js "^1.2.0" +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + punycode@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + rails-erb-loader@^5.5.2: version "5.5.2" resolved "https://registry.yarnpkg.com/rails-erb-loader/-/rails-erb-loader-5.5.2.tgz#db3fa8ac89600f09d179a1a70a2ca18c592576ea" @@ -2928,6 +3271,18 @@ resolve@^1.14.2, resolve@^1.19.0, resolve@^1.9.0: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + safe-buffer@^5.1.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -3045,6 +3400,18 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + style-loader@^3.3.0: version "3.3.4" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-3.3.4.tgz#f30f786c36db03a45cbd55b6a70d930c479090e7" @@ -3123,6 +3490,11 @@ terser@^5.26.0: commander "^2.20.0" source-map-support "~0.5.20" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== + to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" @@ -3140,6 +3512,13 @@ ts-pnp@^1.1.6: resolved "https://registry.yarnpkg.com/ts-pnp/-/ts-pnp-1.2.0.tgz#a500ad084b0798f1c3071af391e65912c86bca92" integrity sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" @@ -3303,6 +3682,11 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -3323,6 +3707,11 @@ yaml@^1.10.0: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + zingtouch@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/zingtouch/-/zingtouch-1.0.6.tgz#456cf2b0a69f91a5ffbd8a83b18033c671f1096d" From 82891b91d17601a37daa1f6547ec47f0d937834e Mon Sep 17 00:00:00 2001 From: Sindrake Date: Wed, 17 Jul 2024 11:26:58 -0700 Subject: [PATCH 2/3] [ESLint] Fix core complaints --- app/javascript/src/javascripts/artist.js | 4 +- app/javascript/src/javascripts/blacklists.js | 4 +- app/javascript/src/javascripts/comments.js | 14 ++--- app/javascript/src/javascripts/common.js | 6 +- app/javascript/src/javascripts/favorites.js | 4 +- app/javascript/src/javascripts/forum_posts.js | 12 ++-- .../src/javascripts/local_storage.js | 1 + app/javascript/src/javascripts/notes.js | 8 +-- .../src/javascripts/post_mode_menu.js | 4 +- .../src/javascripts/post_replacement.js | 10 ++-- app/javascript/src/javascripts/post_sets.js | 4 +- .../src/javascripts/post_versions.js | 4 +- app/javascript/src/javascripts/posts.js | 56 +++++++++---------- .../src/javascripts/tag_relationships.js | 8 +-- app/javascript/src/javascripts/takedowns.js | 4 +- .../src/javascripts/user_warning.js | 2 +- eslint.config.mjs | 2 +- 17 files changed, 74 insertions(+), 73 deletions(-) diff --git a/app/javascript/src/javascripts/artist.js b/app/javascript/src/javascripts/artist.js index 2484ccae6..59386fadf 100644 --- a/app/javascript/src/javascripts/artist.js +++ b/app/javascript/src/javascripts/artist.js @@ -9,10 +9,10 @@ Artist.update = function (id, params) { type: "PUT", url: "/artists/" + id + ".json", data: params, - success: function(data) { + success: function() { Utility.notice("Artist updated."); }, - error: function(data) { + error: function() { Utility.error(`There was an error updating artist #${id}`); } }); diff --git a/app/javascript/src/javascripts/blacklists.js b/app/javascript/src/javascripts/blacklists.js index 9bcd2b96a..bbdd0bebd 100644 --- a/app/javascript/src/javascripts/blacklists.js +++ b/app/javascript/src/javascripts/blacklists.js @@ -9,7 +9,7 @@ Blacklist.post_count = 0; Blacklist.entries = []; Blacklist.entryGet = function (line) { - return $.grep(Blacklist.entries, function (e, i) { + return $.grep(Blacklist.entries, function (e) { return e.tags === line; })[0]; }; @@ -326,7 +326,7 @@ Blacklist.initialize_blacklist_editor = function () { } }).done(function () { Utility.notice("Blacklist updated"); - }).fail(function (data, status, xhr) { + }).fail(function () { Utility.error("Failed to update blacklist"); }); } diff --git a/app/javascript/src/javascripts/comments.js b/app/javascript/src/javascripts/comments.js index 828aee918..6f24ae540 100644 --- a/app/javascript/src/javascripts/comments.js +++ b/app/javascript/src/javascripts/comments.js @@ -50,7 +50,7 @@ Comment.show_all = function(e) { current_comment_section.html(data.html); Comment.reinitialize_all(); $(window).trigger("e621:add_deferred_posts", data.posts); - }).fail(function(data) { + }).fail(function() { Utility.error("Failed to fetch all comments for this post."); }); }; @@ -65,10 +65,10 @@ Comment.hide = function (e) { url: `/comments/${cid}/hide.json`, type: 'POST', dataType: 'json' - }).done(function (data) { + }).done(function () { $(`.comment[data-comment-id="${cid}"] div.author h1`).append(" (hidden)"); $(`.comment[data-comment-id="${cid}"]`).attr('data-is-deleted', 'true'); - }).fail(function (data) { + }).fail(function () { Utility.error("Failed to hide comment."); }); }; @@ -83,11 +83,11 @@ Comment.unhide = function (e) { url: `/comments/${cid}/unhide.json`, type: 'POST', dataType: 'json' - }).done(function (data) { + }).done(function () { const $author = $(`.comment[data-comment-id="${cid}"] div.author h1`); $author.text($author.text().replace(" (hidden)", "")); $(`.comment[data-comment-id="${cid}"]`).attr('data-is-deleted', 'false'); - }).fail(function (data) { + }).fail(function () { Utility.error("Failed to unhide comment."); }); }; @@ -102,9 +102,9 @@ Comment.delete = function (e) { url: `/comments/${cid}.json`, type: 'DELETE', dataType: 'json' - }).done(function (data) { + }).done(function () { parent.remove(); - }).fail(function (data) { + }).fail(function () { Utility.error("Failed to delete comment."); }); }; diff --git a/app/javascript/src/javascripts/common.js b/app/javascript/src/javascripts/common.js index 7656b791b..3074a7eaa 100644 --- a/app/javascript/src/javascripts/common.js +++ b/app/javascript/src/javascripts/common.js @@ -23,7 +23,7 @@ function initSearch() { } $(function() { - $("#theme-switcher").change(function(e) { + $("#theme-switcher").change(function() { let theme = $(this).val(); LS.put("theme", theme); $("body").attr("data-th-main", theme); @@ -60,9 +60,9 @@ $(function() { method: "PUT", url: path, dataType: 'json' - }).done(data => { + }).done(() => { location.reload(); - }).fail(data => { + }).fail(() => { Utility.error("Failed to revert to specified version."); }) }); diff --git a/app/javascript/src/javascripts/favorites.js b/app/javascript/src/javascripts/favorites.js index 46dd60d61..62f4dacb5 100644 --- a/app/javascript/src/javascripts/favorites.js +++ b/app/javascript/src/javascripts/favorites.js @@ -42,7 +42,7 @@ Favorite.create = function (post_id) { Post.notice_update("dec"); Favorite.after_action(post_id, 1); Utility.notice("Favorite added"); - }).fail(function (data, status, xhr) { + }).fail(function (data) { Utility.error("Error: " + data.responseJSON.message); }); }); @@ -60,7 +60,7 @@ Favorite.destroy = function (post_id) { Post.notice_update("dec"); Favorite.after_action(post_id, -1); Utility.notice("Favorite removed"); - }).fail(function (data, status, xhr) { + }).fail(function (data) { Utility.error("Error: " + data.responseJSON.message); }); }); diff --git a/app/javascript/src/javascripts/forum_posts.js b/app/javascript/src/javascripts/forum_posts.js index 86d413d99..753de516a 100644 --- a/app/javascript/src/javascripts/forum_posts.js +++ b/app/javascript/src/javascripts/forum_posts.js @@ -84,11 +84,11 @@ ForumPost.vote_remove = function(evt) { type: "DELETE", dataType: "json", accept: "text/javascript", - }).done(function(data) { + }).done(function() { $(evt.target).parents(".own-forum-vote").remove(); $(`#forum-post-votes-for-${id} .forum-post-vote-block`).show(); Utility.notice("Vote removed."); - }).fail(function(data) { + }).fail(function() { Utility.error("Failed to unvote on forum post."); }) } @@ -136,10 +136,10 @@ ForumPost.hide = function (e) { url: `/forum_posts/${fpid}/hide.json`, type: 'POST', dataType: 'json' - }).done(function (data) { + }).done(function () { $(`.forum-post[data-forum-post-id="${fpid}"] div.author h4`).append(" (hidden)"); $(`.forum-post[data-forum-post-id="${fpid}"]`).attr('data-is-hidden', 'true'); - }).fail(function (data) { + }).fail(function () { Utility.error("Failed to hide post."); }); }; @@ -154,11 +154,11 @@ ForumPost.unhide = function (e) { url: `/forum_posts/${fpid}/unhide.json`, type: 'POST', dataType: 'json' - }).done(function (data) { + }).done(function () { const $author = $(`.forum-post[data-forum-post-id="${fpid}"] div.author h4`); $author.text($author.text().replace(" (hidden)", "")); $(`.forum-post[data-forum-post-id="${fpid}"]`).attr('data-is-hidden', 'false'); - }).fail(function (data) { + }).fail(function () { Utility.error("Failed to unhide post."); }); }; diff --git a/app/javascript/src/javascripts/local_storage.js b/app/javascript/src/javascripts/local_storage.js index 54063b585..45a9be018 100644 --- a/app/javascript/src/javascripts/local_storage.js +++ b/app/javascript/src/javascripts/local_storage.js @@ -13,6 +13,7 @@ let LS = { try { return JSON.parse(value); } catch (error) { + console.log(error); return null; } } diff --git a/app/javascript/src/javascripts/notes.js b/app/javascript/src/javascripts/notes.js index 3f915877a..dd55b6933 100644 --- a/app/javascript/src/javascripts/notes.js +++ b/app/javascript/src/javascripts/notes.js @@ -16,14 +16,14 @@ let Note = { $note_box.attr("data-id", String(id)); $note_box.draggable({ containment: $("#image"), - stop: function(e, ui) { + stop: function() { Note.Box.update_data_attributes($note_box); } }); $note_box.resizable({ containment: $("#image"), handles: "se, nw", - stop: function(e, ui) { + stop: function() { Note.Box.update_data_attributes($note_box); } }); @@ -406,11 +406,11 @@ let Note = { return hash; }, - error_handler: function(xhr, status, exception) { + error_handler: function(xhr) { Utility.error("Error: " + (xhr.responseJSON.reason || xhr.responseJSON.reasons.join("; "))); }, - success_handler: function(data, status, xhr) { + success_handler: function(data) { var $note_box = null; if (data.html_id) { // new note diff --git a/app/javascript/src/javascripts/post_mode_menu.js b/app/javascript/src/javascripts/post_mode_menu.js index 2b4212ca8..bebe83d42 100644 --- a/app/javascript/src/javascripts/post_mode_menu.js +++ b/app/javascript/src/javascripts/post_mode_menu.js @@ -54,7 +54,7 @@ PostModeMenu.initialize_selector = function() { $("#mode-box-mode").val(LS.get("mode")); } - $("#mode-box-mode").on("change.danbooru", function(e) { + $("#mode-box-mode").on("change.danbooru", function() { PostModeMenu.change(); $("#tag-script-field:visible").focus().select(); }); @@ -103,7 +103,7 @@ PostModeMenu.close_edit_form = function() { } PostModeMenu.initialize_tag_script_field = function() { - $("#tag-script-field").blur(function(e) { + $("#tag-script-field").blur(function() { const script = $(this).val(); const current_script_id = LS.get("current_tag_script_id"); diff --git a/app/javascript/src/javascripts/post_replacement.js b/app/javascript/src/javascripts/post_replacement.js index 1e5963c60..3ded0806e 100644 --- a/app/javascript/src/javascripts/post_replacement.js +++ b/app/javascript/src/javascripts/post_replacement.js @@ -34,7 +34,7 @@ PostReplacement.approve = function (id, penalize_current_uploader) { dataType: 'json' }).done(function () { set_status($row, "approved"); - }).fail(function (data, status, xhr) { + }).fail(function (data) { Utility.error(data.responseText); set_status($row, "replacement failed"); }); @@ -51,7 +51,7 @@ PostReplacement.reject = function (id) { dataType: 'json' }).done(function () { set_status($row, "rejected"); - }).fail(function (data, status, xhr) { + }).fail(function (data) { Utility.error(data.responseText); set_status($row, "rejecting failed"); }); @@ -69,7 +69,7 @@ PostReplacement.promote = function (id) { }).done(function (data) { Utility.notice(`Replacement promoted to post #${data.post.id}`); set_status($row, "promoted"); - }).fail(function (data, status, xhr) { + }).fail(function (data) { Utility.error(data.responseText); set_status($row, "promoting failed"); }); @@ -83,10 +83,10 @@ PostReplacement.toggle_penalize = function ($target) { type: "PUT", url: `/post_replacements/${id}/toggle_penalize.json`, dataType: 'json' - }).done(function (data) { + }).done(function () { $target.removeClass("disabled-link"); $currentStatus.text($currentStatus.text() == "yes" ? "no" : "yes"); - }).fail(function (data, status, xhr) { + }).fail(function (data) { Utility.error(data.responseText); }); } diff --git a/app/javascript/src/javascripts/post_sets.js b/app/javascript/src/javascripts/post_sets.js index ffad5b16a..59c733eb1 100644 --- a/app/javascript/src/javascripts/post_sets.js +++ b/app/javascript/src/javascripts/post_sets.js @@ -14,7 +14,7 @@ PostSet.add_post = function (set_id, post_id) { url: "/post_sets/" + set_id + "/add_posts.json", data: {post_ids: [post_id]}, }).fail(function (data) { - var message = $.map(data.responseJSON.errors, function(msg, attr) { return msg; }).join('; '); + var message = $.map(data.responseJSON.errors, function(msg) { return msg; }).join('; '); Post.notice_update("dec"); $(window).trigger('danbooru:error', "Error: " + message); }).done(function () { @@ -32,7 +32,7 @@ PostSet.remove_post = function (set_id, post_id) { url: "/post_sets/" + set_id + "/remove_posts.json", data: {post_ids: [post_id]}, }).fail(function (data) { - var message = $.map(data.responseJSON.errors, function(msg, attr) { return msg; }).join('; '); + var message = $.map(data.responseJSON.errors, function(msg) { return msg; }).join('; '); Post.notice_update("dec"); $(window).trigger('danbooru:error', "Error: " + message); }).done(function () { diff --git a/app/javascript/src/javascripts/post_versions.js b/app/javascript/src/javascripts/post_versions.js index 2ba134128..5f7a59850 100644 --- a/app/javascript/src/javascripts/post_versions.js +++ b/app/javascript/src/javascripts/post_versions.js @@ -22,11 +22,11 @@ PostVersion.initialize_undo = function () { $(event.target).find(".post-version-select:not(:disabled)").prop("checked", (_, checked) => !checked).change(); }); - $("#post-version-select-all").on("change.danbooru", function (event) { + $("#post-version-select-all").on("change.danbooru", function () { $(".post-version-select:not(:disabled)").prop("checked", $("#post-version-select-all").prop("checked")).change(); }); - $(".post-version-select").on("change.danbooru", function (event) { + $(".post-version-select").on("change.danbooru", function () { let checked = $(".post-version-select:checked"); $("#subnav-undo-selected-link").text(`Undo selected (${checked.length})`).toggle(checked.length > 0); }); diff --git a/app/javascript/src/javascripts/posts.js b/app/javascript/src/javascripts/posts.js index a69f2d937..431570c8d 100644 --- a/app/javascript/src/javascripts/posts.js +++ b/app/javascript/src/javascripts/posts.js @@ -106,7 +106,7 @@ Post.open_edit_dialog = function() { at: "right-20", of: window }, - drag: function(e, ui) { + drag: function() { if (Utility.meta("enable-auto-complete") === "true") { $tag_string.data("uiAutocomplete").close(); } @@ -118,7 +118,7 @@ Post.open_edit_dialog = function() { var pin_button = $("