From e5274d95fa59a707f7c413c33bed696630afbd28 Mon Sep 17 00:00:00 2001 From: Federico Brigante Date: Mon, 17 Jan 2022 00:21:09 +0800 Subject: [PATCH] Move lint config to shared package (#2387) --- .eslintrc.js | 94 +--- package-lock.json | 516 +++++++----------- package.json | 3 +- src/__mocks__/svgAsComponentMock.js | 1 + src/background/__mocks__/protocol.ts | 8 +- src/background/axiosFetch.ts | 1 + src/blocks/readers/jquery.ts | 1 - src/blocks/types.ts | 1 - .../documentBuilder/documentTree.test.tsx | 2 +- .../fields/schemaFields/SchemaField.test.tsx | 12 +- .../logViewer/LogToolbar.stories.tsx | 1 - src/contrib/uipath/UiPathRobot.ts | 1 - src/devTools/editor/hooks/useEditable.ts | 5 +- .../tabs/effect/v1/BlockConfiguration.tsx | 2 +- .../tabs/effect/v3/BlockConfiguration.tsx | 2 +- src/hooks/useBlockOptions.ts | 2 +- src/importAssets.d.ts | 1 + src/nativeEditor/infer.ts | 4 +- src/registry/internal.ts | 7 +- 19 files changed, 227 insertions(+), 437 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index baf3e8cdc4..81bcaf4de1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,25 +1,3 @@ -const contexts = [ - "background", - "contentScript", - "devTools", - "options", - "actionPanel", - "pageScript", -]; - -const restrictedZones = []; -for (const exporter of contexts) { - for (const importer of contexts) { - if (exporter !== importer) { - restrictedZones.push({ - target: `./src/${importer}/**/*`, - from: `./src/${exporter}`, - except: [`../${exporter}/messenger/api.ts`], - }); - } - } -} - module.exports = { root: true, extends: [ @@ -27,65 +5,18 @@ module.exports = { "pixiebrix", ], rules: { - "import/dynamic-import-chunkname": [ - "error", - { - webpackChunknameFormat: "[a-zA-Z0-57-9-/_\\[\\].]+", - }, - ], - "unicorn/prevent-abbreviations": [ - "error", - { - replacements: { - acc: false, - arg: false, - args: false, - db: false, - dev: false, - doc: false, - docs: false, - env: false, - err: false, - ev: false, - evt: false, - ext: false, - exts: false, - fn: false, - func: { - fn: true, - function: false, - }, - i: false, - j: false, - num: false, - obj: false, - param: false, - params: false, - prev: false, - prod: false, - prop: false, - props: false, - ref: false, - refs: false, - str: false, - var: false, - vars: false, - }, - ignore: ["semVer", "SemVer"], - }, - ], - "import/no-restricted-paths": [ - "warn", - { - zones: restrictedZones, - }, - ], - // Incorrectly suggests to use `runtime.sendMessage` instead of `browser.runtime.sendMessage` "import/no-named-as-default-member": "off", - // Sometimes it conflicts with Prettier - "unicorn/no-nested-ternary": "off", + // TODO: The rule is currently broken, it should accept `throw unknown` but doesn't + "@typescript-eslint/no-throw-literal": "off", + + // TODO: Import extended config from app, after improving it + "@typescript-eslint/naming-convention": "off", + + // The rule is unreasonably slow (90 sec lint -> 5 minutes) + // https://github.com/pixiebrix/pixiebrix-extension/issues/1080 + "import/no-cycle": "off", // Rules that depend on https://github.com/pixiebrix/pixiebrix-extension/issues/775 "@typescript-eslint/no-explicit-any": "warn", @@ -94,11 +25,8 @@ module.exports = { // Rules to fix and enforce over time "no-await-in-loop": "warn", - - "unicorn/no-useless-undefined": "warn", // Buggy with React "unicorn/consistent-function-scoping": "warn", // Complains about some of the lifted functions "unicorn/no-await-expression-member": "warn", // Annoying sometimes, let's try it - "@typescript-eslint/consistent-type-assertions": "warn", }, ignorePatterns: [ @@ -132,6 +60,10 @@ module.exports = { jest: true, }, extends: ["pixiebrix/server"], + rules: { + // TODO: Import extended config from app, after improving it + "@typescript-eslint/naming-convention": "off", + }, }, ], }; diff --git a/package-lock.json b/package-lock.json index 2c81f6d219..511a6a113f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -105,6 +105,7 @@ "redux-logger": "^3.0.6", "redux-persist": "^6.0.0", "redux-persist-webextension-storage": "^1.0.2", + "regenerator-runtime": "^0.13.9", "reselect": "^4.0.0", "rollbar": "^2.24.0", "schema-to-yup": "1.10.0", @@ -205,7 +206,7 @@ "dotenv": "^10.0.0", "esbuild-loader": "^2.16.0", "eslint": "^8.0.0", - "eslint-config-pixiebrix": "^0.13.0", + "eslint-config-pixiebrix": "^0.14.1", "fake-indexeddb": "^3.1.3", "geckodriver": "^3.0.1", "identity-obj-proxy": "^3.0.0", @@ -314,64 +315,6 @@ "semver": "bin/semver.js" } }, - "node_modules/@babel/eslint-parser": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.16.3.tgz", - "integrity": "sha512-iB4ElZT0jAt7PKVaeVulOECdGe6UnmA/O0P9jlF5g5GBOwDVbna8AXhHRu4s27xQf6OkveyA8iTDv1jHdDejgQ==", - "dev": true, - "dependencies": { - "eslint-scope": "^5.1.1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || >=14.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.11.0", - "eslint": "^7.5.0 || ^8.0.0" - } - }, - "node_modules/@babel/eslint-parser/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@babel/eslint-parser/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/@babel/eslint-parser/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", @@ -13544,13 +13487,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", - "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.1.tgz", + "integrity": "sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "5.4.0", - "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/experimental-utils": "5.9.1", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/type-utils": "5.9.1", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -13576,24 +13520,24 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, "engines": { "node": ">= 4" } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.1.tgz", + "integrity": "sha512-cb1Njyss0mLL9kLXgS/eEY53SZQ9sT519wpX3i+U457l2UXRDuo87hgKfgRazmu9/tQb0x2sr3Y0yrU+Zz0y+w==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/typescript-estree": "5.9.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -13605,7 +13549,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-scope": { @@ -13631,14 +13575,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", - "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", + "integrity": "sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/typescript-estree": "5.9.1", "debug": "^4.3.2" }, "engines": { @@ -13658,13 +13602,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz", + "integrity": "sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -13674,10 +13618,36 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.9.1.tgz", + "integrity": "sha512-tRSpdBnPRssjlUh35rE9ug5HrUvaB9ntREy7gPXXKwmIx61TNN7+l5YKgi1hMKxo5NvqZCfYhA5FvyuJG6X6vg==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "5.9.1", + "debug": "^4.3.2", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.1.tgz", + "integrity": "sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -13688,13 +13658,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz", + "integrity": "sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -13715,12 +13685,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz", + "integrity": "sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.9.1", "eslint-visitor-keys": "^3.0.0" }, "engines": { @@ -19483,25 +19453,25 @@ } }, "node_modules/eslint-config-pixiebrix": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/eslint-config-pixiebrix/-/eslint-config-pixiebrix-0.13.0.tgz", - "integrity": "sha512-icKtWRSEW+KAuME/68fCpuslN0+9yYrfdaqPQZcNWSERHBUQh5bHCdwGv1d1LagVxUj4eM6enBEyFgRd7Thnww==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/eslint-config-pixiebrix/-/eslint-config-pixiebrix-0.14.1.tgz", + "integrity": "sha512-5TceZJwmD8gbvfXEwng4smSb9/1xReUw8vdIdEUOti1FXKGbsLn2CBmvBJCAXRRRqP8kIVwHF0y2l9YECSUs4w==", "dev": true, "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.4.0", - "@typescript-eslint/parser": "^5.4.0", + "@typescript-eslint/eslint-plugin": "^5.9.1", + "@typescript-eslint/parser": "^5.9.1", "eslint-config-prettier": "^8.3.0", "eslint-config-xo": "^0.39.0", - "eslint-config-xo-typescript": "^0.47.1", + "eslint-config-xo-typescript": "^0.49.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-import": "^2.25.3", + "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.27.1", + "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", - "eslint-plugin-react-redux": "^3.3.2", + "eslint-plugin-react-redux": "^3.3.4", "eslint-plugin-security": "^1.4.0", - "eslint-plugin-unicorn": "^39.0.0" + "eslint-plugin-unicorn": "^40.0.0" }, "engines": { "node": ">=16" @@ -19541,9 +19511,9 @@ } }, "node_modules/eslint-config-xo-typescript": { - "version": "0.47.1", - "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.47.1.tgz", - "integrity": "sha512-BkbzIltZCWp8QLekKJKG8zJ/ZGezD8Z9FaJ+hJ5PrAVUGkIPmxXLLEHCKS3ax7oOqZLYQiG+jyKfQDIEdTQgbg==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.49.0.tgz", + "integrity": "sha512-a493Ikqk1Ak2tbcVrfAwegvwFnfMbN+G1o6JnCsdQKVgjFQuAXNqJ8X88+01YKNQ8N3bZwFNACcC25+spZI3/g==", "dev": true, "engines": { "node": ">=12" @@ -19552,7 +19522,7 @@ "url": "https://github.com/sponsors/sindresorhus" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": ">=5.0.0", + "@typescript-eslint/eslint-plugin": ">=5.8.0", "eslint": ">=8.0.0", "typescript": ">=4.4" } @@ -19597,14 +19567,13 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", - "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz", + "integrity": "sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==", "dev": true, "dependencies": { "debug": "^3.2.7", - "find-up": "^2.1.0", - "pkg-dir": "^2.0.0" + "find-up": "^2.1.0" }, "engines": { "node": ">=4" @@ -19686,18 +19655,6 @@ "node": ">=4" } }, - "node_modules/eslint-module-utils/node_modules/pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-plugin-filenames": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/eslint-plugin-filenames/-/eslint-plugin-filenames-1.3.2.tgz", @@ -19714,9 +19671,9 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.25.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", - "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", + "version": "2.25.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", + "integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==", "dev": true, "dependencies": { "array-includes": "^3.1.4", @@ -19724,14 +19681,14 @@ "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.1", + "eslint-module-utils": "^2.7.2", "has": "^1.0.3", "is-core-module": "^2.8.0", "is-glob": "^4.0.3", "minimatch": "^3.0.4", "object.values": "^1.1.5", "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" + "tsconfig-paths": "^3.12.0" }, "engines": { "node": ">=4" @@ -19794,9 +19751,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.1.tgz", - "integrity": "sha512-meyunDjMMYeWr/4EBLTV1op3iSG3mjT/pz5gti38UzfM4OPpNc2m0t2xvKCOMU5D6FSdd34BIMFOvQbW+i8GAA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz", + "integrity": "sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==", "dev": true, "dependencies": { "array-includes": "^3.1.4", @@ -19834,9 +19791,9 @@ } }, "node_modules/eslint-plugin-react-redux": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-redux/-/eslint-plugin-react-redux-3.3.2.tgz", - "integrity": "sha512-wfm9x4GDdlibfp08oOAiQ2qk3zgHXb9qjV6SlmMCK35dJr9gBiDAdS+1CH4jXFubsfslWeE0fCI/XhCYaMZENw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-redux/-/eslint-plugin-react-redux-3.3.4.tgz", + "integrity": "sha512-VbyTrEf9L9Yr7CcEaNytY+8kFTIkuzKI8JrDvYhiyLKUmDL9eoG80rcnciGfGiqrwNAxeQ//GwM7xdCCQ8qH4Q==", "dev": true, "dependencies": { "eslint-plugin-react": "^7.16.0", @@ -19893,23 +19850,22 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "39.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-39.0.0.tgz", - "integrity": "sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw==", + "version": "40.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.0.0.tgz", + "integrity": "sha512-5GRXISfBk8jMmYk1eeNDw8zSRnWTxBjWkzx2Prre6E2/yLu2twozZ3EomLWCBu9nWms/ZE361BItyMQwfnG1qA==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", - "ci-info": "^3.2.0", + "@babel/helper-validator-identifier": "^7.15.7", + "ci-info": "^3.3.0", "clean-regexp": "^1.0.0", - "eslint-template-visitor": "^2.3.2", "eslint-utils": "^3.0.0", "esquery": "^1.4.0", - "indent-string": "4", + "indent-string": "^4.0.0", "is-builtin-module": "^3.1.0", "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.23", + "regexp-tree": "^0.1.24", "safe-regex": "^2.1.1", "semver": "^7.3.5", "strip-indent": "^3.0.0" @@ -19955,31 +19911,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint-template-visitor": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz", - "integrity": "sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.16", - "@babel/eslint-parser": "^7.12.16", - "eslint-visitor-keys": "^2.0.0", - "esquery": "^1.3.1", - "multimap": "^1.1.0" - }, - "peerDependencies": { - "eslint": ">=7.0.0" - } - }, - "node_modules/eslint-template-visitor/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/eslint-utils": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", @@ -28460,12 +28391,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "devOptional": true }, - "node_modules/multimap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz", - "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==", - "dev": true - }, "node_modules/mustache": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", @@ -37981,47 +37906,6 @@ } } }, - "@babel/eslint-parser": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.16.3.tgz", - "integrity": "sha512-iB4ElZT0jAt7PKVaeVulOECdGe6UnmA/O0P9jlF5g5GBOwDVbna8AXhHRu4s27xQf6OkveyA8iTDv1jHdDejgQ==", - "dev": true, - "requires": { - "eslint-scope": "^5.1.1", - "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.0" - }, - "dependencies": { - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, "@babel/generator": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", @@ -48039,13 +47923,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", - "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.1.tgz", + "integrity": "sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.4.0", - "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/experimental-utils": "5.9.1", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/type-utils": "5.9.1", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -48055,23 +47940,23 @@ }, "dependencies": { "ignore": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz", - "integrity": "sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true } } }, "@typescript-eslint/experimental-utils": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", - "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.1.tgz", + "integrity": "sha512-cb1Njyss0mLL9kLXgS/eEY53SZQ9sT519wpX3i+U457l2UXRDuo87hgKfgRazmu9/tQb0x2sr3Y0yrU+Zz0y+w==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/typescript-estree": "5.9.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -48095,41 +47980,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", - "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.9.1.tgz", + "integrity": "sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.4.0", - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/typescript-estree": "5.4.0", + "@typescript-eslint/scope-manager": "5.9.1", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/typescript-estree": "5.9.1", "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", - "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz", + "integrity": "sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0" + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.9.1.tgz", + "integrity": "sha512-tRSpdBnPRssjlUh35rE9ug5HrUvaB9ntREy7gPXXKwmIx61TNN7+l5YKgi1hMKxo5NvqZCfYhA5FvyuJG6X6vg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "5.9.1", + "debug": "^4.3.2", + "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", - "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.9.1.tgz", + "integrity": "sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", - "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz", + "integrity": "sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", - "@typescript-eslint/visitor-keys": "5.4.0", + "@typescript-eslint/types": "5.9.1", + "@typescript-eslint/visitor-keys": "5.9.1", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -48138,12 +48034,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", - "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz", + "integrity": "sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/types": "5.9.1", "eslint-visitor-keys": "^3.0.0" } }, @@ -52816,25 +52712,25 @@ } }, "eslint-config-pixiebrix": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/eslint-config-pixiebrix/-/eslint-config-pixiebrix-0.13.0.tgz", - "integrity": "sha512-icKtWRSEW+KAuME/68fCpuslN0+9yYrfdaqPQZcNWSERHBUQh5bHCdwGv1d1LagVxUj4eM6enBEyFgRd7Thnww==", + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/eslint-config-pixiebrix/-/eslint-config-pixiebrix-0.14.1.tgz", + "integrity": "sha512-5TceZJwmD8gbvfXEwng4smSb9/1xReUw8vdIdEUOti1FXKGbsLn2CBmvBJCAXRRRqP8kIVwHF0y2l9YECSUs4w==", "dev": true, "requires": { - "@typescript-eslint/eslint-plugin": "^5.4.0", - "@typescript-eslint/parser": "^5.4.0", + "@typescript-eslint/eslint-plugin": "^5.9.1", + "@typescript-eslint/parser": "^5.9.1", "eslint-config-prettier": "^8.3.0", "eslint-config-xo": "^0.39.0", - "eslint-config-xo-typescript": "^0.47.1", + "eslint-config-xo-typescript": "^0.49.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-import": "^2.25.3", + "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-react": "^7.27.1", + "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", - "eslint-plugin-react-redux": "^3.3.2", + "eslint-plugin-react-redux": "^3.3.4", "eslint-plugin-security": "^1.4.0", - "eslint-plugin-unicorn": "^39.0.0" + "eslint-plugin-unicorn": "^40.0.0" } }, "eslint-config-prettier": { @@ -52854,9 +52750,9 @@ } }, "eslint-config-xo-typescript": { - "version": "0.47.1", - "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.47.1.tgz", - "integrity": "sha512-BkbzIltZCWp8QLekKJKG8zJ/ZGezD8Z9FaJ+hJ5PrAVUGkIPmxXLLEHCKS3ax7oOqZLYQiG+jyKfQDIEdTQgbg==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/eslint-config-xo-typescript/-/eslint-config-xo-typescript-0.49.0.tgz", + "integrity": "sha512-a493Ikqk1Ak2tbcVrfAwegvwFnfMbN+G1o6JnCsdQKVgjFQuAXNqJ8X88+01YKNQ8N3bZwFNACcC25+spZI3/g==", "dev": true, "requires": {} }, @@ -52895,14 +52791,13 @@ } }, "eslint-module-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", - "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz", + "integrity": "sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg==", "dev": true, "requires": { "debug": "^3.2.7", - "find-up": "^2.1.0", - "pkg-dir": "^2.0.0" + "find-up": "^2.1.0" }, "dependencies": { "debug": { @@ -52962,15 +52857,6 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } } } }, @@ -52987,9 +52873,9 @@ } }, "eslint-plugin-import": { - "version": "2.25.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", - "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", + "version": "2.25.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", + "integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==", "dev": true, "requires": { "array-includes": "^3.1.4", @@ -52997,14 +52883,14 @@ "debug": "^2.6.9", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.1", + "eslint-module-utils": "^2.7.2", "has": "^1.0.3", "is-core-module": "^2.8.0", "is-glob": "^4.0.3", "minimatch": "^3.0.4", "object.values": "^1.1.5", "resolve": "^1.20.0", - "tsconfig-paths": "^3.11.0" + "tsconfig-paths": "^3.12.0" }, "dependencies": { "debug": { @@ -53054,9 +52940,9 @@ } }, "eslint-plugin-react": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.1.tgz", - "integrity": "sha512-meyunDjMMYeWr/4EBLTV1op3iSG3mjT/pz5gti38UzfM4OPpNc2m0t2xvKCOMU5D6FSdd34BIMFOvQbW+i8GAA==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz", + "integrity": "sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==", "dev": true, "requires": { "array-includes": "^3.1.4", @@ -53110,9 +52996,9 @@ "requires": {} }, "eslint-plugin-react-redux": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-redux/-/eslint-plugin-react-redux-3.3.2.tgz", - "integrity": "sha512-wfm9x4GDdlibfp08oOAiQ2qk3zgHXb9qjV6SlmMCK35dJr9gBiDAdS+1CH4jXFubsfslWeE0fCI/XhCYaMZENw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-redux/-/eslint-plugin-react-redux-3.3.4.tgz", + "integrity": "sha512-VbyTrEf9L9Yr7CcEaNytY+8kFTIkuzKI8JrDvYhiyLKUmDL9eoG80rcnciGfGiqrwNAxeQ//GwM7xdCCQ8qH4Q==", "dev": true, "requires": { "eslint-plugin-react": "^7.16.0", @@ -53129,23 +53015,22 @@ } }, "eslint-plugin-unicorn": { - "version": "39.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-39.0.0.tgz", - "integrity": "sha512-fd5RK2FtYjGcIx3wra7csIE/wkkmBo22T1gZtRTsLr1Mb+KsFKJ+JOdSqhHXQUrI/JTs/Mon64cEYzTgSCbltw==", + "version": "40.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-40.0.0.tgz", + "integrity": "sha512-5GRXISfBk8jMmYk1eeNDw8zSRnWTxBjWkzx2Prre6E2/yLu2twozZ3EomLWCBu9nWms/ZE361BItyMQwfnG1qA==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.9", - "ci-info": "^3.2.0", + "@babel/helper-validator-identifier": "^7.15.7", + "ci-info": "^3.3.0", "clean-regexp": "^1.0.0", - "eslint-template-visitor": "^2.3.2", "eslint-utils": "^3.0.0", "esquery": "^1.4.0", - "indent-string": "4", + "indent-string": "^4.0.0", "is-builtin-module": "^3.1.0", "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.23", + "regexp-tree": "^0.1.24", "safe-regex": "^2.1.1", "semver": "^7.3.5", "strip-indent": "^3.0.0" @@ -53178,27 +53063,6 @@ "estraverse": "^5.2.0" } }, - "eslint-template-visitor": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz", - "integrity": "sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==", - "dev": true, - "requires": { - "@babel/core": "^7.12.16", - "@babel/eslint-parser": "^7.12.16", - "eslint-visitor-keys": "^2.0.0", - "esquery": "^1.3.1", - "multimap": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true - } - } - }, "eslint-utils": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", @@ -59685,12 +59549,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "devOptional": true }, - "multimap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz", - "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==", - "dev": true - }, "mustache": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", diff --git a/package.json b/package.json index da34aca6d0..229565b622 100644 --- a/package.json +++ b/package.json @@ -128,6 +128,7 @@ "redux-logger": "^3.0.6", "redux-persist": "^6.0.0", "redux-persist-webextension-storage": "^1.0.2", + "regenerator-runtime": "^0.13.9", "reselect": "^4.0.0", "rollbar": "^2.24.0", "schema-to-yup": "1.10.0", @@ -228,7 +229,7 @@ "dotenv": "^10.0.0", "esbuild-loader": "^2.16.0", "eslint": "^8.0.0", - "eslint-config-pixiebrix": "^0.13.0", + "eslint-config-pixiebrix": "^0.14.1", "fake-indexeddb": "^3.1.3", "geckodriver": "^3.0.1", "identity-obj-proxy": "^3.0.0", diff --git a/src/__mocks__/svgAsComponentMock.js b/src/__mocks__/svgAsComponentMock.js index a6e1338a84..3b40bbfe6e 100644 --- a/src/__mocks__/svgAsComponentMock.js +++ b/src/__mocks__/svgAsComponentMock.js @@ -15,4 +15,5 @@ * along with this program. If not, see . */ +// eslint-disable-next-line import/no-anonymous-default-export -- Just a mock export default "svg"; diff --git a/src/background/__mocks__/protocol.ts b/src/background/__mocks__/protocol.ts index f1f0295b66..5cf4030a47 100644 --- a/src/background/__mocks__/protocol.ts +++ b/src/background/__mocks__/protocol.ts @@ -31,16 +31,16 @@ import { deserializeError } from "serialize-error"; const MESSAGE_PREFIX = "@@pixiebrix/background-mock/"; export function liftBackground< - TArguments extends unknown[], + Arguments extends unknown[], R extends SerializableResponse >( type: string, - method: (...args: TArguments) => Promise, + method: (...args: Arguments) => Promise, { asyncResponse = true }: HandlerOptions = {} -): (...args: TArguments) => Promise { +): (...args: Arguments) => Promise { const fullType = `${MESSAGE_PREFIX}${type}`; - return async (...args: TArguments) => { + return async (...args: Arguments) => { console.debug(`running fake ${fullType}`, { fullType, args }); if (!asyncResponse) { diff --git a/src/background/axiosFetch.ts b/src/background/axiosFetch.ts index ffb6befb3f..eedad6559e 100644 --- a/src/background/axiosFetch.ts +++ b/src/background/axiosFetch.ts @@ -4,4 +4,5 @@ import axios from "axios"; // @ts-expect-error No types needed import fetchAdapter from "@vespaiach/axios-fetch-adapter"; + axios.defaults.adapter = fetchAdapter; diff --git a/src/blocks/readers/jquery.ts b/src/blocks/readers/jquery.ts index e71e010452..f65e62f4ba 100644 --- a/src/blocks/readers/jquery.ts +++ b/src/blocks/readers/jquery.ts @@ -55,7 +55,6 @@ type Result = | null | undefined | Result[] - // eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style -- can't use Record for recursive signature | { [key: string]: Result }; export interface JQueryConfig { diff --git a/src/blocks/types.ts b/src/blocks/types.ts index 3f9513c55d..a206ddb27f 100644 --- a/src/blocks/types.ts +++ b/src/blocks/types.ts @@ -72,7 +72,6 @@ export type NormalizedAvailability = { export type ReaderConfig = | RegistryId - // eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style -- Record<> doesn't allow labelled keys | { [key: string]: ReaderConfig } | ReaderConfig[]; diff --git a/src/components/documentBuilder/documentTree.test.tsx b/src/components/documentBuilder/documentTree.test.tsx index ec2e792fc5..91cb35ff7d 100644 --- a/src/components/documentBuilder/documentTree.test.tsx +++ b/src/components/documentBuilder/documentTree.test.tsx @@ -290,7 +290,7 @@ describe("When rendered in panel", () => { ctxt: { "@input": {}, "@options": {} }, }); (contentScriptAPI.runMapArgs as jest.Mock).mockImplementationOnce( - async (inputConfig) => Promise.resolve(inputConfig) + async (inputConfig) => inputConfig ); const yamlConfig = ` diff --git a/src/components/fields/schemaFields/SchemaField.test.tsx b/src/components/fields/schemaFields/SchemaField.test.tsx index 8430c0a625..4201035c17 100644 --- a/src/components/fields/schemaFields/SchemaField.test.tsx +++ b/src/components/fields/schemaFields/SchemaField.test.tsx @@ -29,9 +29,7 @@ async function expectToggleOptions(container: HTMLElement, expected: string[]) { // React Bootstrap dropdown does not render children items unless toggled userEvent.click(container.querySelector("button")); const actual = new Set( - [...container.querySelectorAll("a")].map((x) => - x.getAttribute("data-testid") - ) + [...container.querySelectorAll("a")].map((x) => x.dataset.testid) ); await waitFor(() => { expect(actual).toEqual(new Set(expected)); @@ -394,8 +392,8 @@ describe("SchemaField", () => { await waitFor(() => { const testIds = [ - ...container.querySelectorAll("a.dropdown-item"), - ].map((x) => x.getAttribute("data-testid")); + ...container.querySelectorAll("a.dropdown-item"), + ].map((x) => x.dataset.testid); expect(testIds).toEqual(uniq(testIds)); }); } @@ -422,8 +420,8 @@ describe("SchemaField", () => { await waitFor(() => { const testIds = [ - ...container.querySelectorAll("a.dropdown-item"), - ].map((x) => x.getAttribute("data-testid")); + ...container.querySelectorAll("a.dropdown-item"), + ].map((x) => x.dataset.testid); if (testIds.includes("omit")) { expect(testIds[testIds.length - 1]).toEqual("omit"); } diff --git a/src/components/logViewer/LogToolbar.stories.tsx b/src/components/logViewer/LogToolbar.stories.tsx index 747a4b7a82..bf60a9d75a 100644 --- a/src/components/logViewer/LogToolbar.stories.tsx +++ b/src/components/logViewer/LogToolbar.stories.tsx @@ -25,7 +25,6 @@ const promiseAction = (name: string) => { const actionFn = action(name); return async (...args: unknown[]) => { actionFn(...args); - return Promise.resolve(); }; }; diff --git a/src/contrib/uipath/UiPathRobot.ts b/src/contrib/uipath/UiPathRobot.ts index e03a1ac919..b45c01c1a1 100644 --- a/src/contrib/uipath/UiPathRobot.ts +++ b/src/contrib/uipath/UiPathRobot.ts @@ -19,5 +19,4 @@ import { UiPathRobot } from "@uipath/robot"; UiPathRobot.settings.disableTelemetry = true; -// eslint-disable-next-line unicorn/prefer-export-from -- Not necessary export default UiPathRobot; diff --git a/src/devTools/editor/hooks/useEditable.ts b/src/devTools/editor/hooks/useEditable.ts index 6020a60ff3..4803b8a0db 100644 --- a/src/devTools/editor/hooks/useEditable.ts +++ b/src/devTools/editor/hooks/useEditable.ts @@ -28,9 +28,8 @@ function useEditable(): Set { const { knownEditable } = useSelector(selectEditor); const [initialEditable] = useAsyncState(async () => { - const { data } = await (await getLinkedApiClient()).get( - "api/bricks/" - ); + const client = await getLinkedApiClient(); + const { data } = await client.get("api/bricks/"); return new Set(data.map((x) => x.name)); }, []); diff --git a/src/devTools/editor/tabs/effect/v1/BlockConfiguration.tsx b/src/devTools/editor/tabs/effect/v1/BlockConfiguration.tsx index 0afd369a8b..cdf51f76bd 100644 --- a/src/devTools/editor/tabs/effect/v1/BlockConfiguration.tsx +++ b/src/devTools/editor/tabs/effect/v1/BlockConfiguration.tsx @@ -18,7 +18,7 @@ import React, { useRef } from "react"; import { RegistryId, TemplateEngine } from "@/core"; import { getIn, useFormikContext } from "formik"; -import { useBlockOptions } from "@/hooks/useBlockOptions"; +import useBlockOptions from "@/hooks/useBlockOptions"; import { Card } from "react-bootstrap"; import SchemaFieldContext from "@/components/fields/schemaFields/SchemaFieldContext"; import devtoolFieldOverrides from "@/devTools/editor/fields/devtoolFieldOverrides"; diff --git a/src/devTools/editor/tabs/effect/v3/BlockConfiguration.tsx b/src/devTools/editor/tabs/effect/v3/BlockConfiguration.tsx index d19b5fc461..443e39b7f8 100644 --- a/src/devTools/editor/tabs/effect/v3/BlockConfiguration.tsx +++ b/src/devTools/editor/tabs/effect/v3/BlockConfiguration.tsx @@ -18,7 +18,7 @@ import React, { useMemo, useRef } from "react"; import { RegistryId } from "@/core"; import { getIn, useFormikContext } from "formik"; -import { useBlockOptions } from "@/hooks/useBlockOptions"; +import useBlockOptions from "@/hooks/useBlockOptions"; import { Card } from "react-bootstrap"; import SchemaFieldContext from "@/components/fields/schemaFields/SchemaFieldContext"; import devtoolFieldOverrides from "@/devTools/editor/fields/devtoolFieldOverrides"; diff --git a/src/hooks/useBlockOptions.ts b/src/hooks/useBlockOptions.ts index 8b319b228f..e126af599e 100644 --- a/src/hooks/useBlockOptions.ts +++ b/src/hooks/useBlockOptions.ts @@ -30,7 +30,7 @@ interface BlockState { error?: string | null; } -export function useBlockOptions( +function useBlockOptions( id: RegistryId ): [BlockState, React.FunctionComponent] { const [{ block, error }, setBlock] = useState({ diff --git a/src/importAssets.d.ts b/src/importAssets.d.ts index fd02241390..13e38d30d1 100644 --- a/src/importAssets.d.ts +++ b/src/importAssets.d.ts @@ -34,6 +34,7 @@ declare module "*?loadAsText" { // Loading svg as React component using @svgr declare module "*.svg?loadAsComponent" { import React from "react"; + const SVG: React.VFC>; export default SVG; } diff --git a/src/nativeEditor/infer.ts b/src/nativeEditor/infer.ts index a00a13152e..aff8c2cf53 100644 --- a/src/nativeEditor/infer.ts +++ b/src/nativeEditor/infer.ts @@ -512,7 +512,7 @@ export function inferSelectors( element: HTMLElement, root: Element | null = null ): string[] { - const makeSelector = (allowed: CssSelectorType[]) => { + const makeSelector = (allowed?: CssSelectorType[]) => { try { return safeCssSelector(element, allowed, root); } catch (error) { @@ -532,7 +532,7 @@ export function inferSelectors( makeSelector(["tag", "class", "attribute", "nthchild"]), makeSelector(["id", "tag", "attribute", "nthchild"]), makeSelector(["id", "tag", "attribute"]), - makeSelector(undefined), + makeSelector(), ]) ).filter((x) => (x ?? "").trim() !== ""), (x) => x.length diff --git a/src/registry/internal.ts b/src/registry/internal.ts index ae708148b6..8252e05eeb 100644 --- a/src/registry/internal.ts +++ b/src/registry/internal.ts @@ -100,8 +100,11 @@ async function ensureReaders( ); } - return (await ensureBlock(definitions, definition as RawConfig<"reader">)) - .id; + const block = await ensureBlock( + definitions, + definition as RawConfig<"reader"> + ); + return block.id; } // Assume it's a reader config