From 384ebde2bee6aa9084c327b79617a3fbf9dbc1f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:05:44 +0000 Subject: [PATCH 1/2] Bump xo from 0.56.0 to 0.57.0 Bumps [xo](https://github.com/xojs/xo) from 0.56.0 to 0.57.0. - [Release notes](https://github.com/xojs/xo/releases) - [Commits](https://github.com/xojs/xo/compare/v0.56.0...v0.57.0) --- updated-dependencies: - dependency-name: xo dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 291 ++++++++++++++++++++++++--------------------------- 2 files changed, 138 insertions(+), 155 deletions(-) diff --git a/package.json b/package.json index cff908a4e1..8f55e91ada 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "webpack-cli": "^5.0.0", "webpack-dev-server": "^4.11.1", "workbox-webpack-plugin": "^7.0.0", - "xo": "^0.56.0", + "xo": "^0.57.0", "yarn-minify": "^1.0.1" }, "ava": { diff --git a/yarn.lock b/yarn.lock index 931c159af0..e8c2ffe096 100644 --- a/yarn.lock +++ b/yarn.lock @@ -229,7 +229,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== -"@babel/helper-validator-identifier@^7.22.20", "@babel/helper-validator-identifier@^7.22.5": +"@babel/helper-validator-identifier@^7.22.20": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== @@ -993,7 +993,7 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== -"@eslint/eslintrc@^2.1.0", "@eslint/eslintrc@^2.1.4": +"@eslint/eslintrc@^2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.4.tgz#388a269f0f25c1b6adc317b5a2c55714894c70ad" integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== @@ -1008,6 +1008,21 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.0.1.tgz#ee628808e945cd7782df05ce50eece525cb48e7a" + integrity sha512-xXm39r1RgOSmPCqlhn+E10KPJ7JKrpuBwsAVw/++5dS/Sa4GAi0smby0r0wfTN4gNpkk9iij2hssJMXHSmQ89w== + dependencies: + ajv "^6.12.4" + debug "^4.3.2" + espree "^10.0.1" + globals "^13.19.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@8.56.0": version "8.56.0" resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b" @@ -1643,7 +1658,7 @@ "@types/eslint" "*" "@types/estree" "*" -"@types/eslint@*", "@types/eslint@^8.0.0": +"@types/eslint@*", "@types/eslint@^8.44.6": version "8.56.2" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.56.2.tgz#1c72a9b794aa26a8b94ad26d5b9aa51c8a6384bb" integrity sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw== @@ -1837,7 +1852,7 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^6.0.0": +"@typescript-eslint/eslint-plugin@^6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== @@ -1854,7 +1869,7 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.0.0": +"@typescript-eslint/parser@^6.21.0": version "6.21.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== @@ -2247,6 +2262,13 @@ ansi-escapes@^4.2.1: dependencies: type-fest "^0.21.3" +ansi-escapes@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-6.2.0.tgz#8a13ce75286f417f1963487d86ba9f90dccf9947" + integrity sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw== + dependencies: + type-fest "^3.0.0" + ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/ansi-html-community/-/ansi-html-community-0.0.8.tgz#69fbc4d6ccbe383f9736934ae34c3f8290f1bf41" @@ -2375,7 +2397,7 @@ array-flatten@1.1.1: resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== -array-includes@^3.1.6, array-includes@^3.1.7: +array-includes@^3.1.7: version "3.1.7" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== @@ -2433,7 +2455,7 @@ array.prototype.findlastindex@^1.2.3: es-errors "^1.3.0" es-shim-unscopables "^1.0.2" -array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: +array.prototype.flat@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== @@ -2443,7 +2465,7 @@ array.prototype.flat@^1.3.1, array.prototype.flat@^1.3.2: es-abstract "^1.22.1" es-shim-unscopables "^1.0.0" -array.prototype.flatmap@^1.3.1, array.prototype.flatmap@^1.3.2: +array.prototype.flatmap@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== @@ -3087,11 +3109,6 @@ chunkd@^2.0.1: resolved "https://registry.yarnpkg.com/chunkd/-/chunkd-2.0.1.tgz#49cd1d7b06992dc4f7fccd962fe2a101ee7da920" integrity sha512-7d58XsFmOq0j6el67Ug9mHf9ELUXsQXYJBkyxhH/k+6Ke0qXRnv0kbemx+Twc6fRJ07C49lcbdgm9FL1Ei/6SQ== -ci-info@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" - integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== - ci-info@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2" @@ -3465,7 +3482,7 @@ core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== -cosmiconfig@^8.2.0: +cosmiconfig@^8.3.6: version "8.3.6" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== @@ -4175,22 +4192,15 @@ eslint-compat-utils@^0.1.2: resolved "https://registry.yarnpkg.com/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz#f45e3b5ced4c746c127cf724fb074cd4e730d653" integrity sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg== -eslint-config-prettier@^8.8.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== - -eslint-config-xo-typescript@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/eslint-config-xo-typescript/-/eslint-config-xo-typescript-1.0.1.tgz#90a91a4dc2135ea93ef3081ecf1945303ab2bc60" - integrity sha512-vPQssnRSUgBFOEfB/KY12CXwltwFSn4RSCfa+w7gjBC2PFQ7Yfgmyei+1XUZ3K+8LRGef2NMJUcxts7PldhDjg== +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== -eslint-config-xo@^0.43.1: - version "0.43.1" - resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.43.1.tgz#c2ac8993f6e429048c813f599265d1636a0bc060" - integrity sha512-azv1L2PysRA0NkZOgbndUpN+581L7wPqkgJOgxxw3hxwXAbJgD6Hqb/SjHRiACifXt/AvxCzE/jIKFAlI7XjvQ== - dependencies: - confusing-browser-globals "1.0.11" +eslint-config-xo-typescript@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-xo-typescript/-/eslint-config-xo-typescript-2.0.0.tgz#ab3dc0d17a877abec430676c8cf27709d0e13ced" + integrity sha512-Z6LxmerEsGzLH4niSgfD/ZfqnCkOWZmE1XPnbU9gyYRQbHFZUkjstvi2prvGF9ToXkTDBiBZWvAWwNw9F2lFHg== eslint-config-xo@^0.44.0: version "0.44.0" @@ -4199,21 +4209,21 @@ eslint-config-xo@^0.44.0: dependencies: confusing-browser-globals "1.0.11" -eslint-formatter-pretty@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-formatter-pretty/-/eslint-formatter-pretty-5.0.0.tgz#3fe2a64f7c9ab5ad3037886b2d773693e75821bc" - integrity sha512-Uick451FoL22/wXqyScX3inW8ZlD/GQO7eFXj3bqb6N/ZtuuF00/CwSNIKLbFCJPrX5V4EdQBSgJ/UVnmLRnug== +eslint-formatter-pretty@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/eslint-formatter-pretty/-/eslint-formatter-pretty-6.0.1.tgz#8a8205c10a5a8e1862fcc7fde5d252d01ab0807d" + integrity sha512-znAUcXmBthdIUmlnRkPSxz3zSJHFUhfHF/nJPcCMVKg/mOa4yUie2Olqg1Ghbi5JJRBZVU3rIgzWSObvIspxMA== dependencies: - "@types/eslint" "^8.0.0" - ansi-escapes "^4.2.1" - chalk "^4.1.0" + "@types/eslint" "^8.44.6" + ansi-escapes "^6.2.0" + chalk "^5.3.0" eslint-rule-docs "^1.1.235" - log-symbols "^4.0.0" - plur "^4.0.0" - string-width "^4.2.0" - supports-hyperlinks "^2.0.0" + log-symbols "^6.0.0" + plur "^5.1.0" + string-width "^7.0.0" + supports-hyperlinks "^3.0.0" -eslint-import-resolver-node@^0.3.7, eslint-import-resolver-node@^0.3.9: +eslint-import-resolver-node@^0.3.9: version "0.3.9" resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== @@ -4222,7 +4232,7 @@ eslint-import-resolver-node@^0.3.7, eslint-import-resolver-node@^0.3.9: is-core-module "^2.13.0" resolve "^1.22.4" -eslint-import-resolver-webpack@^0.13.2: +eslint-import-resolver-webpack@^0.13.8: version "0.13.8" resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.8.tgz#5f64d1d653eefa19cdfd0f0165c996b6be7012f9" integrity sha512-Y7WIaXWV+Q21Rz/PJgUxiW/FTBOWmU8NTLdz+nz9mMoiz5vAev/fOaQxwD7qRzTfE3HSm1qsxZ5uRd7eX+VEtA== @@ -4239,7 +4249,7 @@ eslint-import-resolver-webpack@^0.13.2: resolve "^2.0.0-next.5" semver "^5.7.2" -eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: +eslint-module-utils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== @@ -4308,28 +4318,7 @@ eslint-plugin-import@^2.29.1: semver "^6.3.1" tsconfig-paths "^3.15.0" -eslint-plugin-import@~2.27.5: - version "2.27.5" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" - integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== - dependencies: - array-includes "^3.1.6" - array.prototype.flat "^1.3.1" - array.prototype.flatmap "^1.3.1" - debug "^3.2.7" - doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.7" - eslint-module-utils "^2.7.4" - has "^1.0.3" - is-core-module "^2.11.0" - is-glob "^4.0.3" - minimatch "^3.1.2" - object.values "^1.1.6" - resolve "^1.22.1" - semver "^6.3.0" - tsconfig-paths "^3.14.1" - -eslint-plugin-n@^16.0.1: +eslint-plugin-n@^16.6.2: version "16.6.2" resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz#6a60a1a376870064c906742272074d5d0b412b0b" integrity sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ== @@ -4368,7 +4357,7 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-prettier@^5.0.0: +eslint-plugin-prettier@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== @@ -4381,28 +4370,7 @@ eslint-plugin-promise@^6.0.0: resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz#269a3e2772f62875661220631bd4dafcb4083816" integrity sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig== -eslint-plugin-unicorn@^48.0.0: - version "48.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz#a6573bc1687ae8db7121fdd8f92394b6549a6959" - integrity sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw== - dependencies: - "@babel/helper-validator-identifier" "^7.22.5" - "@eslint-community/eslint-utils" "^4.4.0" - ci-info "^3.8.0" - clean-regexp "^1.0.0" - esquery "^1.5.0" - indent-string "^4.0.0" - is-builtin-module "^3.2.1" - jsesc "^3.0.2" - lodash "^4.17.21" - pluralize "^8.0.0" - read-pkg-up "^7.0.1" - regexp-tree "^0.1.27" - regjsparser "^0.10.0" - semver "^7.5.4" - strip-indent "^3.0.0" - -eslint-plugin-unicorn@^51.0.1: +eslint-plugin-unicorn@^51.0.0, eslint-plugin-unicorn@^51.0.1: version "51.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz#3641c5e110324c3739d6cb98fc1b99ada39f477b" integrity sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw== @@ -4474,7 +4442,12 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 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@^8.45.0, eslint@^8.56.0: +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@^8.53.0, eslint@^8.56.0: version "8.56.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.56.0.tgz#4957ce8da409dc0809f99ab07a1b94832ab74b15" integrity sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ== @@ -4518,7 +4491,7 @@ eslint@^8.45.0, eslint@^8.56.0: strip-ansi "^6.0.1" text-table "^0.2.0" -esm-utils@^4.1.2: +esm-utils@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/esm-utils/-/esm-utils-4.2.1.tgz#f1e6ae9491801a7bd8ce55572f85c2ba5bf21769" integrity sha512-a7t8pDmZ5MeYfo2pM5EcqeU+BqKobUFKnWkM17JOhTlR88OSosLa9Ak4bgm+htoF15HRf7tfrXNR62UogmIODg== @@ -4526,6 +4499,15 @@ esm-utils@^4.1.2: import-meta-resolve "^4.0.0" url-or-path "^2.1.0" +espree@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.0.1.tgz#600e60404157412751ba4a6f3a2ee1a42433139f" + integrity sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww== + dependencies: + acorn "^8.11.3" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.0.0" + espree@^9.0.0, espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -4857,6 +4839,14 @@ find-cache-dir@^4.0.0: common-path-prefix "^3.0.0" pkg-dir "^7.0.0" +find-cache-dir@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-5.0.0.tgz#69d1a9b77bbe39aea078dbede99d277a170d3079" + integrity sha512-OuWNfjfP05JcpAP3JPgAKUhWefjMRfI5iAoSsvE24ANYWJaepAtlSgWECSVEuRgSXpyNEc9DJwG/TZpgcOqyig== + dependencies: + common-path-prefix "^3.0.0" + pkg-dir "^7.0.0" + find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -5209,7 +5199,7 @@ get-symbol-description@^1.0.0: es-errors "^1.3.0" get-intrinsic "^1.2.4" -get-tsconfig@^4.6.2, get-tsconfig@^4.7.0: +get-tsconfig@^4.7.0, get-tsconfig@^4.7.2: version "4.7.2" resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.2.tgz#0dcd6fb330391d46332f4c6c1bf89a6514c2ddce" integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A== @@ -5711,11 +5701,6 @@ has-unicode@^2.0.1: resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== -has@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.4.tgz#2eb2860e000011dae4f1406a86fe80e530fb2ec6" - integrity sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ== - hasown@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.1.tgz#26f48f039de2c0f8d3356c223fb8d50253519faa" @@ -6133,7 +6118,7 @@ ipaddr.js@^2.0.1: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.1.0.tgz#2119bc447ff8c257753b196fc5f1ce08a4cdf39f" integrity sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== -irregular-plurals@^3.2.0, irregular-plurals@^3.3.0: +irregular-plurals@^3.3.0: version "3.5.0" resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-3.5.0.tgz#0835e6639aa8425bdc8b0d33d0dc4e89d9c01d2b" integrity sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ== @@ -6193,7 +6178,7 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.11.0, is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.8.1: +is-core-module@^2.12.1, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.8.1: version "2.13.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== @@ -6426,6 +6411,11 @@ is-unicode-supported@^0.1.0: resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-unicode-supported@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + is-unicode-supported@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz#fdf32df9ae98ff6ab2cedc155a5a6e895701c451" @@ -6920,6 +6910,14 @@ log-symbols@^4.0.0, log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +log-symbols@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439" + integrity sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw== + dependencies: + chalk "^5.3.0" + is-unicode-supported "^1.3.0" + loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" @@ -7190,11 +7188,6 @@ memory-fs@^0.2.0: resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.2.0.tgz#f2bb25368bc121e391c2520de92969caee0a0290" integrity sha512-+y4mDxU4rvXXu5UDSGCGNiesFmwCHuefGMoPCO1WYucNYj7DsLqrFaa2fXVI0H+NNiPTwwzKwspn9yTZqUGqng== -meow@^12.0.1: - version "12.1.1" - resolved "https://registry.yarnpkg.com/meow/-/meow-12.1.1.tgz#e558dddbab12477b69b2e9a2728c327f191bace6" - integrity sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw== - meow@^13.1.0: version "13.2.0" resolved "https://registry.yarnpkg.com/meow/-/meow-13.2.0.tgz#6b7d63f913f984063b3cc261b6e8800c4cd3474f" @@ -7905,7 +7898,7 @@ object.pick@^1.2.0: dependencies: isobject "^3.0.1" -object.values@^1.1.6, object.values@^1.1.7: +object.values@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== @@ -7945,7 +7938,7 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open-editor@^4.0.0: +open-editor@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/open-editor/-/open-editor-4.1.1.tgz#0693436ceab09b9b1a43154ec97ff1954841d121" integrity sha512-SYtGeZ9Zkzj/naoZaEF9LzwDYEGwuqQ4Fx5E3xdVRN98LFJjvMhG/ElByFEOVOiXepGra/Wi1fA4i/E1fXSBsw== @@ -8419,13 +8412,6 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -plur@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/plur/-/plur-4.0.0.tgz#729aedb08f452645fe8c58ef115bf16b0a73ef84" - integrity sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg== - dependencies: - irregular-plurals "^3.2.0" - plur@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/plur/-/plur-5.1.0.tgz#bff58c9f557b9061d60d8ebf93959cf4b08594ae" @@ -8543,7 +8529,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.0.0: +prettier@^3.2.5: version "3.2.5" resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== @@ -9059,7 +9045,7 @@ resolve-pkg@^2.0.0: dependencies: resolve-from "^5.0.0" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4, resolve@^1.9.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.2, resolve@^1.22.4, resolve@^1.9.0: version "1.22.8" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -9278,12 +9264,12 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.1.0, semver@^6.3.0, semver@^6.3.1: +semver@^6.0.0, semver@^6.1.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4: +semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d" integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== @@ -10032,14 +10018,6 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" - integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - supports-hyperlinks@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz#c711352a5c89070779b4dad54c05a2f14b15c94b" @@ -10261,7 +10239,7 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.2.1.tgz#f716c7e027494629485b21c0df6180f4d08f5e8b" integrity sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA== -tsconfig-paths@^3.14.1, tsconfig-paths@^3.15.0: +tsconfig-paths@^3.15.0: version "3.15.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz#5299ec605e55b1abb23ec939ef15edaf483070d4" integrity sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg== @@ -10346,6 +10324,11 @@ type-fest@^2.0.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== +type-fest@^3.0.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-3.13.1.tgz#bb744c1f0678bea7543a2d1ec24e83e68e8c8706" + integrity sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -10398,7 +10381,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@^5.1.6: +typescript@^5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== @@ -11227,47 +11210,47 @@ xmlchars@^2.1.1: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== -xo@^0.56.0: - version "0.56.0" - resolved "https://registry.yarnpkg.com/xo/-/xo-0.56.0.tgz#85fbb215ea4115c9c74af7a4e20a88b6590f02cd" - integrity sha512-ohzSqgQ8POgZ3KNaEK/gxDovb6h3cglxv8+xi9Dn7gmRe8g4qotpOZpMs5ACJhvkJDmJOhiKbk6Uq6Mx1Di9DA== +xo@^0.57.0: + version "0.57.0" + resolved "https://registry.yarnpkg.com/xo/-/xo-0.57.0.tgz#c26e7cb3d9a790af9ad87e2b3431542b03e627dd" + integrity sha512-QTdiZMYtRZZlhlzJI7MVBsW43EYizm2KbXqvw6GRS1oYgHTF3Lq7Z2BK9sjrn+E/wqRVYOC99pOxXlaXuFr/2w== dependencies: - "@eslint/eslintrc" "^2.1.0" - "@typescript-eslint/eslint-plugin" "^6.0.0" - "@typescript-eslint/parser" "^6.0.0" + "@eslint/eslintrc" "^3.0.0" + "@typescript-eslint/eslint-plugin" "^6.21.0" + "@typescript-eslint/parser" "^6.21.0" arrify "^3.0.0" - cosmiconfig "^8.2.0" + cosmiconfig "^8.3.6" define-lazy-prop "^3.0.0" - eslint "^8.45.0" - eslint-config-prettier "^8.8.0" - eslint-config-xo "^0.43.1" - eslint-config-xo-typescript "^1.0.0" - eslint-formatter-pretty "^5.0.0" - eslint-import-resolver-webpack "^0.13.2" + eslint "^8.53.0" + eslint-config-prettier "^9.1.0" + eslint-config-xo "^0.44.0" + eslint-config-xo-typescript "^2.0.0" + eslint-formatter-pretty "^6.0.1" + eslint-import-resolver-webpack "^0.13.8" eslint-plugin-ava "^14.0.0" eslint-plugin-eslint-comments "^3.2.0" - eslint-plugin-import "~2.27.5" - eslint-plugin-n "^16.0.1" + eslint-plugin-import "^2.29.1" + eslint-plugin-n "^16.6.2" eslint-plugin-no-use-extend-native "^0.5.0" - eslint-plugin-prettier "^5.0.0" - eslint-plugin-unicorn "^48.0.0" - esm-utils "^4.1.2" - find-cache-dir "^4.0.0" - find-up "^6.3.0" + eslint-plugin-prettier "^5.1.3" + eslint-plugin-unicorn "^51.0.0" + esm-utils "^4.2.1" + find-cache-dir "^5.0.0" + find-up-simple "^1.0.0" get-stdin "^9.0.0" - get-tsconfig "^4.6.2" - globby "^13.2.2" + get-tsconfig "^4.7.2" + globby "^14.0.0" imurmurhash "^0.1.4" json-stable-stringify-without-jsonify "^1.0.1" lodash-es "^4.17.21" - meow "^12.0.1" + meow "^13.1.0" micromatch "^4.0.5" - open-editor "^4.0.0" - prettier "^3.0.0" - semver "^7.5.4" + open-editor "^4.1.1" + prettier "^3.2.5" + semver "^7.6.0" slash "^5.1.0" to-absolute-glob "^3.0.0" - typescript "^5.1.6" + typescript "^5.3.3" y18n@^5.0.5: version "5.0.8" From 6fc03738ee1f18b9df04565c5d748f604c6e5bf3 Mon Sep 17 00:00:00 2001 From: miigotu Date: Mon, 12 Feb 2024 15:34:05 -0500 Subject: [PATCH 2/2] refactor: fix eslint/xo errors in js and a memory leak in rootDirs.js Signed-off-by: miigotu --- sickchill/gui/slick/js/ajaxNotifications.js | 4 +- sickchill/gui/slick/js/browser.js | 98 +++++++------- sickchill/gui/slick/js/configProviders.js | 10 +- sickchill/gui/slick/js/core.js | 140 ++++++++++---------- sickchill/gui/slick/js/imageSelector.js | 24 ++-- sickchill/gui/slick/js/rootDirs.js | 51 ++++--- sickchill/gui/slick/views/displayShow.mako | 4 +- sickchill/oldbeard/network_timezones.py | 16 ++- 8 files changed, 179 insertions(+), 168 deletions(-) diff --git a/sickchill/gui/slick/js/ajaxNotifications.js b/sickchill/gui/slick/js/ajaxNotifications.js index c24213c748..cf2f69e27a 100644 --- a/sickchill/gui/slick/js/ajaxNotifications.js +++ b/sickchill/gui/slick/js/ajaxNotifications.js @@ -26,7 +26,9 @@ function displayPNotify(type, title, message, id) { hide: true, history: true, shadow: true, - stack: {dir1: 'up', dir2: 'left', firstpos1: 25, firstpos2: 25}, + stack: { + dir1: 'up', dir2: 'left', firstpos1: 25, firstpos2: 25, + }, styling: 'fontawesome', width: '340px', destroy: true, diff --git a/sickchill/gui/slick/js/browser.js b/sickchill/gui/slick/js/browser.js index ab2f0d82a0..09db03c38c 100644 --- a/sickchill/gui/slick/js/browser.js +++ b/sickchill/gui/slick/js/browser.js @@ -34,10 +34,10 @@ }, data => { fileBrowserDialog.empty(); const firstValue = data[0]; - let i = 0; let list = null; let link = null; - data = $.grep(data, () => i++ !== 0); + + const innerData = $.grep(data, (value, index) => index !== 0); const inputContainer = $('
'); $('').val(firstValue.currentPath).on('keypress', event_ => { @@ -52,7 +52,7 @@ const listContainer = $('
'); list = $('
    ').appendTo(listContainer.appendTo(fileBrowserDialog)); - $.each(data, (i, entry) => { + $.each(innerData, (i, entry) => { if (entry.isFile && fileTypes && (!entry.isAllowed || fileTypes.includes('images') && !entry.isImage)) { // eslint-disable-line no-mixed-operators return true; } @@ -70,13 +70,11 @@ } else if (entry.isFile) { link.prepend(''); } else { - link.prepend('') - .on('mouseenter', function () { - $('span', this).addClass('ui-icon-folder-open'); - }) - .on('mouseleave', function () { - $('span', this).removeClass('ui-icon-folder-open'); - }); + link.prepend('').on('mouseenter', function () { + $('span', this).addClass('ui-icon-folder-open'); + }).on('mouseleave', function () { + $('span', this).removeClass('ui-icon-folder-open'); + }); } link.appendTo(list); @@ -91,12 +89,12 @@ } $.fn.nFileBrowser = function (callback, options) { - options = $.extend({}, $.Browser.defaults, options); + const newOptions = $.extend({}, $.Browser.defaults, options); // Make a fileBrowserDialog object if one doesn't exist already if (fileBrowserDialog) { // The title may change, even if fileBrowserDialog already exists - fileBrowserDialog.dialog('option', 'title', options.title); + fileBrowserDialog.dialog('option', 'title', newOptions.title); } else { // Set up the jquery dialog fileBrowserDialog = $('').appendTo('body').dialog({ @@ -104,7 +102,7 @@ classes: { 'ui-dialog': 'ui-dialog-scrollable-by-child', }, - title: options.title, + title: newOptions.title, position: {my: 'center top', at: 'center top+60', of: window}, minWidth: Math.min($(document).width() - 80, 650), height: Math.min($(document).height() - 80, $(window).height() - 80), @@ -120,7 +118,7 @@ class: 'btn', click() { // Store the browsed path to the associated text field - callback(options.includeFiles ? currentBrowserPath : $(this).find('.fileBrowserField').val(), options); + callback(newOptions.includeFiles ? currentBrowserPath : $(this).find('.fileBrowserField').val(), newOptions); $(this).dialog('close'); }, }, { @@ -132,38 +130,38 @@ }]); // Set up the browser and launch the dialog - let initialDir = ''; - if (options.initialDir) { - initialDir = options.initialDir; + let initialDirectory = ''; + if (newOptions.initialDirectory) { + initialDirectory = newOptions.initialDirectory; } - browse(initialDir, options.url, options.includeFiles, options.fileTypes); + browse(initialDirectory, newOptions.url, newOptions.includeFiles, newOptions.fileTypes); fileBrowserDialog.dialog('open'); return false; }; $.fn.fileBrowser = function (options) { - options = $.extend({}, $.Browser.defaults, options); + const newOptions = $.extend({}, $.Browser.defaults, options); // Text field used for the result - options.field = $(this); + newOptions.field = $(this); - if (options.field.autocomplete && options.autocompleteURL) { + if (newOptions.field.autocomplete && newOptions.autocompleteURL) { let query = ''; - options.field.autocomplete({ + newOptions.field.autocomplete({ position: {my: 'top', at: 'bottom', collision: 'flipfit'}, source(request, response) { // Keep track of user submitted search term - query = $.ui.autocomplete.escapeRegex(request.term, options.includeFiles); + query = $.ui.autocomplete.escapeRegex(request.term, newOptions.includeFiles); $.ajax({ - url: options.autocompleteURL, + url: newOptions.autocompleteURL, data: request, dataType: 'json', success(data) { // Implement a startsWith filter for the results const matcher = new RegExp('^' + query, 'i'); - const a = $.grep(data, item => matcher.test(item)); - response(a); + const match = $.grep(data, item => matcher.test(item)); + response(match); }, }); }, @@ -173,53 +171,53 @@ }).data('ui-autocomplete')._renderItem = function (ul, item) { // Highlight the matched search term from the item -- note that this is global and will match anywhere let resultItem = item.label; - const x = new RegExp('(?![^&;]+;)(?!<[^<>]*)(' + query + ')(?![^<>]*>)(?![^&;]+;)', 'gi'); - resultItem = resultItem.replace(x, fullMatch => '' + fullMatch + ''); - return $('
  • ') - .data('ui-autocomplete-item', item) - .append('' + resultItem + '') - .appendTo(ul); + const matcher = new RegExp('(?![^&;]+;)(?!<[^<>]*)(' + query + ')(?![^<>]*>)(?![^&;]+;)', 'gi'); + resultItem = resultItem.replace(matcher, fullMatch => '' + fullMatch + ''); + return $('
  • ').data('ui-autocomplete-item', item).append('' + resultItem + '').appendTo(ul); }; } let path = false; let callback = false; - let ls = false; - // If the text field is empty and we're given a key then populate it with the last browsed value from localStorage + let hasLocalStorage = false; + // If the text field is empty, and we're given a key then populate it with the last browsed value from localStorage try { - ls = Boolean(localStorage.getItem); + hasLocalStorage = Boolean(localStorage.getItem); } catch {} - if (ls && options.key) { - path = localStorage['fileBrowser-' + options.key]; + if (hasLocalStorage && newOptions.key) { + path = localStorage['fileBrowser-' + newOptions.key]; } - if (options.key && options.field.val().length === 0 && path) { - options.field.val(path); + if (newOptions.key && newOptions.field.val().length === 0 && path) { + newOptions.field.val(path); } - callback = function (path, options) { - options.field.val(path); + callback = function (path, newOptions) { + newOptions.field.val(path); // Use a localStorage to remember for next time -- no ie6/7 - if (ls && options.key) { - localStorage['fileBrowser-' + options.key] = path; + if (hasLocalStorage && newOptions.key) { + localStorage['fileBrowser-' + newOptions.key] = path; } }; - options.field.addClass('fileBrowserField'); - if (options.showBrowseButton) { + newOptions.field.addClass('fileBrowserField'); + if (newOptions.showBrowseButton) { // Append the browse button and give it a click behaviour - options.field.after( + newOptions.field.after( $('').on('click', function () { - const initialDir = options.field.val() || (options.key && path) || ''; - const optionsWithInitialDir = $.extend({}, options, {initialDir}); - $(this).nFileBrowser(callback, optionsWithInitialDir); + let initialDirectory = newOptions.field.val(); + initialDirectory ||= (newOptions.key && path); + initialDirectory ||= ''; + + const optionsWithInitialDirectory = $.extend({}, newOptions, {initialDirectory}); + $(this).nFileBrowser(callback, optionsWithInitialDirectory); return false; }), ); } - return options.field; + return newOptions.field; }; })(jQuery); diff --git a/sickchill/gui/slick/js/configProviders.js b/sickchill/gui/slick/js/configProviders.js index be41731d86..dc3289601d 100644 --- a/sickchill/gui/slick/js/configProviders.js +++ b/sickchill/gui/slick/js/configProviders.js @@ -245,7 +245,7 @@ $(document).ready(function () { $.fn.makeNewznabProviderString = function () { const provStrings = []; for (const id in newznabProviders) { - if (Object.prototype.hasOwnProperty.call(newznabProviders, id)) { + if (Object.hasOwn(newznabProviders, id)) { provStrings.push(newznabProviders[id][1].join('|')); } } @@ -289,7 +289,7 @@ $(document).ready(function () { $.fn.makeTorrentRssProviderString = function () { const provStrings = []; for (const id in torrentRssProviders) { - if (Object.prototype.hasOwnProperty.call(torrentRssProviders, id)) { + if (Object.hasOwn(torrentRssProviders, id)) { provStrings.push(torrentRssProviders[id].join('|')); } } @@ -323,7 +323,7 @@ $(document).ready(function () { if (finalArray.length > 0) { $('