diff --git a/.xo-config.json b/.xo-config.json index 1fb1df70d2d..eb855984184 100644 --- a/.xo-config.json +++ b/.xo-config.json @@ -24,7 +24,7 @@ "@typescript-eslint/no-unsafe-member-access": "off", "@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/no-unsafe-call": "off", - "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/consistent-type-imports": "off", "@typescript-eslint/explicit-function-return-type": [ "error", { diff --git a/build/readme.loader.cts b/build/readme.loader.cts index 892fc9bbfff..e57ecde51c9 100644 --- a/build/readme.loader.cts +++ b/build/readme.loader.cts @@ -1,8 +1,10 @@ // Can't use modules because this is a bizarropackscript world -module.exports = async function ReadmeLoader () { - const {getImportedFeatures, getFeaturesMeta} = await import("./readme-parser.js"); +async function ReadmeLoader() { + const {getImportedFeatures, getFeaturesMeta} = await import('./readme-parser.js'); return ` export const importedFeatures = ${JSON.stringify(getImportedFeatures())}; export const featuresMeta = ${JSON.stringify(getFeaturesMeta())}; `; } + +module.exports = ReadmeLoader; diff --git a/package-lock.json b/package-lock.json index 011f329f2fd..85605592b36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "zip-text-nodes": "^1.0.0" }, "devDependencies": { - "@sindresorhus/tsconfig": "^2.0.0", + "@sindresorhus/tsconfig": "^3.0.1", "@types/codemirror": "^5.60.5", "@types/firefox-webext-browser": "^94.0.1", "@types/jsdom": "^20.0.0", @@ -62,7 +62,7 @@ "dot-json": "^1.2.2", "esbuild-loader": "^2.20.0", "eslint-config-xo-react": "^0.27.0", - "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", "highlight.js": "^11.6.0", "jsdom": "^20.0.0", @@ -76,11 +76,11 @@ "ts-node": "^10.9.1", "type-fest": "^2.19.0", "typed-query-selector": "^2.7.0", - "typescript": "^4.7.4", + "typescript": "^4.8.3", "vitest": "^0.23.1", "webpack": "^5.74.0", "webpack-cli": "^4.10.0", - "xo": "^0.50.0" + "xo": "^0.52.3" }, "engines": { "node": ">= 16", @@ -248,14 +248,14 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -265,12 +265,15 @@ }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", - "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -281,6 +284,29 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -403,12 +429,12 @@ } }, "node_modules/@sindresorhus/tsconfig": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/tsconfig/-/tsconfig-2.0.0.tgz", - "integrity": "sha512-1nsyWtFtPpVjEnNzp2rd03BVz84BYHeW7LNYvmcj3q4jAgJL2hl0XBp3WmDFFPjFLF3w+L0XEYqhjWUTU+TCzw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/tsconfig/-/tsconfig-3.0.1.tgz", + "integrity": "sha512-0/gtPNTY3++0J2BZM5nHHULg0BIMw886gqdn8vWN+Av6bgF5ZU2qIcHubAn+Z9KNvJhO8WFE+9kDOU3n6OcKtA==", "dev": true, "engines": { - "node": ">=12" + "node": ">=14" } }, "node_modules/@tootallnate/once": { @@ -815,9 +841,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1200,9 +1226,9 @@ } }, "node_modules/builtins": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-4.1.0.tgz", - "integrity": "sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, "dependencies": { "semver": "^7.0.0" @@ -2941,13 +2967,15 @@ } }, "node_modules/eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -2957,14 +2985,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -2979,8 +3010,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" @@ -3005,9 +3035,9 @@ } }, "node_modules/eslint-config-xo": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.41.0.tgz", - "integrity": "sha512-cyTc182COQVdalOi5105h0Cw/Qb52IRGyIZLmUICIauANm9Upmv81UEsuFkdKnvwr4NtU95qjdk3g4/kNspA6g==", + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.42.0.tgz", + "integrity": "sha512-HIfd+AM6tHFoaZ/NXYDV3Mr/CJrAj/DoP6IOYt1/v+90XtCwVYOfW7LXbRDYDmhQMzT16h7eqPRcex72waRqdA==", "dev": true, "dependencies": { "confusing-browser-globals": "1.0.11" @@ -3674,18 +3704,18 @@ } }, "node_modules/eslint-plugin-n": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.3.tgz", - "integrity": "sha512-H+KC7U5R+3IWTeRnACm/4wlqLvS1Q7M6t7BGhn89qXDkZan8HTAEv3ouIONA0ifDwc2YzPFmyPzHuNLddNK4jw==", + "version": "15.2.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.5.tgz", + "integrity": "sha512-8+BYsqiyZfpu6NXmdLOXVUfk8IocpCjpd8nMRRH0A9ulrcemhb2VI9RSJMEy5udx++A/YcVPD11zT8hpFq368g==", "dev": true, "dependencies": { "builtins": "^5.0.1", "eslint-plugin-es": "^4.1.0", "eslint-utils": "^3.0.0", "ignore": "^5.1.1", - "is-core-module": "^2.9.0", + "is-core-module": "^2.10.0", "minimatch": "^3.1.2", - "resolve": "^1.10.1", + "resolve": "^1.22.1", "semver": "^7.3.7" }, "engines": { @@ -3698,15 +3728,6 @@ "eslint": ">=7.0.0" } }, - "node_modules/eslint-plugin-n/node_modules/builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "dependencies": { - "semver": "^7.0.0" - } - }, "node_modules/eslint-plugin-n/node_modules/resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -3761,9 +3782,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.30.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz", - "integrity": "sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A==", + "version": "7.31.8", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.8.tgz", + "integrity": "sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw==", "dev": true, "dependencies": { "array-includes": "^3.1.5", @@ -3952,6 +3973,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -3986,6 +4016,22 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -3998,6 +4044,80 @@ "node": ">=10.13.0" } }, + "node_modules/eslint/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/eslint/node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4022,13 +4142,25 @@ "node": ">=8" } }, + "node_modules/eslint/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/esm-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esm-utils/-/esm-utils-4.0.0.tgz", - "integrity": "sha512-1x5H25/8BQWV94T8+KRb1gcSdVQ3g+8P0NikggAujVaurUa0cOoR+UO8ie3y29iQO70HjNA93c9ie+qqI/8zzw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/esm-utils/-/esm-utils-4.1.0.tgz", + "integrity": "sha512-/oTSIjfeNL/gzVgM7CbRL4bqE8aKU1ANJqr8voBwTXvVMjYYm15PdYG6c6zNSAHNa3s9b6UMRHDosIq26OBdWg==", "dev": true, "dependencies": { - "import-meta-resolve": "1.1.1", + "import-meta-resolve": "2.1.0", "url-or-path": "2.1.0" }, "funding": { @@ -4036,17 +4168,20 @@ } }, "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "dependencies": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -4645,6 +4780,12 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/gzip-size": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", @@ -4887,13 +5028,10 @@ } }, "node_modules/import-meta-resolve": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-1.1.1.tgz", - "integrity": "sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.1.0.tgz", + "integrity": "sha512-yG9pxkWJVTy4cmRsNWE3ztFdtFuYIV8G4N+cbCkO8b+qngkLyIUhxQFuZ0qJm67+0nUOxjMPT7nfksPKza1v2g==", "dev": true, - "dependencies": { - "builtins": "^4.0.0" - }, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" @@ -5066,9 +5204,9 @@ } }, "node_modules/is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -8835,9 +8973,9 @@ "integrity": "sha512-as41ht96B9wCJflTJtuNL8LueDlkhctp+p8Rn+WBkEZZ+Rakpycr7cQMbBsOND9iHY5/7pv6DVv/aojfQedDnQ==" }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -9601,9 +9739,9 @@ "dev": true }, "node_modules/xo": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.50.0.tgz", - "integrity": "sha512-yIz7mdIbUlxBYLnV3OqMTdrE+OFr0CPINkU9rxY3ZHNAIZrVckmONLujU6LkdNrEWerQTx8zzwnVrUjmj6vVCg==", + "version": "0.52.3", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.52.3.tgz", + "integrity": "sha512-liCEteZ5z+QRyh3XzsYWQyxedBHBvx8CDlNvvi+BJz74L0E5/ID2v7JtoX3bD541AlMuOy4e/iWif6hhNGBFNw==", "bundleDependencies": [ "@typescript-eslint/eslint-plugin", "@typescript-eslint/parser", @@ -9617,20 +9755,20 @@ "arrify": "^3.0.0", "cosmiconfig": "^7.0.1", "define-lazy-prop": "^3.0.0", - "eslint": "^8.17.0", + "eslint": "^8.22.0", "eslint-config-prettier": "^8.5.0", - "eslint-config-xo": "^0.41.0", + "eslint-config-xo": "^0.42.0", "eslint-config-xo-typescript": "*", "eslint-formatter-pretty": "^4.1.0", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-ava": "^13.2.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.2.2", + "eslint-plugin-n": "^15.2.5", "eslint-plugin-no-use-extend-native": "^0.5.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-unicorn": "^42.0.0", - "esm-utils": "^4.0.0", + "esm-utils": "^4.1.0", "find-cache-dir": "^3.3.2", "find-up": "^6.3.0", "get-stdin": "^9.0.0", @@ -9700,14 +9838,14 @@ "license": "MIT" }, "node_modules/xo/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/type-utils": "5.27.1", - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/scope-manager": "5.36.1", + "@typescript-eslint/type-utils": "5.36.1", + "@typescript-eslint/utils": "5.36.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -9733,14 +9871,14 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/parser": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.36.1", + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/typescript-estree": "5.36.1", "debug": "^4.3.4" }, "engines": { @@ -9760,13 +9898,13 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/scope-manager": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1" + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/visitor-keys": "5.36.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -9777,12 +9915,13 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/type-utils": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/typescript-estree": "5.36.1", + "@typescript-eslint/utils": "5.36.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -9803,7 +9942,7 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/types": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "MIT", @@ -9816,13 +9955,13 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1", + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/visitor-keys": "5.36.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -9872,15 +10011,15 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/utils": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.36.1", + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/typescript-estree": "5.36.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -9896,12 +10035,12 @@ } }, "node_modules/xo/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.27.1", + "version": "5.36.1", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/types": "5.36.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -10011,7 +10150,7 @@ } }, "node_modules/xo/node_modules/eslint-config-xo-typescript": { - "version": "0.51.1", + "version": "0.53.0", "dev": true, "inBundle": true, "license": "MIT", @@ -10022,7 +10161,8 @@ "url": "https://github.com/sponsors/sindresorhus" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": ">=5.22.0", + "@typescript-eslint/eslint-plugin": ">=5.31.0", + "@typescript-eslint/parser": ">=5.31.0", "eslint": ">=8.0.0", "typescript": ">=4.4" } @@ -10787,14 +10927,14 @@ "optional": true }, "@eslint/eslintrc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.0.tgz", - "integrity": "sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.1.tgz", + "integrity": "sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.3.2", + "espree": "^9.4.0", "globals": "^13.15.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -10804,9 +10944,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", - "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -10814,6 +10954,18 @@ "minimatch": "^3.0.4" } }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -10907,9 +11059,9 @@ "integrity": "sha512-Gkdb2ufaJjg+E2ThIo3MVIV8bqW4ytkSjr/aFE/4Cz1gUZidffhlqlbZGT1jURHB5V5wyMu3KMPz39BSJq/+CA==" }, "@sindresorhus/tsconfig": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/tsconfig/-/tsconfig-2.0.0.tgz", - "integrity": "sha512-1nsyWtFtPpVjEnNzp2rd03BVz84BYHeW7LNYvmcj3q4jAgJL2hl0XBp3WmDFFPjFLF3w+L0XEYqhjWUTU+TCzw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/tsconfig/-/tsconfig-3.0.1.tgz", + "integrity": "sha512-0/gtPNTY3++0J2BZM5nHHULg0BIMw886gqdn8vWN+Av6bgF5ZU2qIcHubAn+Z9KNvJhO8WFE+9kDOU3n6OcKtA==", "dev": true }, "@tootallnate/once": { @@ -11300,9 +11452,9 @@ "dev": true }, "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true }, "acorn-globals": { @@ -11578,9 +11730,9 @@ "dev": true }, "builtins": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-4.1.0.tgz", - "integrity": "sha512-1bPRZQtmKaO6h7qV1YHXNtr6nCK28k0Zo95KM4dXfILcZZwoHJBN1m3lfLv9LPkcOZlrSr+J1bzMaZFO98Yq0w==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", + "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", "dev": true, "requires": { "semver": "^7.0.0" @@ -12690,13 +12842,15 @@ } }, "eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", + "version": "8.23.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.23.0.tgz", + "integrity": "sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@eslint/eslintrc": "^1.3.1", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", + "@humanwhocodes/module-importer": "^1.0.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -12706,14 +12860,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.4.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -12728,8 +12885,7 @@ "regexpp": "^3.2.0", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { "ansi-regex": { @@ -12747,6 +12903,12 @@ "color-convert": "^2.0.1" } }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -12772,6 +12934,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, "glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -12781,6 +12953,53 @@ "is-glob": "^4.0.3" } }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -12798,6 +13017,12 @@ "requires": { "has-flag": "^4.0.0" } + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } }, @@ -12809,9 +13034,9 @@ "requires": {} }, "eslint-config-xo": { - "version": "0.41.0", - "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.41.0.tgz", - "integrity": "sha512-cyTc182COQVdalOi5105h0Cw/Qb52IRGyIZLmUICIauANm9Upmv81UEsuFkdKnvwr4NtU95qjdk3g4/kNspA6g==", + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo/-/eslint-config-xo-0.42.0.tgz", + "integrity": "sha512-HIfd+AM6tHFoaZ/NXYDV3Mr/CJrAj/DoP6IOYt1/v+90XtCwVYOfW7LXbRDYDmhQMzT16h7eqPRcex72waRqdA==", "dev": true, "requires": { "confusing-browser-globals": "1.0.11" @@ -13294,30 +13519,21 @@ } }, "eslint-plugin-n": { - "version": "15.2.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.3.tgz", - "integrity": "sha512-H+KC7U5R+3IWTeRnACm/4wlqLvS1Q7M6t7BGhn89qXDkZan8HTAEv3ouIONA0ifDwc2YzPFmyPzHuNLddNK4jw==", + "version": "15.2.5", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.5.tgz", + "integrity": "sha512-8+BYsqiyZfpu6NXmdLOXVUfk8IocpCjpd8nMRRH0A9ulrcemhb2VI9RSJMEy5udx++A/YcVPD11zT8hpFq368g==", "dev": true, "requires": { "builtins": "^5.0.1", "eslint-plugin-es": "^4.1.0", "eslint-utils": "^3.0.0", "ignore": "^5.1.1", - "is-core-module": "^2.9.0", + "is-core-module": "^2.10.0", "minimatch": "^3.1.2", - "resolve": "^1.10.1", + "resolve": "^1.22.1", "semver": "^7.3.7" }, "dependencies": { - "builtins": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz", - "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==", - "dev": true, - "requires": { - "semver": "^7.0.0" - } - }, "resolve": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", @@ -13353,9 +13569,9 @@ } }, "eslint-plugin-react": { - "version": "7.30.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz", - "integrity": "sha512-RgwH7hjW48BleKsYyHK5vUAvxtE9SMPDKmcPRQgtRCYaZA0XQPt5FSkrU3nhz5ifzMZcA8opwmRJ2cmOO8tr5A==", + "version": "7.31.8", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.31.8.tgz", + "integrity": "sha512-5lBTZmgQmARLLSYiwI71tiGVTLUuqXantZM6vlSY39OaDSV0M7+32K5DnLkmFrwTe+Ksz0ffuLUC91RUviVZfw==", "dev": true, "requires": { "array-includes": "^3.1.5", @@ -13477,22 +13693,22 @@ "dev": true }, "esm-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/esm-utils/-/esm-utils-4.0.0.tgz", - "integrity": "sha512-1x5H25/8BQWV94T8+KRb1gcSdVQ3g+8P0NikggAujVaurUa0cOoR+UO8ie3y29iQO70HjNA93c9ie+qqI/8zzw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/esm-utils/-/esm-utils-4.1.0.tgz", + "integrity": "sha512-/oTSIjfeNL/gzVgM7CbRL4bqE8aKU1ANJqr8voBwTXvVMjYYm15PdYG6c6zNSAHNa3s9b6UMRHDosIq26OBdWg==", "dev": true, "requires": { - "import-meta-resolve": "1.1.1", + "import-meta-resolve": "2.1.0", "url-or-path": "2.1.0" } }, "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.0.tgz", + "integrity": "sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==", "dev": true, "requires": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } @@ -13935,6 +14151,12 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "gzip-size": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", @@ -14103,13 +14325,10 @@ } }, "import-meta-resolve": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-1.1.1.tgz", - "integrity": "sha512-JiTuIvVyPaUg11eTrNDx5bgQ/yMKMZffc7YSjvQeSMXy58DO2SQ8BtAf3xteZvmzvjYh14wnqNjL8XVeDy2o9A==", - "dev": true, - "requires": { - "builtins": "^4.0.0" - } + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-2.1.0.tgz", + "integrity": "sha512-yG9pxkWJVTy4cmRsNWE3ztFdtFuYIV8G4N+cbCkO8b+qngkLyIUhxQFuZ0qJm67+0nUOxjMPT7nfksPKza1v2g==", + "dev": true }, "import-modules": { "version": "2.1.0", @@ -14233,9 +14452,9 @@ "dev": true }, "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.10.0.tgz", + "integrity": "sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==", "dev": true, "requires": { "has": "^1.0.3" @@ -16956,9 +17175,9 @@ "integrity": "sha512-as41ht96B9wCJflTJtuNL8LueDlkhctp+p8Rn+WBkEZZ+Rakpycr7cQMbBsOND9iHY5/7pv6DVv/aojfQedDnQ==" }, "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz", + "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig==", "dev": true }, "unbox-primitive": { @@ -17503,9 +17722,9 @@ "dev": true }, "xo": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/xo/-/xo-0.50.0.tgz", - "integrity": "sha512-yIz7mdIbUlxBYLnV3OqMTdrE+OFr0CPINkU9rxY3ZHNAIZrVckmONLujU6LkdNrEWerQTx8zzwnVrUjmj6vVCg==", + "version": "0.52.3", + "resolved": "https://registry.npmjs.org/xo/-/xo-0.52.3.tgz", + "integrity": "sha512-liCEteZ5z+QRyh3XzsYWQyxedBHBvx8CDlNvvi+BJz74L0E5/ID2v7JtoX3bD541AlMuOy4e/iWif6hhNGBFNw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -17514,20 +17733,20 @@ "arrify": "^3.0.0", "cosmiconfig": "^7.0.1", "define-lazy-prop": "^3.0.0", - "eslint": "^8.17.0", + "eslint": "^8.22.0", "eslint-config-prettier": "^8.5.0", - "eslint-config-xo": "^0.41.0", + "eslint-config-xo": "^0.42.0", "eslint-config-xo-typescript": "*", "eslint-formatter-pretty": "^4.1.0", "eslint-import-resolver-webpack": "^0.13.2", "eslint-plugin-ava": "^13.2.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-n": "^15.2.2", + "eslint-plugin-n": "^15.2.5", "eslint-plugin-no-use-extend-native": "^0.5.0", "eslint-plugin-prettier": "^4.0.0", "eslint-plugin-unicorn": "^42.0.0", - "esm-utils": "^4.0.0", + "esm-utils": "^4.1.0", "find-cache-dir": "^3.3.2", "find-up": "^6.3.0", "get-stdin": "^9.0.0", @@ -17575,13 +17794,13 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/type-utils": "5.27.1", - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/scope-manager": "5.36.1", + "@typescript-eslint/type-utils": "5.36.1", + "@typescript-eslint/utils": "5.36.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -17591,47 +17810,48 @@ } }, "@typescript-eslint/parser": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.36.1", + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/typescript-estree": "5.36.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1" + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/visitor-keys": "5.36.1" } }, "@typescript-eslint/type-utils": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { - "@typescript-eslint/utils": "5.27.1", + "@typescript-eslint/typescript-estree": "5.36.1", + "@typescript-eslint/utils": "5.36.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/visitor-keys": "5.27.1", + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/visitor-keys": "5.36.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -17660,24 +17880,24 @@ } }, "@typescript-eslint/utils": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.27.1", - "@typescript-eslint/types": "5.27.1", - "@typescript-eslint/typescript-estree": "5.27.1", + "@typescript-eslint/scope-manager": "5.36.1", + "@typescript-eslint/types": "5.36.1", + "@typescript-eslint/typescript-estree": "5.36.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.27.1", + "version": "5.36.1", "bundled": true, "dev": true, "requires": { - "@typescript-eslint/types": "5.27.1", + "@typescript-eslint/types": "5.36.1", "eslint-visitor-keys": "^3.3.0" } }, @@ -17742,7 +17962,7 @@ } }, "eslint-config-xo-typescript": { - "version": "0.51.1", + "version": "0.53.0", "bundled": true, "dev": true, "requires": {} diff --git a/package.json b/package.json index 5f5b28cf637..d9a4c39e946 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "zip-text-nodes": "^1.0.0" }, "devDependencies": { - "@sindresorhus/tsconfig": "^2.0.0", + "@sindresorhus/tsconfig": "^3.0.1", "@types/codemirror": "^5.60.5", "@types/firefox-webext-browser": "^94.0.1", "@types/jsdom": "^20.0.0", @@ -99,7 +99,7 @@ "dot-json": "^1.2.2", "esbuild-loader": "^2.20.0", "eslint-config-xo-react": "^0.27.0", - "eslint-plugin-react": "^7.30.0", + "eslint-plugin-react": "^7.31.8", "eslint-plugin-react-hooks": "^4.6.0", "highlight.js": "^11.6.0", "jsdom": "^20.0.0", @@ -113,11 +113,11 @@ "ts-node": "^10.9.1", "type-fest": "^2.19.0", "typed-query-selector": "^2.7.0", - "typescript": "^4.7.4", + "typescript": "^4.8.3", "vitest": "^0.23.1", "webpack": "^5.74.0", "webpack-cli": "^4.10.0", - "xo": "^0.50.0" + "xo": "^0.52.3" }, "engines": { "node": ">= 16", diff --git a/source/features/conflict-marker.tsx b/source/features/conflict-marker.tsx index c2fd2e2bd90..eb3472e2113 100644 --- a/source/features/conflict-marker.tsx +++ b/source/features/conflict-marker.tsx @@ -8,13 +8,13 @@ import * as pageDetect from 'github-url-detection'; import features from '.'; import * as api from '../github-helpers/api'; -interface PRConfig { +type PRConfig = { number: string; user: string; repo: string; link: HTMLAnchorElement; key: string; -} +}; function createQueryFragment(pr: PRConfig): string { return ` diff --git a/source/features/highlight-non-default-base-branch.tsx b/source/features/highlight-non-default-base-branch.tsx index d9801df0ca1..003a0fadda5 100644 --- a/source/features/highlight-non-default-base-branch.tsx +++ b/source/features/highlight-non-default-base-branch.tsx @@ -8,10 +8,10 @@ import * as api from '../github-helpers/api'; import {buildRepoURL} from '../github-helpers'; import getDefaultBranch from '../github-helpers/get-default-branch'; -interface BranchInfo { +type BranchInfo = { baseRef: string; baseRefName: string; -} +}; function isClosed(prLink: HTMLElement): boolean { return Boolean(prLink.closest('.js-issue-row')!.querySelector('.octicon.merged, .octicon.closed')); diff --git a/source/features/index.tsx b/source/features/index.tsx index 95b67ac827a..ce74ec4bc24 100644 --- a/source/features/index.tsx +++ b/source/features/index.tsx @@ -28,7 +28,7 @@ export type CallerFunction = (callback: VoidFunction, signal: AbortSignal) => vo type FeatureInitResult = void | false | Deinit; type FeatureInit = (signal: AbortSignal) => Promisable; -interface FeatureLoader extends Partial { +type FeatureLoader = { /** This only adds the shortcut to the help screen, it doesn't enable it. @default {} */ shortcuts?: Record; @@ -44,9 +44,9 @@ interface FeatureLoader extends Partial { onlyAdditionalListeners?: true; init: FeatureInit; // Repeated here because this interface is Partial<> -} +} & Partial; -interface InternalRunConfig { +type InternalRunConfig = { asLongAs: BooleanFunction[] | undefined; include: BooleanFunction[] | undefined; exclude: BooleanFunction[] | undefined; @@ -54,7 +54,7 @@ interface InternalRunConfig { additionalListeners: CallerFunction[]; onlyAdditionalListeners: boolean; -} +}; const {version} = browser.runtime.getManifest(); @@ -98,7 +98,7 @@ const log = { }; // eslint-disable-next-line no-async-promise-executor -- Rule assumes we don't want to leave it pending -const globalReady: Promise = new Promise(async resolve => { +const globalReady = new Promise(async resolve => { const [options, localHotfixes, styleHotfix, bisectedFeatures] = await Promise.all([ optionsStorage.getAll(), getLocalHotfixesAsOptions(), @@ -228,7 +228,7 @@ function enforceDefaults( const getFeatureID = (url: string): FeatureID => url.split('/').pop()!.split('.')[0] as FeatureID; -interface FeatureHelper { +type FeatureHelper = { /** If `import.meta.url` is passed as URL, this will be the feature ID */ id: string; @@ -237,7 +237,7 @@ interface FeatureHelper { /** A class selector that can be used with querySelector */ selector: string; -} +}; const getIdentifiers = (url: string): FeatureHelper => { const id = getFeatureID(url); diff --git a/source/features/latest-tag-button.tsx b/source/features/latest-tag-button.tsx index c8f612f54ad..7408cf24dd3 100644 --- a/source/features/latest-tag-button.tsx +++ b/source/features/latest-tag-button.tsx @@ -13,12 +13,12 @@ import getDefaultBranch from '../github-helpers/get-default-branch'; import addAfterBranchSelector from '../helpers/add-after-branch-selector'; import {buildRepoURL, getCurrentCommittish, getLatestVersionTag, getRepo} from '../github-helpers'; -interface RepoPublishState { +type RepoPublishState = { latestTag: string | false; aheadBy: number; -} +}; -interface Tags { +type Tags = { name: string; tag: { oid: string; @@ -26,7 +26,7 @@ interface Tags { oid: string; }; }; -} +}; const undeterminableAheadBy = Number.MAX_SAFE_INTEGER; // For when the branch is ahead by more than 20 commits #5505 diff --git a/source/features/link-to-changelog-file.tsx b/source/features/link-to-changelog-file.tsx index 1cc82bb8385..26eccda0ea1 100644 --- a/source/features/link-to-changelog-file.tsx +++ b/source/features/link-to-changelog-file.tsx @@ -10,10 +10,10 @@ import * as api from '../github-helpers/api'; import {wrapAll} from '../helpers/dom-utils'; import {buildRepoURL, getRepo} from '../github-helpers'; -interface FileType { +type FileType = { name: string; type: string; -} +}; const getCacheKey = (): string => `changelog:${getRepo()!.nameWithOwner}`; diff --git a/source/features/pinned-issues-update-time.tsx b/source/features/pinned-issues-update-time.tsx index 5588ea7745c..c290d012695 100644 --- a/source/features/pinned-issues-update-time.tsx +++ b/source/features/pinned-issues-update-time.tsx @@ -8,9 +8,9 @@ import * as api from '../github-helpers/api'; import {getRepo} from '../github-helpers'; import looseParseInt from '../helpers/loose-parse-int'; -interface IssueInfo { +type IssueInfo = { updatedAt: string; -} +}; const getLastUpdated = cache.function(async (issueNumbers: number[]): Promise> => { const {repository} = await api.v4(` diff --git a/source/features/reactions-avatars.tsx b/source/features/reactions-avatars.tsx index 99c92674ef3..a9dcae3e10a 100644 --- a/source/features/reactions-avatars.tsx +++ b/source/features/reactions-avatars.tsx @@ -14,11 +14,11 @@ const arbitraryAvatarLimit = 36; const approximateHeaderLength = 3; // Each button header takes about as much as 3 avatars const avatarSize = 16; -interface Participant { +type Participant = { button: HTMLButtonElement; username: string; imageUrl: string; -} +}; function getParticipants(button: HTMLButtonElement): Participant[] { // The list of people who commented is in an adjacent `` element #5698 diff --git a/source/features/release-download-count.tsx b/source/features/release-download-count.tsx index be77a89688e..5148b7fb78c 100644 --- a/source/features/release-download-count.tsx +++ b/source/features/release-download-count.tsx @@ -8,16 +8,16 @@ import {abbreviateNumber} from 'js-abbreviation-number'; import features from '.'; import * as api from '../github-helpers/api'; -interface Release { +type Release = { releaseAssets: { nodes: Asset[]; }; -} +}; -interface Asset { +type Asset = { name: string; downloadCount: number; -} +}; type Tag = Record; async function getAssetsForTag(tags: string[]): Promise { diff --git a/source/features/repo-age.tsx b/source/features/repo-age.tsx index 1089d9fc827..8bf6c6f968e 100644 --- a/source/features/repo-age.tsx +++ b/source/features/repo-age.tsx @@ -9,14 +9,14 @@ import features from '.'; import * as api from '../github-helpers/api'; import {getRepo} from '../github-helpers'; -interface CommitTarget { +type CommitTarget = { oid: string; committedDate: string; resourcePath: string; history: { totalCount: number; }; -} +}; const fresh = [ 'Freshly baked', diff --git a/source/features/scheduled-and-manual-workflow-indicators.tsx b/source/features/scheduled-and-manual-workflow-indicators.tsx index 75ed286d0eb..35c4d9b761f 100644 --- a/source/features/scheduled-and-manual-workflow-indicators.tsx +++ b/source/features/scheduled-and-manual-workflow-indicators.tsx @@ -10,10 +10,10 @@ import features from '.'; import * as api from '../github-helpers/api'; import {getRepo} from '../github-helpers'; -interface WorkflowDetails { +type WorkflowDetails = { schedule?: string; manuallyDispatchable: boolean; -} +}; const getWorkflowsDetails = cache.function(async (): Promise | false> => { const {repository: {workflowFiles}} = await api.v4(` diff --git a/source/features/show-associated-branch-prs-on-fork.tsx b/source/features/show-associated-branch-prs-on-fork.tsx index 5d4c647f654..50bd6aa9579 100644 --- a/source/features/show-associated-branch-prs-on-fork.tsx +++ b/source/features/show-associated-branch-prs-on-fork.tsx @@ -8,7 +8,7 @@ import features from '.'; import * as api from '../github-helpers/api'; import {getRepo, upperCaseFirst} from '../github-helpers'; -interface PullRequest { +type PullRequest = { timelineItems: { nodes: AnyObject; }; @@ -16,7 +16,7 @@ interface PullRequest { state: keyof typeof stateIcon; isDraft: boolean; url: string; -} +}; export const getPullRequestsAssociatedWithBranch = cache.function(async (): Promise> => { const {repository} = await api.v4(` diff --git a/source/features/tag-changes-link.tsx b/source/features/tag-changes-link.tsx index dd369161b63..83aaf0955ce 100644 --- a/source/features/tag-changes-link.tsx +++ b/source/features/tag-changes-link.tsx @@ -10,13 +10,13 @@ import features from '.'; import fetchDom from '../helpers/fetch-dom'; import {buildRepoURL, getRepo, parseTag} from '../github-helpers'; -interface TagDetails { +type TagDetails = { element: HTMLElement; commit: string; tag: string; version: string; namespace: string; -} +}; async function getNextPage(): Promise { const nextPageLink = select('.pagination a:last-child'); diff --git a/source/features/tags-on-commits-list.tsx b/source/features/tags-on-commits-list.tsx index 2385adc5801..e35c591300d 100644 --- a/source/features/tags-on-commits-list.tsx +++ b/source/features/tags-on-commits-list.tsx @@ -12,9 +12,9 @@ import {buildRepoURL, getRepo} from '../github-helpers'; type CommitTags = Record; -interface BaseTarget { +type BaseTarget = { commitResourcePath: string; -} +}; type TagTarget = { tagger: { @@ -27,10 +27,10 @@ type CommitTarget = { } & BaseTarget; type CommonTarget = TagTarget | CommitTarget; -interface TagNode { +type TagNode = { name: string; target: CommonTarget; -} +}; function mergeTags(oldTags: CommitTags, newTags: CommitTags): CommitTags { const result: CommitTags = {...oldTags}; diff --git a/source/features/useful-not-found-page.tsx b/source/features/useful-not-found-page.tsx index c2cf0353653..bae9b381ce1 100644 --- a/source/features/useful-not-found-page.tsx +++ b/source/features/useful-not-found-page.tsx @@ -10,21 +10,21 @@ import GitHubURL from '../github-helpers/github-url'; import getDefaultBranch from '../github-helpers/get-default-branch'; import {getCleanPathname} from '../github-helpers'; -interface File { +type File = { previous_filename?: string; filename: string; status: string; blob_url: string; -} +}; -interface FileChanges { +type FileChanges = { file: File; commit: { parentSha: string; date: Date; url: string; }; -} +}; function getType(): string { return location.pathname.split('/').pop()!.includes('.') ? 'file' : 'object'; diff --git a/source/features/user-local-time.tsx b/source/features/user-local-time.tsx index ab085915bb1..6a11c7dbdaa 100644 --- a/source/features/user-local-time.tsx +++ b/source/features/user-local-time.tsx @@ -14,10 +14,10 @@ import features from '.'; import * as api from '../github-helpers/api'; import {getUsername, getCleanPathname} from '../github-helpers'; -interface Commit { +type Commit = { url: string; sha: string; -} +}; async function loadCommitPatch(commitUrl: string): Promise { const {textContent} = await api.v3(commitUrl, { diff --git a/source/github-helpers/api.ts b/source/github-helpers/api.ts index 4bc0e249dad..69cce30ca91 100644 --- a/source/github-helpers/api.ts +++ b/source/github-helpers/api.ts @@ -33,21 +33,21 @@ import features from '../features'; import {getRepo} from '.'; import optionsStorage from '../options-storage'; -interface JsonError { +type JsonError = { message: string; -} +}; -interface GraphQLResponse { +type GraphQLResponse = { message?: string; data?: JsonObject; errors?: JsonError[]; -} +}; -interface RestResponse extends AnyObject { +type RestResponse = { httpStatus: number; headers: Headers; ok: boolean; -} +} & AnyObject; export const escapeKey = (...keys: Array): string => '_' + String(keys).replace(/[^a-z\d]/gi, '_'); @@ -84,17 +84,17 @@ const api4 = pageDetect.isEnterprise() ? `${location.origin}/api/graphql` : 'https://api.github.com/graphql'; -interface GHRestApiOptions { +type GHRestApiOptions = { ignoreHTTPStatus?: boolean; method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; body?: JsonObject; headers?: HeadersInit; json?: boolean; -} +}; -interface GHGraphQLApiOptions { +type GHGraphQLApiOptions = { allowErrors?: boolean; -} +}; const v3defaults: GHRestApiOptions = { ignoreHTTPStatus: false, diff --git a/source/github-helpers/banner.tsx b/source/github-helpers/banner.tsx index 1e61d1801ea..fdb6aa70327 100644 --- a/source/github-helpers/banner.tsx +++ b/source/github-helpers/banner.tsx @@ -1,11 +1,11 @@ import React from 'dom-chef'; -interface BannerProps { +type BannerProps = { text: Array | string | JSX.Element; url?: string; buttonLabel: JSX.Element | string; classes?: string[]; -} +}; // This could be a `` element but dom-chef doesn't pass props // https://github.com/vadimdemedes/dom-chef/issues/77 diff --git a/source/github-helpers/get-pr-info.ts b/source/github-helpers/get-pr-info.ts index 17bf2377b95..06c171b70c2 100644 --- a/source/github-helpers/get-pr-info.ts +++ b/source/github-helpers/get-pr-info.ts @@ -1,14 +1,14 @@ import * as api from './api'; import {getConversationNumber} from '.'; -interface PullRequestInfo { +type PullRequestInfo = { // TODO: Probably can be used for #3863 and #4679 baseRefOid: string; // https://docs.github.com/en/graphql/reference/enums#mergeablestate mergeable: 'CONFLICTING' | 'MERGEABLE' | 'UNKNOWN'; viewerCanEditFiles: boolean; -} +}; export default async function getPrInfo(number = getConversationNumber()!): Promise { const {repository} = await api.v4(` diff --git a/source/github-widgets/notice-bar.tsx b/source/github-widgets/notice-bar.tsx index 1522e3d089c..0d0ba235b08 100644 --- a/source/github-widgets/notice-bar.tsx +++ b/source/github-widgets/notice-bar.tsx @@ -2,10 +2,10 @@ import React from 'dom-chef'; import select from 'select-dom'; import {XIcon} from '@primer/octicons-react'; -interface Options { +type Options = { action?: Element | false; type?: 'success' | 'notice' | 'warn' | 'error'; -} +}; /** https://primer.style/css/components/alerts */ export default function addNotice( diff --git a/source/globals.d.ts b/source/globals.d.ts index c52b1b461e8..208d407f1e0 100644 --- a/source/globals.d.ts +++ b/source/globals.d.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions -- Declaration merging necessary */ /* eslint-disable @typescript-eslint/consistent-indexed-object-style */ type AnyObject = Record; diff --git a/source/helpers/types.d.ts b/source/helpers/types.d.ts index c2476421227..7a871f00508 100644 --- a/source/helpers/types.d.ts +++ b/source/helpers/types.d.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions -- Declaration merging necessary */ /* eslint-disable @typescript-eslint/ban-types -- The API does return `null`, not `undefined` */ import type {ParseSelector} from 'typed-query-selector/parser'; diff --git a/source/options.tsx b/source/options.tsx index 99eaee022f3..8fcc087484a 100644 --- a/source/options.tsx +++ b/source/options.tsx @@ -17,11 +17,11 @@ import {createRghIssueLink} from './helpers/rgh-issue-link'; import {importedFeatures, featuresMeta} from '../readme.md'; import {perDomainOptions, renamedFeatures} from './options-storage'; -interface Status { +type Status = { error?: true; text?: string; scopes?: string[]; -} +}; function reportStatus({error, text, scopes}: Status): void { const tokenStatus = select('#validation')!; diff --git a/source/resolve-conflicts.ts b/source/resolve-conflicts.ts index 9f1e802313c..74d63eb6ced 100644 --- a/source/resolve-conflicts.ts +++ b/source/resolve-conflicts.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions -- Declaration merging necessary */ /* eslint-disable unicorn/better-regex -- Go home you're drunk */ import regexJoin from 'regex-join'; diff --git a/tsconfig.json b/tsconfig.json index eb98f6fcf72..d008ae8d262 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,11 +2,9 @@ "extends": "@sindresorhus/tsconfig", "compilerOptions": { "target": "es2021", - "lib": [ - "ES2021", - "DOM", - "DOM.Iterable" - ], + "module": "es2022", + "moduleResolution": "Node", + "moduleDetection": "legacy", // TODO: Drop After dropping Webpack "declaration": false, "esModuleInterop": true, "noUncheckedIndexedAccess": false,