From a2df486280ae2a2831d1b72646c58ed8ee2d34d1 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 26 Mar 2022 12:17:42 +0100 Subject: [PATCH] Updated to airbnb coding styles --- .eslintrc | 55 +- package-lock.json | 3297 +++++------------ package.json | 5 +- src/api/ShlinkApiError.tsx | 8 +- src/api/services/ShlinkApiClient.ts | 7 +- src/app/App.tsx | 4 +- src/app/reducers/appUpdates.ts | 2 - src/app/services/provideServices.ts | 2 +- src/common/AppUpdateBanner.tsx | 2 +- src/common/AsideMenu.tsx | 1 - src/common/ErrorHandler.tsx | 10 +- src/common/Home.tsx | 1 - src/common/MainHeader.tsx | 4 +- src/common/MenuLayout.tsx | 4 +- src/common/ScrollToTop.tsx | 2 +- src/common/ShlinkVersions.tsx | 4 +- src/common/reducers/sidebar.ts | 2 - src/common/services/provideServices.ts | 6 +- src/container/index.ts | 4 +- src/container/store.ts | 4 +- src/domains/DomainRow.tsx | 2 +- src/domains/DomainSelector.tsx | 4 +- src/domains/ManageDomains.tsx | 2 +- src/domains/helpers/DomainStatusIcon.tsx | 2 +- .../helpers/EditDomainRedirectsModal.tsx | 6 +- src/domains/reducers/domainRedirects.ts | 6 +- src/domains/reducers/domainsList.ts | 12 +- src/domains/services/provideServices.ts | 6 +- src/mercure/helpers/boundToMercureHub.tsx | 6 +- src/mercure/reducers/mercureInfo.ts | 2 - src/servers/CreateServer.tsx | 17 +- src/servers/DeleteServerButton.tsx | 2 +- src/servers/DeleteServerModal.tsx | 6 +- src/servers/ManageServers.tsx | 16 +- src/servers/ManageServersRowDropdown.tsx | 4 +- src/servers/Overview.tsx | 2 +- src/servers/data/index.ts | 10 +- .../helpers/DuplicatedServersModal.tsx | 4 +- src/servers/helpers/HighlightCard.tsx | 2 +- src/servers/helpers/ImportServersBtn.tsx | 18 +- src/servers/helpers/ServerForm.tsx | 8 +- src/servers/helpers/withSelectedServer.tsx | 2 +- src/servers/helpers/withoutSelectedServer.tsx | 3 +- src/servers/reducers/remoteServers.ts | 2 +- src/servers/reducers/selectedServer.ts | 4 +- src/servers/reducers/servers.ts | 12 +- src/servers/services/ServersImporter.ts | 4 +- src/servers/services/provideServices.ts | 22 +- src/service-worker.ts | 1 - src/settings/RealTimeUpdatesSettings.tsx | 2 +- src/settings/Settings.tsx | 6 +- src/settings/ShortUrlCreationSettings.tsx | 7 +- src/settings/helpers/index.ts | 1 + src/settings/services/provideServices.ts | 14 +- src/short-urls/CreateShortUrl.tsx | 2 +- src/short-urls/EditShortUrl.tsx | 4 +- src/short-urls/ShortUrlForm.tsx | 12 +- src/short-urls/ShortUrlsFilteringBar.tsx | 18 +- src/short-urls/ShortUrlsList.tsx | 10 +- src/short-urls/ShortUrlsTable.tsx | 4 +- src/short-urls/UseExistingIfFoundInfoIcon.tsx | 2 +- .../helpers/CreateShortUrlResult.tsx | 2 +- .../helpers/DeleteShortUrlModal.tsx | 2 +- src/short-urls/helpers/ExportShortUrlsBtn.tsx | 2 +- src/short-urls/helpers/QrCodeModal.tsx | 23 +- src/short-urls/helpers/ShortUrlsRow.tsx | 6 +- src/short-urls/helpers/ShortUrlsRowMenu.tsx | 6 +- src/short-urls/helpers/hooks.ts | 11 +- src/short-urls/reducers/shortUrlCreation.ts | 6 +- src/short-urls/reducers/shortUrlDeletion.ts | 6 +- src/short-urls/reducers/shortUrlDetail.ts | 4 +- src/short-urls/reducers/shortUrlEdition.ts | 4 +- src/short-urls/reducers/shortUrlsList.ts | 40 +- src/short-urls/services/provideServices.ts | 16 +- src/tags/TagCard.tsx | 8 +- src/tags/TagsCards.tsx | 2 +- src/tags/TagsList.tsx | 6 +- src/tags/TagsTable.tsx | 10 +- src/tags/TagsTableRow.tsx | 6 +- src/tags/helpers/DeleteTagConfirmModal.tsx | 8 +- src/tags/helpers/EditTagModal.tsx | 6 +- src/tags/helpers/TagsSelector.tsx | 8 +- src/tags/reducers/tagDelete.ts | 4 +- src/tags/reducers/tagEdit.ts | 8 +- src/tags/reducers/tagsList.ts | 22 +- src/tags/services/provideServices.ts | 10 +- src/utils/DropdownBtn.tsx | 2 +- src/utils/OrderingDropdown.tsx | 2 +- src/utils/SearchField.tsx | 2 +- src/utils/dates/DateRangeSelector.tsx | 6 +- src/utils/dates/types/index.ts | 16 +- src/utils/forms/InputFormGroup.tsx | 1 - src/utils/forms/LabeledFormGroup.tsx | 1 + src/utils/helpers/charts.ts | 2 +- src/utils/helpers/date.ts | 6 +- src/utils/helpers/features.ts | 12 - src/utils/helpers/files.ts | 2 +- src/utils/helpers/hooks.ts | 18 +- src/utils/helpers/leaflet.ts | 2 +- src/utils/helpers/ordering.ts | 16 +- src/utils/helpers/pagination.ts | 9 +- src/utils/helpers/sw.ts | 6 +- src/utils/helpers/uri.ts | 4 +- src/utils/helpers/version.ts | 4 +- src/utils/utils.ts | 2 +- src/visits/NonOrphanVisits.tsx | 2 +- src/visits/OrphanVisits.tsx | 2 +- src/visits/ShortUrlVisits.tsx | 2 +- src/visits/ShortUrlVisitsHeader.tsx | 4 +- src/visits/TagVisits.tsx | 2 +- src/visits/VisitsStats.tsx | 23 +- src/visits/VisitsTable.tsx | 16 +- src/visits/charts/DoughnutChart.tsx | 2 +- src/visits/charts/HorizontalBarChart.tsx | 10 +- src/visits/charts/LineChartCard.tsx | 34 +- src/visits/charts/SortableBarChartCard.tsx | 36 +- src/visits/helpers/OpenMapModalBtn.tsx | 12 +- src/visits/reducers/common.ts | 4 +- src/visits/reducers/nonOrphanVisits.ts | 10 +- src/visits/reducers/orphanVisits.ts | 10 +- src/visits/reducers/shortUrlVisits.ts | 10 +- src/visits/reducers/tagVisits.ts | 10 +- src/visits/reducers/visitsOverview.ts | 2 - src/visits/services/VisitsParser.ts | 5 +- src/visits/services/provideServices.ts | 16 +- src/visits/types/helpers.ts | 6 +- test/api/ShlinkApiError.test.tsx | 20 +- test/api/services/ShlinkApiClient.test.ts | 26 +- .../services/ShlinkApiClientBuilder.test.ts | 4 +- test/app/App.test.tsx | 6 +- test/common/AppUpdateBanner.test.tsx | 2 +- test/common/Home.test.tsx | 2 +- test/common/MainHeader.test.tsx | 10 +- test/common/MenuLayout.test.tsx | 16 +- test/common/ShlinkVersions.test.tsx | 16 +- test/common/ShlinkVersionsContainer.test.tsx | 4 +- test/common/SimplePaginator.test.tsx | 2 +- test/common/img/ShlinkLogo.test.tsx | 12 +- test/common/reducer/sidebar.test.ts | 4 +- test/domains/DomainRow.test.tsx | 20 +- test/domains/DomainSelector.test.tsx | 10 +- .../domains/helpers/DomainStatusIcon.test.tsx | 6 +- test/domains/reducers/domainsList.test.ts | 24 +- test/mercure/helpers/index.test.tsx | 16 +- test/servers/CreateServer.test.tsx | 4 +- test/servers/DeleteServerModal.test.tsx | 2 +- test/servers/ManageServers.test.tsx | 12 +- test/servers/ManageServersRow.test.tsx | 8 +- .../servers/ManageServersRowDropdown.test.tsx | 4 +- test/servers/Overview.test.tsx | 2 +- test/servers/ServersListGroup.test.tsx | 8 +- .../helpers/DuplicatedServersModal.test.tsx | 16 +- .../servers/helpers/ForServerVersion.test.tsx | 16 +- test/servers/helpers/HighlightCard.test.tsx | 22 +- .../servers/helpers/ImportServersBtn.test.tsx | 18 +- test/servers/helpers/ServerError.test.tsx | 2 +- test/servers/reducers/remoteServers.test.ts | 2 +- test/servers/reducers/selectedServer.test.ts | 6 +- test/servers/reducers/servers.test.ts | 8 +- test/servers/services/ServersImporter.test.ts | 4 +- .../settings/RealTimeUpdatesSettings.test.tsx | 10 +- .../ShortUrlCreationSettings.test.tsx | 32 +- test/settings/ShortUrlsListSettings.test.tsx | 12 +- test/settings/TagsSettings.test.tsx | 22 +- test/settings/UserInterfaceSettings.test.tsx | 16 +- test/settings/VisitsSettings.test.tsx | 4 +- test/settings/reducers/settings.test.ts | 4 +- test/short-urls/EditShortUrl.test.tsx | 2 +- test/short-urls/Paginator.test.tsx | 20 +- test/short-urls/ShortUrlForm.test.tsx | 36 +- .../short-urls/ShortUrlsFilteringBar.test.tsx | 36 +- test/short-urls/ShortUrlsList.test.tsx | 8 +- test/short-urls/ShortUrlsTable.test.tsx | 8 +- .../helpers/CreateShortUrlResult.test.tsx | 2 +- .../helpers/ExportShortUrlsBtn.test.tsx | 22 +- test/short-urls/helpers/QrCodeModal.test.tsx | 26 +- .../helpers/ShortUrlDetailLink.test.tsx | 14 +- .../ShortUrlFormCheckboxGroup.test.tsx | 4 +- .../helpers/ShortUrlVisitsCount.test.tsx | 2 +- test/short-urls/helpers/ShortUrlsRow.test.tsx | 10 +- .../reducers/shortUrlDeletion.test.ts | 2 +- .../reducers/shortUrlDetail.test.ts | 8 +- .../reducers/shortUrlEdition.test.ts | 14 +- .../short-urls/reducers/shortUrlsList.test.ts | 18 +- test/tags/TagCard.test.tsx | 6 +- test/tags/TagsList.test.tsx | 4 +- test/tags/TagsTable.test.tsx | 36 +- test/tags/TagsTableRow.test.tsx | 4 +- test/tags/helpers/EditTagModal.test.tsx | 8 +- test/tags/helpers/Tag.test.tsx | 24 +- test/tags/helpers/TagsSelector.test.tsx | 16 +- test/tags/reducers/tagDelete.test.ts | 4 +- test/tags/reducers/tagsList.test.ts | 26 +- test/utils/Checkbox.test.tsx | 6 +- test/utils/DropdownBtn.test.tsx | 20 +- test/utils/DropdownBtnMenu.test.tsx | 6 +- test/utils/ExportBtn.test.tsx | 12 +- test/utils/InfoTooltip.test.tsx | 22 +- test/utils/Message.test.tsx | 24 +- test/utils/NavPills.test.tsx | 12 +- test/utils/PaginationDropdown.test.tsx | 12 +- test/utils/Result.test.tsx | 12 +- test/utils/SimpleCard.test.tsx | 4 +- test/utils/SortingDropdown.test.tsx | 8 +- test/utils/Time.test.tsx | 4 +- test/utils/TooltipToggleSwitch.test.tsx | 6 +- test/utils/dates/DateRangeSelector.test.tsx | 20 +- test/utils/dates/types/index.test.ts | 122 +- test/utils/helpers/date.test.ts | 50 +- test/utils/helpers/numbers.test.ts | 12 +- test/utils/helpers/ordering.test.ts | 12 +- test/utils/helpers/query.test.ts | 16 +- test/utils/helpers/redux.test.ts | 16 +- test/utils/helpers/uri.test.ts | 6 +- test/utils/helpers/version.test.ts | 26 +- test/utils/services/ColorGenerator.test.ts | 10 +- test/utils/services/Storage.test.ts | 2 +- test/utils/table/TableOrderIcon.test.tsx | 16 +- test/utils/utils.test.ts | 18 +- test/visits/ShortUrlVisitsHeader.test.tsx | 6 +- test/visits/VisitsHeader.test.tsx | 2 +- test/visits/VisitsStats.test.tsx | 2 +- test/visits/VisitsTable.test.tsx | 50 +- test/visits/charts/ChartCard.test.tsx | 4 +- .../charts/DoughnutChartLegend.test.tsx | 6 +- .../visits/charts/HorizontalBarChart.test.tsx | 12 +- test/visits/charts/LineChartCard.test.tsx | 18 +- .../charts/SortableBarChartCard.test.tsx | 10 +- test/visits/helpers/MapModal.test.tsx | 4 +- test/visits/helpers/OpenMapModalBtn.test.tsx | 4 +- .../helpers/VisitsFilterDropdown.test.tsx | 24 +- test/visits/reducers/nonOrphanVisits.test.ts | 10 +- test/visits/reducers/orphanVisits.test.ts | 10 +- test/visits/reducers/shortUrlVisits.test.ts | 18 +- test/visits/reducers/tagVisits.test.ts | 26 +- test/visits/reducers/visitCreation.test.ts | 5 +- test/visits/reducers/visitsOverview.test.ts | 6 +- test/visits/services/VisitsParser.test.ts | 16 +- test/visits/types/helpers.test.ts | 8 +- 239 files changed, 2210 insertions(+), 3549 deletions(-) diff --git a/.eslintrc b/.eslintrc index 557e9973..4b34f269 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,25 +1,46 @@ { + "root": true, "extends": [ - "@shlinkio/js-coding-standard" + "airbnb", + "airbnb-typescript", + "plugin:@typescript-eslint/recommended" ], - "plugins": ["jest"], - "env": { - "jest/globals": true - }, "parserOptions": { - "tsconfigRootDir": ".", - "createDefaultProgram": true - }, - "globals": { - "process": true, - "setImmediate": true + "project": "./tsconfig.json" }, "ignorePatterns": ["src/service*.ts"], "rules": { - "complexity": "off", - "import/named": "off", - "@typescript-eslint/no-unnecessary-type-assertion": "off", - "@typescript-eslint/no-unsafe-return": "off", - "@typescript-eslint/no-unsafe-call": "off" - } + "object-curly-newline": "off", + "implicit-arrow-linebreak": "off", + "no-restricted-globals": "off", + "default-case": "off", + "max-len": ["error", { "code": 120, "ignoreComments": true, "ignoreStrings": true }], + "import/no-cycle": "off", + "import/prefer-default-export": "off", + "import/no-extraneous-dependencies": "off", + "react/react-in-jsx-scope": "off", + "react/prop-types": "off", + "react/require-default-props": "off", + "react/function-component-definition": "off", + "react/no-array-index-key": "off", + "react/no-unstable-nested-components": "off", + "react/jsx-one-expression-per-line": "off", + "react/jsx-props-no-spreading": "off", + "react/jsx-no-useless-fragment": "off", + "@typescript-eslint/no-unused-expressions": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/lines-between-class-members": "off" + }, + "overrides": [ + { + "files": ["*.test.*"], + "rules": { + "prefer-promise-reject-errors": "off", + "no-param-reassign": "off", + "react/no-children-prop": "off", + "@typescript-eslint/no-shadow": "off" + } + } + ] } diff --git a/package-lock.json b/package-lock.json index d906c565..8be8065c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,6 @@ "workbox-strategies": "^6.5.1" }, "devDependencies": { - "@shlinkio/eslint-config-js-coding-standard": "~1.2.2", "@stryker-mutator/core": "^5.6.1", "@stryker-mutator/jest-runner": "^5.6.1", "@stryker-mutator/typescript-checker": "^5.6.1", @@ -69,6 +68,8 @@ "@types/react-redux": "^7.1.23", "@types/react-tag-autocomplete": "^6.1.1", "@types/uuid": "^8.3.4", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", "@wojtekmaj/enzyme-adapter-react-17": "0.6.5", "adm-zip": "^0.5.9", "babel-jest": "^27.5.1", @@ -76,6 +77,8 @@ "dart-sass": "^1.25.0", "enzyme": "^3.11.0", "eslint": "^7.13.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-airbnb-typescript": "^16.1.4", "identity-obj-proxy": "^3.0.0", "jest": "^27.5.1", "react-scripts": "^5.0.0", @@ -2295,19 +2298,18 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz", - "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.1.1", "espree": "^7.3.0", - "globals": "^12.1.0", + "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.19", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, @@ -2316,10 +2318,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -2334,12 +2335,12 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -2376,12 +2377,15 @@ } }, "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@fortawesome/fontawesome-common-types": { @@ -2710,15 +2714,6 @@ } } }, - "node_modules/@jest/core/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2832,18 +2827,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@jest/core/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -3493,28 +3476,6 @@ "integrity": "sha512-BUyKJGdDWqvWC5GEhyOiUrGNi9iJUr4CU0O2WxJL6QJhHeeA/NVBalH+FeK0r/x/W0rPymXt5s78TDS7d6lCwg==", "dev": true }, - "node_modules/@shlinkio/eslint-config-js-coding-standard": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@shlinkio/eslint-config-js-coding-standard/-/eslint-config-js-coding-standard-1.2.2.tgz", - "integrity": "sha512-Gsv0rSNiGUZnncYbWweSP1052eQ7l7rvXN5Zm14Qee+vTWd30eS++nT+xzSI0CBvqElGlFS9au6RNBScyX2kag==", - "dev": true, - "dependencies": { - "babel-eslint": "^10.1.0", - "eslint-config-adidas-babel": "^1.3.1", - "eslint-config-adidas-env": "^1.3.0", - "eslint-config-adidas-react": "^1.3.2", - "eslint-config-adidas-typescript": "^1.4.2", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.1.5", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.3.1", - "eslint-plugin-react": "^7.22.0" - }, - "peerDependencies": { - "eslint": "^7.21.0" - } - }, "node_modules/@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -3611,15 +3572,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@stryker-mutator/core/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/@stryker-mutator/core/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -3980,18 +3932,6 @@ "node": ">=8" } }, - "node_modules/@stryker-mutator/core/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@stryker-mutator/core/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -4025,12 +3965,6 @@ "node": ">= 8" } }, - "node_modules/@stryker-mutator/core/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@stryker-mutator/instrumenter": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/@stryker-mutator/instrumenter/-/instrumenter-5.6.1.tgz", @@ -4193,12 +4127,6 @@ "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true }, - "node_modules/@stryker-mutator/jest-runner/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@stryker-mutator/typescript-checker": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/@stryker-mutator/typescript-checker/-/typescript-checker-5.6.1.tgz", @@ -4244,12 +4172,6 @@ "node": ">=10" } }, - "node_modules/@stryker-mutator/typescript-checker/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@stryker-mutator/util": { "version": "5.6.1", "resolved": "https://registry.npmjs.org/@stryker-mutator/util/-/util-5.6.1.tgz", @@ -5147,30 +5069,31 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz", - "integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", + "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.16.1", - "@typescript-eslint/scope-manager": "4.16.1", - "debug": "^4.1.1", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/type-utils": "5.16.0", + "@typescript-eslint/utils": "5.16.0", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^4.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -5179,9 +5102,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5214,9 +5137,9 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5228,56 +5151,26 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", - "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - } - }, "node_modules/@typescript-eslint/parser": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz", - "integrity": "sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", + "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "4.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", - "debug": "^4.1.1" + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", + "debug": "^4.3.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -5286,9 +5179,9 @@ } }, "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5309,29 +5202,78 @@ "dev": true }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", - "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1" + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", + "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "5.16.0", + "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/type-utils/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/@typescript-eslint/types": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", - "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", "dev": true, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -5339,21 +5281,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", - "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1", - "debug": "^4.1.1", - "globby": "^11.0.1", - "is-glob": "^4.0.1", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -5366,9 +5308,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -5401,9 +5343,9 @@ "dev": true }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -5415,23 +5357,68 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", - "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", + "node_modules/@typescript-eslint/utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", + "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.16.1", "eslint-visitor-keys": "^2.0.0" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/@typescript-eslint/utils/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/@typescript-eslint/visitor-keys": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -5439,12 +5426,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true, "engines": { - "node": ">=10" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@webassemblyjs/ast": { @@ -5986,6 +5973,15 @@ "ansi-html": "bin/ansi-html" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -6188,12 +6184,12 @@ "dev": true }, "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/async": { @@ -6294,27 +6290,6 @@ "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", "dev": true }, - "node_modules/babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "deprecated": "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "eslint": ">= 4.12.1" - } - }, "node_modules/babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", @@ -7095,15 +7070,6 @@ "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", "dev": true }, - "node_modules/builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -7587,15 +7553,6 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/cliui/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -7619,18 +7576,6 @@ "node": ">=8" } }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -7856,15 +7801,6 @@ "node": ">=0.8" } }, - "node_modules/contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", @@ -8764,13 +8700,12 @@ } }, "node_modules/doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "dependencies": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" }, "engines": { "node": ">=0.10.0" @@ -9229,29 +9164,32 @@ } }, "node_modules/eslint": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", - "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.1", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -9259,7 +9197,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -9268,7 +9206,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -9282,159 +9220,68 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-config-adidas-babel": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-babel/-/eslint-config-adidas-babel-1.3.1.tgz", - "integrity": "sha512-V+dPDdGr3oDHmmSJgy8yD7AARRdAEQgcbdJvGSrIA3RrtBRyfMbyPgKxAJkVjv8lskrFn6zDJADTdM8gAhj69Q==", - "dev": true, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "@babel/eslint-parser": "^7", - "eslint": "^7" - } - }, - "node_modules/eslint-config-adidas-env": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-env/-/eslint-config-adidas-env-1.3.0.tgz", - "integrity": "sha512-E0awO8ZkN9Ev+1EE5IPqYQ0GNOVjo8GRHldzYW4H1FnmoxrSjgwhvCBznLA1VBQWXBqStgirA6CJbrb1v2/pAA==", - "dev": true, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "eslint": "^7", - "eslint-plugin-node": "^11" - } - }, - "node_modules/eslint-config-adidas-es5": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es5/-/eslint-config-adidas-es5-1.3.2.tgz", - "integrity": "sha512-s73YgHWZsvxZYHyi4rV2xpQ4TWbki2Ti4ik/FYPD52h1qaSVQdNxdobUqzjDXVfaD+LRjIUt4CAzHxjBBhJqDw==", - "dev": true, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "eslint": "^7" - } - }, - "node_modules/eslint-config-adidas-es6": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es6/-/eslint-config-adidas-es6-1.4.1.tgz", - "integrity": "sha512-7FQMuRJvrzRxVyfAvs4LNa5JbEbIWH5ZswmRPTAxoAG+V2iaEYmKpMraEdrWdwXXOrWB8IeNgbesz4Q8zyehwg==", + "node_modules/eslint-config-airbnb": { + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, "dependencies": { - "eslint-config-adidas-es5": "~1.3" + "eslint-config-airbnb-base": "^15.0.0", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5" }, "engines": { - "node": ">= 12", - "npm": ">= 6" + "node": "^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^7", - "eslint-plugin-import": "^2.22", - "eslint-plugin-promise": "^4" + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0" } }, - "node_modules/eslint-config-adidas-es7": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es7/-/eslint-config-adidas-es7-1.3.1.tgz", - "integrity": "sha512-si/QwIt7JcbuxbDrDcDa3oe6wq+pkyxTM0jhVOawjTMSGyEWqfsjNmqLqDG9/uJZ0Tn1KP6HG6h8tf6n4wL0Iw==", + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "dependencies": { - "eslint-config-adidas-es6": "~1.4" + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "engines": { - "node": ">= 12", - "npm": ">= 6" + "node": "^10.12.0 || >=12.0.0" }, "peerDependencies": { - "eslint": "^7" + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" } }, - "node_modules/eslint-config-adidas-es8": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es8/-/eslint-config-adidas-es8-1.3.1.tgz", - "integrity": "sha512-CQLlG2UL6rzkrxTgRNYWH6vIQrjvqdYpJ9O5Xyb6WMuATvi+bWBkqzgJNoz5HbmUJi4cw2WM//mO+cSO7rwBmA==", + "node_modules/eslint-config-airbnb-base/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/eslint-config-airbnb-typescript": { + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-16.1.4.tgz", + "integrity": "sha512-dfm2cEaYXh4mCYd+RyJO8+PQfd5/zp8WwrCeRznly5qD9W5tal3KTjgdInYWuEAdwWnNJxWcmQ/HFiA4bfkM1g==", "dev": true, "dependencies": { - "eslint-config-adidas-es7": "~1.3" - }, - "engines": { - "node": ">= 12", - "npm": ">= 6" + "eslint-config-airbnb-base": "^15.0.0" }, "peerDependencies": { - "eslint": "^7" - } - }, - "node_modules/eslint-config-adidas-es9": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es9/-/eslint-config-adidas-es9-1.3.2.tgz", - "integrity": "sha512-7l3/HI59iy/pasz5kLXOejIgg+8b9K7I/D57151s67qB2ykRGv3Ii0vmYbY2SAdq6PkIpg3NvG2oXIHBPcM3zQ==", - "dev": true, - "dependencies": { - "eslint-config-adidas-es8": "~1.3" - }, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "eslint": "^7" - } - }, - "node_modules/eslint-config-adidas-jsx": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-jsx/-/eslint-config-adidas-jsx-1.3.0.tgz", - "integrity": "sha512-AalihByaHsBbTDlxSjEoVYgzGOObouaULH+seWnQ+VQndqzfzSjcWuH4G7k+67X+ozxBvvzBZNu4IfVEwvTACQ==", - "dev": true, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "eslint": "^7" - } - }, - "node_modules/eslint-config-adidas-react": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-react/-/eslint-config-adidas-react-1.3.2.tgz", - "integrity": "sha512-bSZ/bQZapHcPDjkKsL7/HIorjLytOi3zCgIjjmCLgkpFYU19QBczbnnvYMJfXa3CCTS+h1GzJv4SdexW8r/Pog==", - "dev": true, - "dependencies": { - "eslint-config-adidas-jsx": "~1.3" - }, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "eslint": "^7", - "eslint-plugin-react": "^7.22" - } - }, - "node_modules/eslint-config-adidas-typescript": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-typescript/-/eslint-config-adidas-typescript-1.4.2.tgz", - "integrity": "sha512-pfBVaEbQSobsR+7TcDlShr0ehcylb28whAz9sktQ+1HPffrqeWqTFjU1CXDJpxe9P8+MAYviJbCvkHVkzRTIcQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/eslint-plugin": "^4.14", - "@typescript-eslint/parser": "^4.14", - "eslint-config-adidas-es9": "~1.3" - }, - "engines": { - "node": ">= 12", - "npm": ">= 6" - }, - "peerDependencies": { - "eslint": "^7" + "@typescript-eslint/eslint-plugin": "^5.0.0", + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3" } }, "node_modules/eslint-import-resolver-node": { @@ -9548,223 +9395,57 @@ "node": ">=4" } }, - "node_modules/eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "dependencies": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - }, - "engines": { - "node": ">=8.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=4.19.1" - } - }, "node_modules/eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "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.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "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.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" + "object.values": "^1.1.5", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.12.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/path-type": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "dependencies": { - "pify": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint-plugin-import/node_modules/read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "dependencies": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-jest": { - "version": "24.1.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.1.5.tgz", - "integrity": "sha512-FIP3lwC8EzEG+rOs1y96cOJmMVpdFNreoDJv29B5vIupVssRi8zrSY3QadogT0K3h1Y8TMxJ6ZSAzYUmFCp2hg==", - "dev": true, - "dependencies": { - "@typescript-eslint/experimental-utils": "^4.0.1" - }, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": ">=5" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", - "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", + "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", "dev": true, "dependencies": { - "@babel/runtime": "^7.11.2", + "@babel/runtime": "^7.16.3", "aria-query": "^4.2.2", - "array-includes": "^3.1.1", + "array-includes": "^3.1.4", "ast-types-flow": "^0.0.7", - "axe-core": "^4.0.2", + "axe-core": "^4.3.5", "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.6", - "emoji-regex": "^9.0.0", + "damerau-levenshtein": "^1.0.7", + "emoji-regex": "^9.2.2", "has": "^1.0.3", - "jsx-ast-utils": "^3.1.0", - "language-tags": "^1.0.5" + "jsx-ast-utils": "^3.2.1", + "language-tags": "^1.0.5", + "minimatch": "^3.0.4" }, "engines": { "node": ">=4.0" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, "node_modules/eslint-plugin-jsx-a11y/node_modules/emoji-regex": { @@ -9773,27 +9454,81 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, - "node_modules/eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "node_modules/eslint-plugin-react": { + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", + "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==", "dev": true, "dependencies": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" + "array-includes": "^3.1.4", + "array.prototype.flatmap": "^1.2.5", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.5", + "object.fromentries": "^2.0.5", + "object.hasown": "^1.1.0", + "object.values": "^1.1.5", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.3", + "semver": "^6.3.0", + "string.prototype.matchall": "^4.0.6" }, "engines": { - "node": ">=8.10.0" + "node": ">=4" }, "peerDependencies": { - "eslint": ">=5.16.0" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, - "node_modules/eslint-plugin-node/node_modules/semver": { + "node_modules/eslint-plugin-react-hooks": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", + "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/eslint-plugin-react/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint-plugin-react/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-react/node_modules/resolve": { + "version": "2.0.0-next.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", + "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/eslint-plugin-react/node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", @@ -9802,52 +9537,6 @@ "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-promise": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz", - "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/eslint-plugin-react": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz", - "integrity": "sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.1", - "array.prototype.flatmap": "^1.2.3", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "object.entries": "^1.1.2", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.18.1", - "string.prototype.matchall": "^4.0.2" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7" - } - }, - "node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -9885,13 +9574,27 @@ "node": ">=4" } }, - "node_modules/eslint/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "node_modules/eslint/node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/eslint/node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, "engines": { - "node": ">=8" + "node": ">=10.10.0" } }, "node_modules/eslint/node_modules/ansi-styles": { @@ -9981,6 +9684,18 @@ "node": ">=6.0.0" } }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", @@ -9990,10 +9705,41 @@ "node": ">=10" } }, + "node_modules/eslint/node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/eslint/node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/eslint/node_modules/flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, "node_modules/eslint/node_modules/glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { "is-glob": "^4.0.1" @@ -10003,12 +9749,12 @@ } }, "node_modules/eslint/node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -10050,6 +9796,21 @@ "node": ">=8" } }, + "node_modules/eslint/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/eslint/node_modules/semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -10083,18 +9844,6 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/eslint/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -10120,12 +9869,15 @@ } }, "node_modules/eslint/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/which": { @@ -10144,13 +9896,13 @@ } }, "node_modules/espree": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", - "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "dependencies": { "acorn": "^7.4.0", - "acorn-jsx": "^5.2.0", + "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" }, "engines": { @@ -12877,18 +12629,6 @@ "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "dev": true }, - "node_modules/is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "dependencies": { - "builtin-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -15349,12 +15089,6 @@ "node": ">=8" } }, - "node_modules/jest-snapshot/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/jest-util": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz", @@ -16131,6 +15865,12 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "node_modules/lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -16994,18 +16734,6 @@ "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", "dev": true }, - "node_modules/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, "node_modules/normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -17367,15 +17095,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ora/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/ora/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -17477,18 +17196,6 @@ "node": ">=8" } }, - "node_modules/ora/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/ora/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -18731,15 +18438,6 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, - "node_modules/pretty-format/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/pretty-format/node_modules/ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", @@ -19099,15 +18797,6 @@ "node": ">=14" } }, - "node_modules/react-dev-utils/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/react-dev-utils/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -19536,18 +19225,6 @@ "node": ">=8" } }, - "node_modules/react-dev-utils/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/react-dev-utils/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -19587,12 +19264,6 @@ "node": ">= 8" } }, - "node_modules/react-dev-utils/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/react-dom": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", @@ -19926,39 +19597,6 @@ "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==", "dev": true }, - "node_modules/react-scripts/node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", - "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/type-utils": "5.16.0", - "@typescript-eslint/utils": "5.16.0", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "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": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/react-scripts/node_modules/@typescript-eslint/experimental-utils": { "version": "5.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.16.0.tgz", @@ -19978,157 +19616,6 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/react-scripts/node_modules/@typescript-eslint/parser": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", - "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", - "debug": "^4.3.2" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/react-scripts/node_modules/@typescript-eslint/scope-manager": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", - "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/react-scripts/node_modules/@typescript-eslint/type-utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", - "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "5.16.0", - "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/react-scripts/node_modules/@typescript-eslint/types": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", - "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/react-scripts/node_modules/@typescript-eslint/typescript-estree": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", - "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/react-scripts/node_modules/@typescript-eslint/utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", - "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/react-scripts/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", - "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.16.0", - "eslint-visitor-keys": "^3.0.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/react-scripts/node_modules/acorn": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", @@ -20141,15 +19628,6 @@ "node": ">=0.4.0" } }, - "node_modules/react-scripts/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/react-scripts/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -20576,12 +20054,6 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, - "node_modules/react-scripts/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, "node_modules/react-scripts/node_modules/emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", @@ -20701,60 +20173,6 @@ "eslint": "^8.1.0" } }, - "node_modules/react-scripts/node_modules/eslint-plugin-import": { - "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", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "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.12.0" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-import/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-import/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, "node_modules/react-scripts/node_modules/eslint-plugin-jest": { "version": "25.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz", @@ -20779,106 +20197,6 @@ } } }, - "node_modules/react-scripts/node_modules/eslint-plugin-jsx-a11y": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", - "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.16.3", - "aria-query": "^4.2.2", - "array-includes": "^3.1.4", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.3.5", - "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.7", - "emoji-regex": "^9.2.2", - "has": "^1.0.3", - "jsx-ast-utils": "^3.2.1", - "language-tags": "^1.0.5", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=4.0" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-react": { - "version": "7.29.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", - "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==", - "dev": true, - "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flatmap": "^1.2.5", - "doctrine": "^2.1.0", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.5", - "object.fromentries": "^2.0.5", - "object.hasown": "^1.1.0", - "object.values": "^1.1.5", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.6" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-react-hooks": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", - "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "peerDependencies": { - "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-react/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-react/node_modules/resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/react-scripts/node_modules/eslint-plugin-react/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/react-scripts/node_modules/eslint-plugin-testing-library": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.1.0.tgz", @@ -22038,18 +21356,6 @@ "webpack": "^5.0.0" } }, - "node_modules/react-scripts/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/react-scripts/node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -22198,12 +21504,6 @@ "node": ">= 8" } }, - "node_modules/react-scripts/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/react-shallow-renderer": { "version": "16.14.1", "resolved": "https://registry.npmjs.org/react-shallow-renderer/-/react-shallow-renderer-16.14.1.tgz", @@ -23595,17 +22895,56 @@ } }, "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/snapdragon": { @@ -24141,27 +23480,6 @@ "node": ">=10" } }, - "node_modules/string-length/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-length/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string-natural-compare": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz", @@ -24327,6 +23645,18 @@ "node": ">=0.10.0" } }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -24657,24 +23987,6 @@ "stylelint": ">=3.0.2" } }, - "node_modules/stylelint/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/stylelint/node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/stylelint/node_modules/autoprefixer": { "version": "9.8.6", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", @@ -24905,38 +24217,6 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/stylelint/node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/stylelint/node_modules/string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -24951,18 +24231,6 @@ "node": ">=8" } }, - "node_modules/stylelint/node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/stylelint/node_modules/supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -24975,21 +24243,6 @@ "node": ">=6" } }, - "node_modules/stylelint/node_modules/table": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.3.tgz", - "integrity": "sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "lodash": "^4.17.20", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/stylelint/node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -25186,59 +24439,64 @@ "dev": true }, "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=6.0.0" + "node": ">=10.0.0" } }, - "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "node_modules/table/node_modules/ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, - "node_modules/table/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "node_modules/table/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/tailwindcss": { @@ -27852,15 +27110,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -27911,18 +27160,6 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -27995,6 +27232,12 @@ "node": ">=0.4" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -28044,15 +27287,6 @@ "node": ">=6" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/yargs/node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -28076,18 +27310,6 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yargs/node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -29646,39 +28868,38 @@ } }, "@eslint/eslintrc": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.1.tgz", - "integrity": "sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.1.1", "espree": "^7.3.0", - "globals": "^12.1.0", + "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.19", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { "debug": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", - "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "ignore": { @@ -29700,9 +28921,9 @@ "dev": true }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } @@ -29945,12 +29166,6 @@ "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30028,15 +29243,6 @@ "glob": "^7.1.3" } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -30516,25 +29722,6 @@ "integrity": "sha512-BUyKJGdDWqvWC5GEhyOiUrGNi9iJUr4CU0O2WxJL6QJhHeeA/NVBalH+FeK0r/x/W0rPymXt5s78TDS7d6lCwg==", "dev": true }, - "@shlinkio/eslint-config-js-coding-standard": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@shlinkio/eslint-config-js-coding-standard/-/eslint-config-js-coding-standard-1.2.2.tgz", - "integrity": "sha512-Gsv0rSNiGUZnncYbWweSP1052eQ7l7rvXN5Zm14Qee+vTWd30eS++nT+xzSI0CBvqElGlFS9au6RNBScyX2kag==", - "dev": true, - "requires": { - "babel-eslint": "^10.1.0", - "eslint-config-adidas-babel": "^1.3.1", - "eslint-config-adidas-env": "^1.3.0", - "eslint-config-adidas-react": "^1.3.2", - "eslint-config-adidas-typescript": "^1.4.2", - "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jest": "^24.1.5", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^4.3.1", - "eslint-plugin-react": "^7.22.0" - } - }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -30620,12 +29807,6 @@ "uri-js": "^4.2.2" } }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -30878,15 +30059,6 @@ "strip-ansi": "^6.0.1" } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -30910,12 +30082,6 @@ "requires": { "isexe": "^2.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -31036,12 +30202,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -31073,12 +30233,6 @@ "requires": { "lru-cache": "^6.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -31856,25 +31010,26 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz", - "integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", + "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.16.1", - "@typescript-eslint/scope-manager": "4.16.1", - "debug": "^4.1.1", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/type-utils": "5.16.0", + "@typescript-eslint/utils": "5.16.0", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", - "lodash": "^4.17.15", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "ignore": "^5.1.8", + "regexpp": "^3.2.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -31896,52 +31051,32 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, - "@typescript-eslint/experimental-utils": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", - "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - } - }, "@typescript-eslint/parser": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz", - "integrity": "sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", + "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.16.1", - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/typescript-estree": "4.16.1", - "debug": "^4.1.1" + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", + "debug": "^4.3.2" }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -31956,40 +31091,68 @@ } }, "@typescript-eslint/scope-manager": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", - "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", + "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1" + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0" } }, - "@typescript-eslint/types": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", - "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", - "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", + "@typescript-eslint/type-utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", + "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "@typescript-eslint/visitor-keys": "4.16.1", - "debug": "^4.1.1", - "globby": "^11.0.1", - "is-glob": "^4.0.1", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/utils": "5.16.0", + "debug": "^4.3.2", + "tsutils": "^3.21.0" }, "dependencies": { "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@typescript-eslint/types": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", + "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", + "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/visitor-keys": "5.16.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "dependencies": { + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -32011,36 +31174,61 @@ "dev": true }, "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { "lru-cache": "^6.0.0" } + } + } + }, + "@typescript-eslint/utils": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", + "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.16.0", + "@typescript-eslint/types": "5.16.0", + "@typescript-eslint/typescript-estree": "5.16.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "dependencies": { + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^2.0.0" + } }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "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 } } }, "@typescript-eslint/visitor-keys": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", - "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", + "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", "dev": true, "requires": { - "@typescript-eslint/types": "4.16.1", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.16.0", + "eslint-visitor-keys": "^3.0.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", "dev": true } } @@ -32495,6 +31683,12 @@ "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==", "dev": true }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -32641,9 +31835,9 @@ "dev": true }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { @@ -32713,20 +31907,6 @@ "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", "dev": true }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - } - }, "babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", @@ -33327,12 +32507,6 @@ "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", "dev": true }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -33713,12 +32887,6 @@ "wrap-ansi": "^7.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -33735,15 +32903,6 @@ "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } } } }, @@ -33935,12 +33094,6 @@ "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==", "dev": true }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", @@ -34623,13 +33776,12 @@ } }, "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" } }, "dom-converter": { @@ -35014,29 +34166,32 @@ } }, "eslint": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.13.0.tgz", - "integrity": "sha512-uCORMuOO8tUzJmsdRtrvcGq5qposf7Rw0LwkTJkoDbOycVQtQjmnhZSuLQnozLE4TmAzlMVV45eCHmQ1OpDKUQ==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.1", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.0", - "esquery": "^1.2.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -35044,7 +34199,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -35053,16 +34208,30 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } }, "ansi-styles": { "version": "4.3.0", @@ -35121,28 +34290,59 @@ "esutils": "^2.0.2" } }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, "eslint-visitor-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", "dev": true }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "requires": { "is-glob": "^4.0.1" } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.13.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz", + "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "has-flag": { @@ -35169,6 +34369,15 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -35190,15 +34399,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -35215,9 +34415,9 @@ } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "which": { @@ -35231,88 +34431,44 @@ } } }, - "eslint-config-adidas-babel": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-babel/-/eslint-config-adidas-babel-1.3.1.tgz", - "integrity": "sha512-V+dPDdGr3oDHmmSJgy8yD7AARRdAEQgcbdJvGSrIA3RrtBRyfMbyPgKxAJkVjv8lskrFn6zDJADTdM8gAhj69Q==", - "dev": true, - "requires": {} - }, - "eslint-config-adidas-env": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-env/-/eslint-config-adidas-env-1.3.0.tgz", - "integrity": "sha512-E0awO8ZkN9Ev+1EE5IPqYQ0GNOVjo8GRHldzYW4H1FnmoxrSjgwhvCBznLA1VBQWXBqStgirA6CJbrb1v2/pAA==", - "dev": true, - "requires": {} - }, - "eslint-config-adidas-es5": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es5/-/eslint-config-adidas-es5-1.3.2.tgz", - "integrity": "sha512-s73YgHWZsvxZYHyi4rV2xpQ4TWbki2Ti4ik/FYPD52h1qaSVQdNxdobUqzjDXVfaD+LRjIUt4CAzHxjBBhJqDw==", - "dev": true, - "requires": {} - }, - "eslint-config-adidas-es6": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es6/-/eslint-config-adidas-es6-1.4.1.tgz", - "integrity": "sha512-7FQMuRJvrzRxVyfAvs4LNa5JbEbIWH5ZswmRPTAxoAG+V2iaEYmKpMraEdrWdwXXOrWB8IeNgbesz4Q8zyehwg==", + "eslint-config-airbnb": { + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, "requires": { - "eslint-config-adidas-es5": "~1.3" + "eslint-config-airbnb-base": "^15.0.0", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5" } }, - "eslint-config-adidas-es7": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es7/-/eslint-config-adidas-es7-1.3.1.tgz", - "integrity": "sha512-si/QwIt7JcbuxbDrDcDa3oe6wq+pkyxTM0jhVOawjTMSGyEWqfsjNmqLqDG9/uJZ0Tn1KP6HG6h8tf6n4wL0Iw==", + "eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "requires": { - "eslint-config-adidas-es6": "~1.4" + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, - "eslint-config-adidas-es8": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es8/-/eslint-config-adidas-es8-1.3.1.tgz", - "integrity": "sha512-CQLlG2UL6rzkrxTgRNYWH6vIQrjvqdYpJ9O5Xyb6WMuATvi+bWBkqzgJNoz5HbmUJi4cw2WM//mO+cSO7rwBmA==", + "eslint-config-airbnb-typescript": { + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-16.1.4.tgz", + "integrity": "sha512-dfm2cEaYXh4mCYd+RyJO8+PQfd5/zp8WwrCeRznly5qD9W5tal3KTjgdInYWuEAdwWnNJxWcmQ/HFiA4bfkM1g==", "dev": true, "requires": { - "eslint-config-adidas-es7": "~1.3" - } - }, - "eslint-config-adidas-es9": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-es9/-/eslint-config-adidas-es9-1.3.2.tgz", - "integrity": "sha512-7l3/HI59iy/pasz5kLXOejIgg+8b9K7I/D57151s67qB2ykRGv3Ii0vmYbY2SAdq6PkIpg3NvG2oXIHBPcM3zQ==", - "dev": true, - "requires": { - "eslint-config-adidas-es8": "~1.3" - } - }, - "eslint-config-adidas-jsx": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-jsx/-/eslint-config-adidas-jsx-1.3.0.tgz", - "integrity": "sha512-AalihByaHsBbTDlxSjEoVYgzGOObouaULH+seWnQ+VQndqzfzSjcWuH4G7k+67X+ozxBvvzBZNu4IfVEwvTACQ==", - "dev": true, - "requires": {} - }, - "eslint-config-adidas-react": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-react/-/eslint-config-adidas-react-1.3.2.tgz", - "integrity": "sha512-bSZ/bQZapHcPDjkKsL7/HIorjLytOi3zCgIjjmCLgkpFYU19QBczbnnvYMJfXa3CCTS+h1GzJv4SdexW8r/Pog==", - "dev": true, - "requires": { - "eslint-config-adidas-jsx": "~1.3" - } - }, - "eslint-config-adidas-typescript": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/eslint-config-adidas-typescript/-/eslint-config-adidas-typescript-1.4.2.tgz", - "integrity": "sha512-pfBVaEbQSobsR+7TcDlShr0ehcylb28whAz9sktQ+1HPffrqeWqTFjU1CXDJpxe9P8+MAYviJbCvkHVkzRTIcQ==", - "dev": true, - "requires": { - "@typescript-eslint/eslint-plugin": "^4.14", - "@typescript-eslint/parser": "^4.14", - "eslint-config-adidas-es9": "~1.3" + "eslint-config-airbnb-base": "^15.0.0" } }, "eslint-import-resolver-node": { @@ -35412,165 +34568,45 @@ } } }, - "eslint-plugin-es": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz", - "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==", - "dev": true, - "requires": { - "eslint-utils": "^2.0.0", - "regexpp": "^3.0.0" - } - }, "eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "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.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", + "array-includes": "^3.1.4", + "array.prototype.flat": "^1.2.5", "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.6", + "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.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", - "tsconfig-paths": "^3.9.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - } - } - }, - "eslint-plugin-jest": { - "version": "24.1.5", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.1.5.tgz", - "integrity": "sha512-FIP3lwC8EzEG+rOs1y96cOJmMVpdFNreoDJv29B5vIupVssRi8zrSY3QadogT0K3h1Y8TMxJ6ZSAzYUmFCp2hg==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "^4.0.1" + "object.values": "^1.1.5", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.12.0" } }, "eslint-plugin-jsx-a11y": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz", - "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", + "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", "dev": true, "requires": { - "@babel/runtime": "^7.11.2", + "@babel/runtime": "^7.16.3", "aria-query": "^4.2.2", - "array-includes": "^3.1.1", + "array-includes": "^3.1.4", "ast-types-flow": "^0.0.7", - "axe-core": "^4.0.2", + "axe-core": "^4.3.5", "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.6", - "emoji-regex": "^9.0.0", + "damerau-levenshtein": "^1.0.7", + "emoji-regex": "^9.2.2", "has": "^1.0.3", - "jsx-ast-utils": "^3.1.0", - "language-tags": "^1.0.5" + "jsx-ast-utils": "^3.2.1", + "language-tags": "^1.0.5", + "minimatch": "^3.0.4" }, "dependencies": { "emoji-regex": { @@ -35581,20 +34617,53 @@ } } }, - "eslint-plugin-node": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", - "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==", + "eslint-plugin-react": { + "version": "7.29.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", + "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==", "dev": true, "requires": { - "eslint-plugin-es": "^3.0.0", - "eslint-utils": "^2.0.0", - "ignore": "^5.1.1", - "minimatch": "^3.0.4", - "resolve": "^1.10.1", - "semver": "^6.1.0" + "array-includes": "^3.1.4", + "array.prototype.flatmap": "^1.2.5", + "doctrine": "^2.1.0", + "estraverse": "^5.3.0", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", + "minimatch": "^3.1.2", + "object.entries": "^1.1.5", + "object.fromentries": "^2.0.5", + "object.hasown": "^1.1.0", + "object.values": "^1.1.5", + "prop-types": "^15.8.1", + "resolve": "^2.0.0-next.3", + "semver": "^6.3.0", + "string.prototype.matchall": "^4.0.6" }, "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "resolve": { + "version": "2.0.0-next.3", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", + "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -35603,41 +34672,12 @@ } } }, - "eslint-plugin-promise": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz", - "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==", - "dev": true - }, - "eslint-plugin-react": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz", - "integrity": "sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA==", + "eslint-plugin-react-hooks": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", + "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", "dev": true, - "requires": { - "array-includes": "^3.1.1", - "array.prototype.flatmap": "^1.2.3", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "object.entries": "^1.1.2", - "object.fromentries": "^2.0.2", - "object.values": "^1.1.1", - "prop-types": "^15.7.2", - "resolve": "^1.18.1", - "string.prototype.matchall": "^4.0.2" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - } - } + "requires": {} }, "eslint-scope": { "version": "5.1.1", @@ -35665,13 +34705,13 @@ "dev": true }, "espree": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", - "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { "acorn": "^7.4.0", - "acorn-jsx": "^5.2.0", + "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" } }, @@ -37786,15 +36826,6 @@ "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "dev": true }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -39561,12 +38592,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -40155,6 +39180,12 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", @@ -40848,18 +39879,6 @@ "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==", "dev": true }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -41130,12 +40149,6 @@ "wcwidth": "^1.0.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -41204,15 +40217,6 @@ "signal-exit": "^3.0.2" } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -42114,12 +41118,6 @@ "react-is": "^17.0.1" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", @@ -42412,12 +41410,6 @@ "text-table": "^0.2.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -42698,15 +41690,6 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -42733,12 +41716,6 @@ "requires": { "isexe": "^2.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -42969,23 +41946,6 @@ "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==", "dev": true }, - "@typescript-eslint/eslint-plugin": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz", - "integrity": "sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/type-utils": "5.16.0", - "@typescript-eslint/utils": "5.16.0", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, "@typescript-eslint/experimental-utils": { "version": "5.16.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.16.0.tgz", @@ -42995,96 +41955,12 @@ "@typescript-eslint/utils": "5.16.0" } }, - "@typescript-eslint/parser": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.16.0.tgz", - "integrity": "sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", - "debug": "^4.3.2" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz", - "integrity": "sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz", - "integrity": "sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "5.16.0", - "debug": "^4.3.2", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.16.0.tgz", - "integrity": "sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz", - "integrity": "sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/visitor-keys": "5.16.0", - "debug": "^4.3.2", - "globby": "^11.0.4", - "is-glob": "^4.0.3", - "semver": "^7.3.5", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.16.0.tgz", - "integrity": "sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.16.0", - "@typescript-eslint/types": "5.16.0", - "@typescript-eslint/typescript-estree": "5.16.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz", - "integrity": "sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.16.0", - "eslint-visitor-keys": "^3.0.0" - } - }, "acorn": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", "dev": true }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -43371,12 +42247,6 @@ "domhandler": "^4.2.0" } }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, "emojis-list": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", @@ -43476,53 +42346,6 @@ "string-natural-compare": "^3.0.1" } }, - "eslint-plugin-import": { - "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", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "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.12.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, "eslint-plugin-jest": { "version": "25.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz", @@ -43532,82 +42355,6 @@ "@typescript-eslint/experimental-utils": "^5.0.0" } }, - "eslint-plugin-jsx-a11y": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", - "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==", - "dev": true, - "requires": { - "@babel/runtime": "^7.16.3", - "aria-query": "^4.2.2", - "array-includes": "^3.1.4", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.3.5", - "axobject-query": "^2.2.0", - "damerau-levenshtein": "^1.0.7", - "emoji-regex": "^9.2.2", - "has": "^1.0.3", - "jsx-ast-utils": "^3.2.1", - "language-tags": "^1.0.5", - "minimatch": "^3.0.4" - } - }, - "eslint-plugin-react": { - "version": "7.29.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz", - "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==", - "dev": true, - "requires": { - "array-includes": "^3.1.4", - "array.prototype.flatmap": "^1.2.5", - "doctrine": "^2.1.0", - "estraverse": "^5.3.0", - "jsx-ast-utils": "^2.4.1 || ^3.0.0", - "minimatch": "^3.1.2", - "object.entries": "^1.1.5", - "object.fromentries": "^2.0.5", - "object.hasown": "^1.1.0", - "object.values": "^1.1.5", - "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", - "semver": "^6.3.0", - "string.prototype.matchall": "^4.0.6" - }, - "dependencies": { - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "eslint-plugin-react-hooks": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz", - "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==", - "dev": true, - "requires": {} - }, "eslint-plugin-testing-library": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.1.0.tgz", @@ -44348,15 +43095,6 @@ "source-map-js": "^1.0.1" } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -44449,12 +43187,6 @@ "requires": { "isexe": "^2.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true } } }, @@ -45557,14 +44289,40 @@ "dev": true }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } } }, "snapdragon": { @@ -46015,23 +44773,6 @@ "requires": { "char-regex": "^1.0.2", "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } } }, "string-natural-compare": { @@ -46162,6 +44903,15 @@ } } }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -46329,18 +45079,6 @@ "write-file-atomic": "^3.0.3" }, "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, "autoprefixer": { "version": "9.8.6", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", @@ -46506,28 +45244,6 @@ "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - } - } - }, "string-width": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", @@ -46539,15 +45255,6 @@ "strip-ansi": "^6.0.0" } }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -46557,18 +45264,6 @@ "has-flag": "^3.0.0" } }, - "table": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.3.tgz", - "integrity": "sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "lodash": "^4.17.20", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" - } - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -46815,47 +45510,51 @@ "dev": true }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "dependencies": { - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "ajv": { + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz", + "integrity": "sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - }, - "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "requires": { - "ansi-regex": "^4.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" } } } @@ -48820,12 +47519,6 @@ "strip-ansi": "^6.0.0" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -48860,15 +47553,6 @@ "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } } } }, @@ -48924,6 +47608,12 @@ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yaml": { "version": "1.10.2", "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", @@ -48945,12 +47635,6 @@ "yargs-parser": "^20.2.2" }, "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -48968,15 +47652,6 @@ "strip-ansi": "^6.0.1" } }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 798e95b4..e0198735 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,6 @@ "workbox-strategies": "^6.5.1" }, "devDependencies": { - "@shlinkio/eslint-config-js-coding-standard": "~1.2.2", "@stryker-mutator/core": "^5.6.1", "@stryker-mutator/jest-runner": "^5.6.1", "@stryker-mutator/typescript-checker": "^5.6.1", @@ -85,6 +84,8 @@ "@types/react-redux": "^7.1.23", "@types/react-tag-autocomplete": "^6.1.1", "@types/uuid": "^8.3.4", + "@typescript-eslint/eslint-plugin": "^5.16.0", + "@typescript-eslint/parser": "^5.16.0", "@wojtekmaj/enzyme-adapter-react-17": "0.6.5", "adm-zip": "^0.5.9", "babel-jest": "^27.5.1", @@ -92,6 +93,8 @@ "dart-sass": "^1.25.0", "enzyme": "^3.11.0", "eslint": "^7.13.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-airbnb-typescript": "^16.1.4", "identity-obj-proxy": "^3.0.0", "jest": "^27.5.1", "react-scripts": "^5.0.0", diff --git a/src/api/ShlinkApiError.tsx b/src/api/ShlinkApiError.tsx index 6ba2c01a..ed3c5708 100644 --- a/src/api/ShlinkApiError.tsx +++ b/src/api/ShlinkApiError.tsx @@ -9,8 +9,10 @@ export interface ShlinkApiErrorProps { export const ShlinkApiError = ({ errorData, fallbackMessage }: ShlinkApiErrorProps) => ( <> {errorData?.detail ?? fallbackMessage} - {isInvalidArgumentError(errorData) && -

Invalid elements: [{errorData.invalidElements.join(', ')}]

- } + {isInvalidArgumentError(errorData) && ( +

+ Invalid elements: [{errorData.invalidElements.join(', ')}] +

+ )} ); diff --git a/src/api/services/ShlinkApiClient.ts b/src/api/services/ShlinkApiClient.ts index 6efea6d8..cf9220e7 100644 --- a/src/api/services/ShlinkApiClient.ts +++ b/src/api/services/ShlinkApiClient.ts @@ -21,7 +21,7 @@ import { import { stringifyQuery } from '../../utils/helpers/query'; import { orderToString } from '../../utils/helpers/ordering'; -const buildShlinkBaseUrl = (url: string) => url ? `${url}/rest/v2` : ''; +const buildShlinkBaseUrl = (url: string) => (url ? `${url}/rest/v2` : ''); const rejectNilProps = reject(isNil); const normalizeOrderByInParams = (params: ShlinkShortUrlsListParams): ShlinkShortUrlsListNormalizedParams => { const { orderBy = {}, ...rest } = params; @@ -91,10 +91,9 @@ export default class ShlinkApiClient { public readonly updateShortUrl = async ( shortCode: string, domain: OptionalString, - data: ShlinkShortUrlData, + edit: ShlinkShortUrlData, ): Promise => - this.performRequest(`/short-urls/${shortCode}`, 'PATCH', { domain }, data) - .then(({ data }) => data); + this.performRequest(`/short-urls/${shortCode}`, 'PATCH', { domain }, edit).then(({ data }) => data); public readonly listTags = async (): Promise => this.performRequest<{ tags: ShlinkTagsResponse }>('/tags', 'GET', { withStats: 'true' }) diff --git a/src/app/App.tsx b/src/app/App.tsx index afe7c2e9..7f5aed1b 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -23,7 +23,7 @@ const App = ( MenuLayout: FC, CreateServer: FC, EditServer: FC, - Settings: FC, + SettingsComp: FC, ManageServers: FC, ShlinkVersionsContainer: FC, ) => ({ fetchServers, servers, settings, appUpdated, resetAppUpdate }: AppProps) => { @@ -47,7 +47,7 @@ const App = (
} /> - } /> + } /> } /> } /> } /> diff --git a/src/app/reducers/appUpdates.ts b/src/app/reducers/appUpdates.ts index bf3de537..36db12ec 100644 --- a/src/app/reducers/appUpdates.ts +++ b/src/app/reducers/appUpdates.ts @@ -1,10 +1,8 @@ import { Action } from 'redux'; import { buildActionCreator, buildReducer } from '../../utils/helpers/redux'; -/* eslint-disable padding-line-between-statements */ export const APP_UPDATE_AVAILABLE = 'shlink/appUpdates/APP_UPDATE_AVAILABLE'; export const RESET_APP_UPDATE = 'shlink/appUpdates/RESET_APP_UPDATE'; -/* eslint-enable padding-line-between-statements */ const initialState = false; diff --git a/src/app/services/provideServices.ts b/src/app/services/provideServices.ts index 50bb8f12..c26e3cda 100644 --- a/src/app/services/provideServices.ts +++ b/src/app/services/provideServices.ts @@ -17,7 +17,7 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { 'ManageServers', 'ShlinkVersionsContainer', ); - bottle.decorator('App', connect([ 'servers', 'settings', 'appUpdated' ], [ 'fetchServers', 'resetAppUpdate' ])); + bottle.decorator('App', connect(['servers', 'settings', 'appUpdated'], ['fetchServers', 'resetAppUpdate'])); // Actions bottle.serviceFactory('appUpdateAvailable', () => appUpdateAvailable); diff --git a/src/common/AppUpdateBanner.tsx b/src/common/AppUpdateBanner.tsx index 11191415..4c55229c 100644 --- a/src/common/AppUpdateBanner.tsx +++ b/src/common/AppUpdateBanner.tsx @@ -13,7 +13,7 @@ interface AppUpdateBannerProps { } export const AppUpdateBanner: FC = ({ isOpen, toggle, forceUpdate }) => { - const [ isUpdating,, setUpdating ] = useToggle(); + const [isUpdating,, setUpdating] = useToggle(); const update = () => { setUpdating(); forceUpdate(); diff --git a/src/common/AsideMenu.tsx b/src/common/AsideMenu.tsx index 08ed301d..826ff3b6 100644 --- a/src/common/AsideMenu.tsx +++ b/src/common/AsideMenu.tsx @@ -17,7 +17,6 @@ import './AsideMenu.scss'; export interface AsideMenuProps { selectedServer: SelectedServer; - className?: string; showOnMobile?: boolean; } diff --git a/src/common/ErrorHandler.tsx b/src/common/ErrorHandler.tsx index 8bf828c8..c2c67faa 100644 --- a/src/common/ErrorHandler.tsx +++ b/src/common/ErrorHandler.tsx @@ -6,7 +6,7 @@ interface ErrorHandlerState { hasError: boolean; } -const ErrorHandler = ( +const ErrorHandlerCreator = ( { location }: Window, { error }: Console, ) => class ErrorHandler extends Component { @@ -26,7 +26,8 @@ const ErrorHandler = ( } public render(): ReactNode { - if (this.state.hasError) { + const { hasError } = this.state; + if (hasError) { return (
@@ -39,8 +40,9 @@ const ErrorHandler = ( ); } - return this.props.children; + const { children } = this.props; + return children; } }; -export default ErrorHandler; +export default ErrorHandlerCreator; diff --git a/src/common/Home.tsx b/src/common/Home.tsx index 853c9d49..f2b2828d 100644 --- a/src/common/Home.tsx +++ b/src/common/Home.tsx @@ -22,7 +22,6 @@ const Home = ({ servers }: HomeProps) => { useEffect(() => { // Try to redirect to the first server marked as auto-connect const autoConnectServer = serversList.find(({ autoConnect }) => autoConnect); - autoConnectServer && navigate(`/server/${autoConnectServer.id}`); }, []); diff --git a/src/common/MainHeader.tsx b/src/common/MainHeader.tsx index 0fdaa8b0..90502a32 100644 --- a/src/common/MainHeader.tsx +++ b/src/common/MainHeader.tsx @@ -9,11 +9,11 @@ import { ShlinkLogo } from './img/ShlinkLogo'; import './MainHeader.scss'; const MainHeader = (ServersDropdown: FC) => () => { - const [ isOpen, toggleOpen, , close ] = useToggle(); + const [isOpen, toggleOpen, , close] = useToggle(); const location = useLocation(); const { pathname } = location; - useEffect(close, [ location ]); + useEffect(close, [location]); const settingsPath = '/settings'; const toggleClass = classNames('main-header__toggle-icon', { 'main-header__toggle-icon--opened': isOpen }); diff --git a/src/common/MenuLayout.tsx b/src/common/MenuLayout.tsx index 8e9ab6bd..76361b2e 100644 --- a/src/common/MenuLayout.tsx +++ b/src/common/MenuLayout.tsx @@ -31,10 +31,10 @@ const MenuLayout = ( ManageDomains: FC, ) => withSelectedServer(({ selectedServer, sidebarNotPresent, sidebarPresent }) => { const location = useLocation(); - const [ sidebarVisible, toggleSidebar, showSidebar, hideSidebar ] = useToggle(); + const [sidebarVisible, toggleSidebar, showSidebar, hideSidebar] = useToggle(); const showContent = isReachableServer(selectedServer); - useEffect(() => hideSidebar(), [ location ]); + useEffect(() => hideSidebar(), [location]); useEffect(() => { showContent && sidebarPresent(); diff --git a/src/common/ScrollToTop.tsx b/src/common/ScrollToTop.tsx index 66c23665..aae4a7f5 100644 --- a/src/common/ScrollToTop.tsx +++ b/src/common/ScrollToTop.tsx @@ -6,7 +6,7 @@ const ScrollToTop = (): FC => ({ children }) => { useEffect(() => { scrollTo(0, 0); - }, [ location ]); + }, [location]); return <>{children}; }; diff --git a/src/common/ShlinkVersions.tsx b/src/common/ShlinkVersions.tsx index 50277ab0..5210e50e 100644 --- a/src/common/ShlinkVersions.tsx +++ b/src/common/ShlinkVersions.tsx @@ -22,9 +22,9 @@ const ShlinkVersions = ({ selectedServer, clientVersion = SHLINK_WEB_CLIENT_VERS return ( - {isReachableServer(selectedServer) && + {isReachableServer(selectedServer) && ( <>Server: - - } + )} Client: ); diff --git a/src/common/reducers/sidebar.ts b/src/common/reducers/sidebar.ts index 409ebb1e..d90b0d5a 100644 --- a/src/common/reducers/sidebar.ts +++ b/src/common/reducers/sidebar.ts @@ -1,10 +1,8 @@ import { Action } from 'redux'; import { buildActionCreator, buildReducer } from '../../utils/helpers/redux'; -/* eslint-disable padding-line-between-statements */ export const SIDEBAR_PRESENT = 'shlink/common/SIDEBAR_PRESENT'; export const SIDEBAR_NOT_PRESENT = 'shlink/common/SIDEBAR_NOT_PRESENT'; -/* eslint-enable padding-line-between-statements */ export interface Sidebar { sidebarPresent: boolean; diff --git a/src/common/services/provideServices.ts b/src/common/services/provideServices.ts index 05a20a0f..73f230a4 100644 --- a/src/common/services/provideServices.ts +++ b/src/common/services/provideServices.ts @@ -29,7 +29,7 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { bottle.serviceFactory('Home', () => Home); bottle.decorator('Home', withoutSelectedServer); - bottle.decorator('Home', connect([ 'servers' ], [ 'resetSelectedServer' ])); + bottle.decorator('Home', connect(['servers'], ['resetSelectedServer'])); bottle.serviceFactory( 'MenuLayout', @@ -47,12 +47,12 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { 'EditShortUrl', 'ManageDomains', ); - bottle.decorator('MenuLayout', connect([ 'selectedServer' ], [ 'selectServer', 'sidebarPresent', 'sidebarNotPresent' ])); + bottle.decorator('MenuLayout', connect(['selectedServer'], ['selectServer', 'sidebarPresent', 'sidebarNotPresent'])); bottle.serviceFactory('AsideMenu', AsideMenu, 'DeleteServerButton'); bottle.serviceFactory('ShlinkVersionsContainer', () => ShlinkVersionsContainer); - bottle.decorator('ShlinkVersionsContainer', connect([ 'selectedServer', 'sidebar' ])); + bottle.decorator('ShlinkVersionsContainer', connect(['selectedServer', 'sidebar'])); bottle.serviceFactory('ErrorHandler', ErrorHandler, 'window', 'console'); diff --git a/src/container/index.ts b/src/container/index.ts index 8ad16e7b..4618d561 100644 --- a/src/container/index.ts +++ b/src/container/index.ts @@ -20,8 +20,8 @@ const bottle = new Bottle(); export const { container } = bottle; -const lazyService = (container: IContainer, serviceName: string) => - (...args: any[]) => (container[serviceName] as T)(...args) as K; +const lazyService = (cont: IContainer, serviceName: string) => + (...args: any[]) => (cont[serviceName] as T)(...args) as K; const mapActionService = (map: LazyActionMap, actionName: string): LazyActionMap => ({ ...map, // Wrap actual action service in a function so that it is lazily created the first time it is called diff --git a/src/container/store.ts b/src/container/store.ts index e99dbd8f..51b44d4b 100644 --- a/src/container/store.ts +++ b/src/container/store.ts @@ -6,10 +6,10 @@ import { migrateDeprecatedSettings } from '../settings/helpers'; import { ShlinkState } from './types'; const isProduction = process.env.NODE_ENV !== 'production'; -const composeEnhancers: Function = !isProduction && (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; +const composeEnhancers: Function = !isProduction ? (window as any).__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : compose; const localStorageConfig: RLSOptions = { - states: [ 'settings', 'servers' ], + states: ['settings', 'servers'], namespace: 'shlink', namespaceSeparator: '.', debounce: 300, diff --git a/src/domains/DomainRow.tsx b/src/domains/DomainRow.tsx index da43f44d..e5173ad2 100644 --- a/src/domains/DomainRow.tsx +++ b/src/domains/DomainRow.tsx @@ -39,7 +39,7 @@ const DefaultDomain: FC = () => ( export const DomainRow: FC = ( { domain, editDomainRedirects, checkDomainHealth, defaultRedirects, selectedServer }, ) => { - const [ isOpen, toggle ] = useToggle(); + const [isOpen, toggle] = useToggle(); const { domain: authority, isDefault, redirects, status } = domain; const canEditDomain = !isDefault || supportsDefaultDomainRedirectsEdition(selectedServer); diff --git a/src/domains/DomainSelector.tsx b/src/domains/DomainSelector.tsx index f74c7b3a..06a00ba7 100644 --- a/src/domains/DomainSelector.tsx +++ b/src/domains/DomainSelector.tsx @@ -19,7 +19,7 @@ interface DomainSelectorConnectProps extends DomainSelectorProps { } export const DomainSelector = ({ listDomains, value, domainsList, onChange }: DomainSelectorConnectProps) => { - const [ inputDisplayed,, showInput, hideInput ] = useToggle(); + const [inputDisplayed,, showInput, hideInput] = useToggle(); const { domains } = domainsList; const valueIsEmpty = isEmpty(value); const unselectDomain = () => onChange(''); @@ -56,7 +56,7 @@ export const DomainSelector = ({ listDomains, value, domainsList, onChange }: Do {domains.map(({ domain, isDefault }) => ( onChange(domain)} > {domain} diff --git a/src/domains/ManageDomains.tsx b/src/domains/ManageDomains.tsx index 6f855cd0..1b0ddfc0 100644 --- a/src/domains/ManageDomains.tsx +++ b/src/domains/ManageDomains.tsx @@ -18,7 +18,7 @@ interface ManageDomainsProps { selectedServer: SelectedServer; } -const headers = [ '', 'Domain', 'Base path redirect', 'Regular 404 redirect', 'Invalid short URL redirect', '', '' ]; +const headers = ['', 'Domain', 'Base path redirect', 'Regular 404 redirect', 'Invalid short URL redirect', '', '']; export const ManageDomains: FC = ( { listDomains, domainsList, filterDomains, editDomainRedirects, checkDomainHealth, selectedServer }, diff --git a/src/domains/helpers/DomainStatusIcon.tsx b/src/domains/helpers/DomainStatusIcon.tsx index 03952883..03ebf168 100644 --- a/src/domains/helpers/DomainStatusIcon.tsx +++ b/src/domains/helpers/DomainStatusIcon.tsx @@ -18,7 +18,7 @@ interface DomainStatusIconProps { export const DomainStatusIcon: FC = ({ status, matchMedia = window.matchMedia }) => { const ref = useRef(); const matchesMobile = () => matchMedia('(max-width: 991px)').matches; - const [ isMobile, setIsMobile ] = useState(matchesMobile()); + const [isMobile, setIsMobile] = useState(matchesMobile()); useEffect(() => { const listener = () => setIsMobile(matchesMobile()); diff --git a/src/domains/helpers/EditDomainRedirectsModal.tsx b/src/domains/helpers/EditDomainRedirectsModal.tsx index 1fd3c758..2706a210 100644 --- a/src/domains/helpers/EditDomainRedirectsModal.tsx +++ b/src/domains/helpers/EditDomainRedirectsModal.tsx @@ -25,9 +25,9 @@ const FormGroup: FC = ({ isLast, ... export const EditDomainRedirectsModal: FC = ( { isOpen, toggle, domain, editDomainRedirects }, ) => { - const [ baseUrlRedirect, setBaseUrlRedirect ] = useState(domain.redirects?.baseUrlRedirect ?? ''); - const [ regular404Redirect, setRegular404Redirect ] = useState(domain.redirects?.regular404Redirect ?? ''); - const [ invalidShortUrlRedirect, setInvalidShortUrlRedirect ] = useState( + const [baseUrlRedirect, setBaseUrlRedirect] = useState(domain.redirects?.baseUrlRedirect ?? ''); + const [regular404Redirect, setRegular404Redirect] = useState(domain.redirects?.regular404Redirect ?? ''); + const [invalidShortUrlRedirect, setInvalidShortUrlRedirect] = useState( domain.redirects?.invalidShortUrlRedirect ?? '', ); const handleSubmit = handleEventPreventingDefault(async () => editDomainRedirects(domain.domain, { diff --git a/src/domains/reducers/domainRedirects.ts b/src/domains/reducers/domainRedirects.ts index a0969aea..8cb65d93 100644 --- a/src/domains/reducers/domainRedirects.ts +++ b/src/domains/reducers/domainRedirects.ts @@ -5,11 +5,9 @@ import { GetState } from '../../container/types'; import { ApiErrorAction } from '../../api/types/actions'; import { parseApiError } from '../../api/utils'; -/* eslint-disable padding-line-between-statements */ export const EDIT_DOMAIN_REDIRECTS_START = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_START'; export const EDIT_DOMAIN_REDIRECTS_ERROR = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS_ERROR'; export const EDIT_DOMAIN_REDIRECTS = 'shlink/domainRedirects/EDIT_DOMAIN_REDIRECTS'; -/* eslint-enable padding-line-between-statements */ export interface EditDomainRedirectsAction extends Action { domain: string; @@ -21,10 +19,10 @@ export const editDomainRedirects = (buildShlinkApiClient: ShlinkApiClientBuilder domainRedirects: Partial, ) => async (dispatch: Dispatch, getState: GetState) => { dispatch({ type: EDIT_DOMAIN_REDIRECTS_START }); - const { editDomainRedirects } = buildShlinkApiClient(getState); + const { editDomainRedirects: shlinkEditDomainRedirects } = buildShlinkApiClient(getState); try { - const redirects = await editDomainRedirects({ domain, ...domainRedirects }); + const redirects = await shlinkEditDomainRedirects({ domain, ...domainRedirects }); dispatch({ type: EDIT_DOMAIN_REDIRECTS, domain, redirects }); } catch (e: any) { diff --git a/src/domains/reducers/domainsList.ts b/src/domains/reducers/domainsList.ts index 1769b189..1868c689 100644 --- a/src/domains/reducers/domainsList.ts +++ b/src/domains/reducers/domainsList.ts @@ -10,13 +10,11 @@ import { hasServerData } from '../../servers/data'; import { replaceAuthorityFromUri } from '../../utils/helpers/uri'; import { EDIT_DOMAIN_REDIRECTS, EditDomainRedirectsAction } from './domainRedirects'; -/* eslint-disable padding-line-between-statements */ export const LIST_DOMAINS_START = 'shlink/domainsList/LIST_DOMAINS_START'; export const LIST_DOMAINS_ERROR = 'shlink/domainsList/LIST_DOMAINS_ERROR'; export const LIST_DOMAINS = 'shlink/domainsList/LIST_DOMAINS'; export const FILTER_DOMAINS = 'shlink/domainsList/FILTER_DOMAINS'; export const VALIDATE_DOMAIN = 'shlink/domainsList/VALIDATE_DOMAIN'; -/* eslint-enable padding-line-between-statements */ export interface DomainsList { domains: Domain[]; @@ -55,10 +53,10 @@ export type DomainsCombinedAction = ListDomainsAction & ValidateDomain; export const replaceRedirectsOnDomain = (domain: string, redirects: ShlinkDomainRedirects) => - (d: Domain): Domain => d.domain !== domain ? d : { ...d, redirects }; + (d: Domain): Domain => (d.domain !== domain ? d : { ...d, redirects }); export const replaceStatusOnDomain = (domain: string, status: DomainStatus) => - (d: Domain): Domain => d.domain !== domain ? d : { ...d, status }; + (d: Domain): Domain => (d.domain !== domain ? d : { ...d, status }); export default buildReducer({ [LIST_DOMAINS_START]: () => ({ ...initialState, loading: true }), @@ -86,15 +84,15 @@ export const listDomains = (buildShlinkApiClient: ShlinkApiClientBuilder) => () getState: GetState, ) => { dispatch({ type: LIST_DOMAINS_START }); - const { listDomains } = buildShlinkApiClient(getState); + const { listDomains: shlinkListDomains } = buildShlinkApiClient(getState); try { - const { domains, defaultRedirects } = await listDomains().then(({ data, defaultRedirects }) => ({ + const resp = await shlinkListDomains().then(({ data, defaultRedirects }) => ({ domains: data.map((domain): Domain => ({ ...domain, status: 'validating' })), defaultRedirects, })); - dispatch({ type: LIST_DOMAINS, domains, defaultRedirects }); + dispatch({ type: LIST_DOMAINS, ...resp }); } catch (e: any) { dispatch({ type: LIST_DOMAINS_ERROR, errorData: parseApiError(e) }); } diff --git a/src/domains/services/provideServices.ts b/src/domains/services/provideServices.ts index 9e440b1a..9a4ba7fe 100644 --- a/src/domains/services/provideServices.ts +++ b/src/domains/services/provideServices.ts @@ -8,12 +8,12 @@ import { editDomainRedirects } from '../reducers/domainRedirects'; const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { // Components bottle.serviceFactory('DomainSelector', () => DomainSelector); - bottle.decorator('DomainSelector', connect([ 'domainsList' ], [ 'listDomains' ])); + bottle.decorator('DomainSelector', connect(['domainsList'], ['listDomains'])); bottle.serviceFactory('ManageDomains', () => ManageDomains); bottle.decorator('ManageDomains', connect( - [ 'domainsList', 'selectedServer' ], - [ 'listDomains', 'filterDomains', 'editDomainRedirects', 'checkDomainHealth' ], + ['domainsList', 'selectedServer'], + ['listDomains', 'filterDomains', 'editDomainRedirects', 'checkDomainHealth'], )); // Actions diff --git a/src/mercure/helpers/boundToMercureHub.tsx b/src/mercure/helpers/boundToMercureHub.tsx index bc7394b7..a9436237 100644 --- a/src/mercure/helpers/boundToMercureHub.tsx +++ b/src/mercure/helpers/boundToMercureHub.tsx @@ -23,7 +23,7 @@ export function boundToMercureHub( const params = useParams(); useEffect(() => { - const onMessage = (visit: CreateVisit) => interval ? pendingUpdates.add(visit) : createNewVisits([ visit ]); + const onMessage = (visit: CreateVisit) => (interval ? pendingUpdates.add(visit) : createNewVisits([visit])); const topics = getTopicsForProps(props, params); const closeEventSource = bindToMercureTopic(mercureInfo, topics, onMessage, loadMercureInfo); @@ -32,12 +32,12 @@ export function boundToMercureHub( } const timer = setInterval(() => { - createNewVisits([ ...pendingUpdates ]); + createNewVisits([...pendingUpdates]); pendingUpdates.clear(); }, interval * 1000 * 60); return pipe(() => clearInterval(timer), () => closeEventSource?.()); - }, [ mercureInfo ]); + }, [mercureInfo]); return ; }; diff --git a/src/mercure/reducers/mercureInfo.ts b/src/mercure/reducers/mercureInfo.ts index 5684b611..ca882138 100644 --- a/src/mercure/reducers/mercureInfo.ts +++ b/src/mercure/reducers/mercureInfo.ts @@ -4,11 +4,9 @@ import { GetState } from '../../container/types'; import { buildReducer } from '../../utils/helpers/redux'; import { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder'; -/* eslint-disable padding-line-between-statements */ export const GET_MERCURE_INFO_START = 'shlink/mercure/GET_MERCURE_INFO_START'; export const GET_MERCURE_INFO_ERROR = 'shlink/mercure/GET_MERCURE_INFO_ERROR'; export const GET_MERCURE_INFO = 'shlink/mercure/GET_MERCURE_INFO'; -/* eslint-enable padding-line-between-statements */ export interface MercureInfo { token?: string; diff --git a/src/servers/CreateServer.tsx b/src/servers/CreateServer.tsx index e1428013..6bdf75d7 100644 --- a/src/servers/CreateServer.tsx +++ b/src/servers/CreateServer.tsx @@ -32,10 +32,10 @@ const CreateServer = (ImportServersBtn: FC, useStateFlagT const navigate = useNavigate(); const goBack = useGoBack(); const hasServers = !!Object.keys(servers).length; - const [ serversImported, setServersImported ] = useStateFlagTimeout(false, SHOW_IMPORT_MSG_TIME); - const [ errorImporting, setErrorImporting ] = useStateFlagTimeout(false, SHOW_IMPORT_MSG_TIME); - const [ isConfirmModalOpen, toggleConfirmModal ] = useToggle(); - const [ serverData, setServerData ] = useState(); + const [serversImported, setServersImported] = useStateFlagTimeout(false, SHOW_IMPORT_MSG_TIME); + const [errorImporting, setErrorImporting] = useStateFlagTimeout(false, SHOW_IMPORT_MSG_TIME); + const [isConfirmModalOpen, toggleConfirmModal] = useToggle(); + const [serverData, setServerData] = useState(); const save = () => { if (!serverData) { return; @@ -53,13 +53,14 @@ const CreateServer = (ImportServersBtn: FC, useStateFlagT ); serverExists ? toggleConfirmModal() : save(); - }, [ serverData ]); + }, [serverData]); return ( Add new server} onSubmit={setServerData}> - {!hasServers && - } + {!hasServers && ( + + )} {hasServers && } @@ -69,7 +70,7 @@ const CreateServer = (ImportServersBtn: FC, useStateFlagT diff --git a/src/servers/DeleteServerButton.tsx b/src/servers/DeleteServerButton.tsx index 4e10969a..21d40fc4 100644 --- a/src/servers/DeleteServerButton.tsx +++ b/src/servers/DeleteServerButton.tsx @@ -14,7 +14,7 @@ export interface DeleteServerButtonProps { const DeleteServerButton = (DeleteServerModal: FC): FC => ( { server, className, children, textClassName }, ) => { - const [ isModalOpen, , showModal, hideModal ] = useToggle(); + const [isModalOpen, , showModal, hideModal] = useToggle(); return ( <> diff --git a/src/servers/DeleteServerModal.tsx b/src/servers/DeleteServerModal.tsx index 499479a8..9679dd7c 100644 --- a/src/servers/DeleteServerModal.tsx +++ b/src/servers/DeleteServerModal.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap'; +import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap'; import { useNavigate } from 'react-router-dom'; import { ServerWithId } from './data'; @@ -37,8 +37,8 @@ const DeleteServerModal: FC = (

- - + + ); diff --git a/src/servers/ManageServers.tsx b/src/servers/ManageServers.tsx index 18c08141..032fe203 100644 --- a/src/servers/ManageServers.tsx +++ b/src/servers/ManageServers.tsx @@ -26,16 +26,16 @@ export const ManageServers = ( ManageServersRow: FC, ): FC => ({ servers }) => { const allServers = Object.values(servers); - const [ serversList, setServersList ] = useState(allServers); + const [serversList, setServersList] = useState(allServers); const filterServers = (searchTerm: string) => setServersList( allServers.filter(({ name, url }) => `${name} ${url}`.match(searchTerm)), ); const hasAutoConnect = serversList.some(({ autoConnect }) => !!autoConnect); - const [ errorImporting, setErrorImporting ] = useStateFlagTimeout(false, SHOW_IMPORT_MSG_TIME); + const [errorImporting, setErrorImporting] = useStateFlagTimeout(false, SHOW_IMPORT_MSG_TIME); useEffect(() => { setServersList(Object.values(servers)); - }, [ servers ]); + }, [servers]); return ( @@ -61,17 +61,17 @@ export const ManageServers = ( - {hasAutoConnect && - {!serversList.length && } - {serversList.map((server) => - ) - } + {serversList.map((server) => ( + + ))}
} + {hasAutoConnect && } Name Base URL +
No servers found.
diff --git a/src/servers/ManageServersRowDropdown.tsx b/src/servers/ManageServersRowDropdown.tsx index 7c85e49f..51863d58 100644 --- a/src/servers/ManageServersRowDropdown.tsx +++ b/src/servers/ManageServersRowDropdown.tsx @@ -25,8 +25,8 @@ interface ManageServersRowDropdownConnectProps extends ManageServersRowDropdownP export const ManageServersRowDropdown = ( DeleteServerModal: FC, ): FC => ({ server, setAutoConnect }) => { - const [ isMenuOpen, toggleMenu ] = useToggle(); - const [ isModalOpen,, showModal, hideModal ] = useToggle(); + const [isMenuOpen, toggleMenu] = useToggle(); + const [isModalOpen,, showModal, hideModal] = useToggle(); const serverUrl = `/server/${server.id}`; const { autoConnect: isAutoConnect } = server; const autoConnectIcon = isAutoConnect ? toggleOffIcon : toggleOnIcon; diff --git a/src/servers/Overview.tsx b/src/servers/Overview.tsx index b66e5213..fc29a675 100644 --- a/src/servers/Overview.tsx +++ b/src/servers/Overview.tsx @@ -109,4 +109,4 @@ export const Overview = ( ); -}, () => [ Topics.visits, Topics.orphanVisits ]); +}, () => [Topics.visits, Topics.orphanVisits]); diff --git a/src/servers/data/index.ts b/src/servers/data/index.ts index a06c390e..7ee3351e 100644 --- a/src/servers/data/index.ts +++ b/src/servers/data/index.ts @@ -35,15 +35,15 @@ export const hasServerData = (server: SelectedServer | ServerData): server is Se !!(server as ServerData)?.url && !!(server as ServerData)?.apiKey; export const isServerWithId = (server: SelectedServer | ServerWithId): server is ServerWithId => - !!server?.hasOwnProperty('id'); + !!(server as ServerWithId)?.id; export const isReachableServer = (server: SelectedServer): server is ReachableServer => - !!server?.hasOwnProperty('version'); + !!(server as ReachableServer)?.version; export const isNotFoundServer = (server: SelectedServer): server is NotFoundServer => - !!server?.hasOwnProperty('serverNotFound'); + !!(server as NotFoundServer)?.serverNotFound; -export const getServerId = (server: SelectedServer) => isServerWithId(server) ? server.id : ''; +export const getServerId = (server: SelectedServer) => (isServerWithId(server) ? server.id : ''); export const serverWithIdToServerData = (server: ServerWithId): ServerData => - omit([ 'id', 'autoConnect' ], server); + omit(['id', 'autoConnect'], server); diff --git a/src/servers/helpers/DuplicatedServersModal.tsx b/src/servers/helpers/DuplicatedServersModal.tsx index b2fb3d78..2f8a43c1 100644 --- a/src/servers/helpers/DuplicatedServersModal.tsx +++ b/src/servers/helpers/DuplicatedServersModal.tsx @@ -20,12 +20,12 @@ export const DuplicatedServersModal: FC = (

{hasMultipleServers ? 'The next servers already exist:' : 'There is already a server with:'}

    - {duplicatedServers.map(({ url, apiKey }, index) => !hasMultipleServers ? ( + {duplicatedServers.map(({ url, apiKey }, index) => (!hasMultipleServers ? (
  • URL: {url}
  • API key: {apiKey}
  • - ) :
  • {url} - {apiKey}
  • )} + ) :
  • {url} - {apiKey}
  • ))}
{hasMultipleServers ? 'Do you want to ignore duplicated servers' : 'Do you want to save this server anyway'}? diff --git a/src/servers/helpers/HighlightCard.tsx b/src/servers/helpers/HighlightCard.tsx index d274f4c5..5f13edeb 100644 --- a/src/servers/helpers/HighlightCard.tsx +++ b/src/servers/helpers/HighlightCard.tsx @@ -10,7 +10,7 @@ export interface HighlightCardProps { link?: string | false; } -const buildExtraProps = (link?: string | false) => !link ? {} : { tag: Link, to: link }; +const buildExtraProps = (link?: string | false) => (!link ? {} : { tag: Link, to: link }); export const HighlightCard: FC = ({ children, title, link }) => ( diff --git a/src/servers/helpers/ImportServersBtn.tsx b/src/servers/helpers/ImportServersBtn.tsx index 2a91e71c..abc5be8c 100644 --- a/src/servers/helpers/ImportServersBtn.tsx +++ b/src/servers/helpers/ImportServersBtn.tsx @@ -1,4 +1,4 @@ -import { useRef, RefObject, ChangeEvent, MutableRefObject, FC, useState, useEffect } from 'react'; +import { useRef, RefObject, ChangeEvent, MutableRefObject, useState, useEffect, FC } from 'react'; import { Button, UncontrolledTooltip } from 'reactstrap'; import { complement, pipe } from 'ramda'; import { faFileUpload as importIcon } from '@fortawesome/free-solid-svg-icons'; @@ -38,9 +38,9 @@ const ImportServersBtn = ({ importServersFromFile }: ServersImporter): FC { const ref = fileRef ?? useRef(); - const [ serversToCreate, setServersToCreate ] = useState(); - const [ duplicatedServers, setDuplicatedServers ] = useState([]); - const [ isModalOpen,, showModal, hideModal ] = useToggle(); + const [serversToCreate, setServersToCreate] = useState(); + const [duplicatedServers, setDuplicatedServers] = useState([]); + const [isModalOpen,, showModal, hideModal] = useToggle(); const create = pipe(createServers, onImport); const createAllServers = pipe(() => create(serversToCreate ?? []), hideModal); const createNonDuplicatedServers = pipe( @@ -52,7 +52,7 @@ const ImportServersBtn = ({ importServersFromFile }: ServersImporter): FC { // Reset input after processing file - (target as { value: string | null }).value = null; + (target as { value: string | null }).value = null; // eslint-disable-line no-param-reassign }) .catch(onImportError); @@ -62,12 +62,12 @@ const ImportServersBtn = ({ importServersFromFile }: ServersImporter): FC diff --git a/src/servers/helpers/ServerForm.tsx b/src/servers/helpers/ServerForm.tsx index ed7e86d7..2e708e8e 100644 --- a/src/servers/helpers/ServerForm.tsx +++ b/src/servers/helpers/ServerForm.tsx @@ -11,16 +11,16 @@ interface ServerFormProps { } export const ServerForm: FC = ({ onSubmit, initialValues, children, title }) => { - const [ name, setName ] = useState(''); - const [ url, setUrl ] = useState(''); - const [ apiKey, setApiKey ] = useState(''); + const [name, setName] = useState(''); + const [url, setUrl] = useState(''); + const [apiKey, setApiKey] = useState(''); const handleSubmit = handleEventPreventingDefault(() => onSubmit({ name, url, apiKey })); useEffect(() => { initialValues && setName(initialValues.name); initialValues && setUrl(initialValues.url); initialValues && setApiKey(initialValues.apiKey); - }, [ initialValues ]); + }, [initialValues]); return (
diff --git a/src/servers/helpers/withSelectedServer.tsx b/src/servers/helpers/withSelectedServer.tsx index f3c9d159..6c41667e 100644 --- a/src/servers/helpers/withSelectedServer.tsx +++ b/src/servers/helpers/withSelectedServer.tsx @@ -16,7 +16,7 @@ export function withSelectedServer(WrappedComponent: FC { params.serverId && selectServer(params.serverId); - }, [ params.serverId ]); + }, [params.serverId]); if (!selectedServer) { return ( diff --git a/src/servers/helpers/withoutSelectedServer.tsx b/src/servers/helpers/withoutSelectedServer.tsx index e4c944c4..c2ee7329 100644 --- a/src/servers/helpers/withoutSelectedServer.tsx +++ b/src/servers/helpers/withoutSelectedServer.tsx @@ -6,8 +6,9 @@ interface WithoutSelectedServerProps { export function withoutSelectedServer(WrappedComponent: FC) { return (props: WithoutSelectedServerProps & T) => { + const { resetSelectedServer } = props; useEffect(() => { - props.resetSelectedServer(); + resetSelectedServer(); }, []); return ; diff --git a/src/servers/reducers/remoteServers.ts b/src/servers/reducers/remoteServers.ts index 1b2660f3..52e1bc9f 100644 --- a/src/servers/reducers/remoteServers.ts +++ b/src/servers/reducers/remoteServers.ts @@ -7,7 +7,7 @@ import { createServers } from './servers'; const responseToServersList = pipe( prop('data'), - (data: any): ServerData[] => Array.isArray(data) ? data.filter(hasServerData) : [], + (data: any): ServerData[] => (Array.isArray(data) ? data.filter(hasServerData) : []), ); export const fetchServers = ({ get }: AxiosInstance) => () => async (dispatch: Dispatch) => { diff --git a/src/servers/reducers/selectedServer.ts b/src/servers/reducers/selectedServer.ts index b531547c..b33f344d 100644 --- a/src/servers/reducers/selectedServer.ts +++ b/src/servers/reducers/selectedServer.ts @@ -7,21 +7,19 @@ import { ShlinkHealth } from '../../api/types'; import { buildActionCreator, buildReducer } from '../../utils/helpers/redux'; import { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilder'; -/* eslint-disable padding-line-between-statements */ export const SELECT_SERVER = 'shlink/selectedServer/SELECT_SERVER'; export const RESET_SELECTED_SERVER = 'shlink/selectedServer/RESET_SELECTED_SERVER'; export const MIN_FALLBACK_VERSION = '1.0.0'; export const MAX_FALLBACK_VERSION = '999.999.999'; export const LATEST_VERSION_CONSTRAINT = 'latest'; -/* eslint-enable padding-line-between-statements */ export interface SelectServerAction extends Action { selectedServer: SelectedServer; } const versionToSemVer = pipe( - (version: string) => version === LATEST_VERSION_CONSTRAINT ? MAX_FALLBACK_VERSION : version, + (version: string) => (version === LATEST_VERSION_CONSTRAINT ? MAX_FALLBACK_VERSION : version), toSemVer(MIN_FALLBACK_VERSION), ); diff --git a/src/servers/reducers/servers.ts b/src/servers/reducers/servers.ts index e433b9e1..31cd4d13 100644 --- a/src/servers/reducers/servers.ts +++ b/src/servers/reducers/servers.ts @@ -4,12 +4,10 @@ import { Action } from 'redux'; import { ServerData, ServersMap, ServerWithId } from '../data'; import { buildReducer } from '../../utils/helpers/redux'; -/* eslint-disable padding-line-between-statements */ export const EDIT_SERVER = 'shlink/servers/EDIT_SERVER'; export const DELETE_SERVER = 'shlink/servers/DELETE_SERVER'; export const CREATE_SERVERS = 'shlink/servers/CREATE_SERVERS'; export const SET_AUTO_CONNECT = 'shlink/servers/SET_AUTO_CONNECT'; -/* eslint-enable padding-line-between-statements */ export interface CreateServersAction extends Action { newServers: ServersMap; @@ -37,9 +35,9 @@ const serverWithId = (server: ServerWithId | ServerData): ServerWithId => { export default buildReducer({ [CREATE_SERVERS]: (state, { newServers }) => ({ ...state, ...newServers }), [DELETE_SERVER]: (state, { serverId }) => dissoc(serverId, state), - [EDIT_SERVER]: (state, { serverId, serverData }: any) => !state[serverId] - ? state - : assoc(serverId, { ...state[serverId], ...serverData }, state), + [EDIT_SERVER]: (state, { serverId, serverData }: any) => ( + !state[serverId] ? state : assoc(serverId, { ...state[serverId], ...serverData }, state) + ), [SET_AUTO_CONNECT]: (state, { serverId, autoConnect }) => { if (!state[serverId]) { return state; @@ -50,7 +48,7 @@ export default buildReducer [ + toPairs(state).map(([evaluatedServerId, server]) => [ evaluatedServerId, { ...server, autoConnect: evaluatedServerId === serverId }, ]), @@ -66,7 +64,7 @@ export const createServers = pipe( (newServers: ServersMap) => ({ type: CREATE_SERVERS, newServers }), ); -export const createServer = (server: ServerWithId) => createServers([ server ]); +export const createServer = (server: ServerWithId) => createServers([server]); export const editServer = (serverId: string, serverData: Partial) => ({ type: EDIT_SERVER, diff --git a/src/servers/services/ServersImporter.ts b/src/servers/services/ServersImporter.ts index 42009c9c..256c028a 100644 --- a/src/servers/services/ServersImporter.ts +++ b/src/servers/services/ServersImporter.ts @@ -29,8 +29,8 @@ export class ServersImporter { } resolve(servers); - } catch (e) { - reject(e); + } catch (error) { + reject(error); } }); reader.readAsText(file); diff --git a/src/servers/services/provideServices.ts b/src/servers/services/provideServices.ts index 6d25c6fd..422708dd 100644 --- a/src/servers/services/provideServices.ts +++ b/src/servers/services/provideServices.ts @@ -31,41 +31,41 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { 'ManageServersRow', ); bottle.decorator('ManageServers', withoutSelectedServer); - bottle.decorator('ManageServers', connect([ 'selectedServer', 'servers' ], [ 'resetSelectedServer' ])); + bottle.decorator('ManageServers', connect(['selectedServer', 'servers'], ['resetSelectedServer'])); bottle.serviceFactory('ManageServersRow', ManageServersRow, 'ManageServersRowDropdown'); bottle.serviceFactory('ManageServersRowDropdown', ManageServersRowDropdown, 'DeleteServerModal'); - bottle.decorator('ManageServersRowDropdown', connect(null, [ 'setAutoConnect' ])); + bottle.decorator('ManageServersRowDropdown', connect(null, ['setAutoConnect'])); bottle.serviceFactory('CreateServer', CreateServer, 'ImportServersBtn', 'useStateFlagTimeout'); bottle.decorator('CreateServer', withoutSelectedServer); - bottle.decorator('CreateServer', connect([ 'selectedServer', 'servers' ], [ 'createServer', 'resetSelectedServer' ])); + bottle.decorator('CreateServer', connect(['selectedServer', 'servers'], ['createServer', 'resetSelectedServer'])); bottle.serviceFactory('EditServer', EditServer, 'ServerError'); - bottle.decorator('EditServer', connect([ 'selectedServer' ], [ 'editServer', 'selectServer', 'resetSelectedServer' ])); + bottle.decorator('EditServer', connect(['selectedServer'], ['editServer', 'selectServer', 'resetSelectedServer'])); bottle.serviceFactory('ServersDropdown', () => ServersDropdown); - bottle.decorator('ServersDropdown', connect([ 'servers', 'selectedServer' ])); + bottle.decorator('ServersDropdown', connect(['servers', 'selectedServer'])); bottle.serviceFactory('DeleteServerModal', () => DeleteServerModal); - bottle.decorator('DeleteServerModal', connect(null, [ 'deleteServer' ])); + bottle.decorator('DeleteServerModal', connect(null, ['deleteServer'])); bottle.serviceFactory('DeleteServerButton', DeleteServerButton, 'DeleteServerModal'); bottle.serviceFactory('ImportServersBtn', ImportServersBtn, 'ServersImporter'); - bottle.decorator('ImportServersBtn', connect([ 'servers' ], [ 'createServers' ])); + bottle.decorator('ImportServersBtn', connect(['servers'], ['createServers'])); bottle.serviceFactory('ForServerVersion', () => ForServerVersion); - bottle.decorator('ForServerVersion', connect([ 'selectedServer' ])); + bottle.decorator('ForServerVersion', connect(['selectedServer'])); bottle.serviceFactory('ServerError', ServerError, 'DeleteServerButton'); - bottle.decorator('ServerError', connect([ 'servers', 'selectedServer' ])); + bottle.decorator('ServerError', connect(['servers', 'selectedServer'])); bottle.serviceFactory('Overview', Overview, 'ShortUrlsTable', 'CreateShortUrl', 'ForServerVersion'); bottle.decorator('Overview', connect( - [ 'shortUrlsList', 'tagsList', 'selectedServer', 'mercureInfo', 'visitsOverview' ], - [ 'listShortUrls', 'listTags', 'createNewVisits', 'loadMercureInfo', 'loadVisitsOverview' ], + ['shortUrlsList', 'tagsList', 'selectedServer', 'mercureInfo', 'visitsOverview'], + ['listShortUrls', 'listTags', 'createNewVisits', 'loadMercureInfo', 'loadVisitsOverview'], )); // Services diff --git a/src/service-worker.ts b/src/service-worker.ts index 652a8a4a..4f68cb76 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -1,5 +1,4 @@ /// -/* eslint-disable no-restricted-globals */ // This service worker can be customized! // See https://developers.google.com/web/tools/workbox/modules diff --git a/src/settings/RealTimeUpdatesSettings.tsx b/src/settings/RealTimeUpdatesSettings.tsx index 6ed3ac01..e2424e5a 100644 --- a/src/settings/RealTimeUpdatesSettings.tsx +++ b/src/settings/RealTimeUpdatesSettings.tsx @@ -12,7 +12,7 @@ interface RealTimeUpdatesProps { setRealTimeUpdatesInterval: (interval: number) => void; } -const intervalValue = (interval?: number) => !interval ? '' : `${interval}`; +const intervalValue = (interval?: number) => (!interval ? '' : `${interval}`); const RealTimeUpdatesSettings = ( { settings: { realTimeUpdates }, toggleRealTimeUpdates, setRealTimeUpdatesInterval }: RealTimeUpdatesProps, diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 9e8a6769..ff4aed50 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -25,9 +25,9 @@ const Settings = ( - , ]} />} /> - , ]} />} /> - , ]} />} /> + , ]} />} /> + , ]} />} /> + , ]} />} /> } /> diff --git a/src/settings/ShortUrlCreationSettings.tsx b/src/settings/ShortUrlCreationSettings.tsx index 14870b9b..a369e90f 100644 --- a/src/settings/ShortUrlCreationSettings.tsx +++ b/src/settings/ShortUrlCreationSettings.tsx @@ -13,11 +13,12 @@ interface ShortUrlCreationProps { } const tagFilteringModeText = (tagFilteringMode: TagFilteringMode | undefined): string => - tagFilteringMode === 'includes' ? 'Suggest tags including input' : 'Suggest tags starting with input'; -const tagFilteringModeHint = (tagFilteringMode: TagFilteringMode | undefined): ReactNode => + (tagFilteringMode === 'includes' ? 'Suggest tags including input' : 'Suggest tags starting with input'); +const tagFilteringModeHint = (tagFilteringMode: TagFilteringMode | undefined): ReactNode => ( tagFilteringMode === 'includes' ? <>The list of suggested tags will contain those including provided input. - : <>The list of suggested tags will contain those starting with provided input.; + : <>The list of suggested tags will contain those starting with provided input. +); export const ShortUrlCreationSettings: FC = ({ settings, setShortUrlCreationSettings }) => { const shortUrlCreation: ShortUrlsSettings = settings.shortUrlCreation ?? { validateUrls: false }; diff --git a/src/settings/helpers/index.ts b/src/settings/helpers/index.ts index 160c5434..68e922b6 100644 --- a/src/settings/helpers/index.ts +++ b/src/settings/helpers/index.ts @@ -1,5 +1,6 @@ import { ShlinkState } from '../../container/types'; +/* eslint-disable no-param-reassign */ export const migrateDeprecatedSettings = (state: Partial): Partial => { if (!state.settings) { return state; diff --git a/src/settings/services/provideServices.ts b/src/settings/services/provideServices.ts index d60ad3d7..344ad8a8 100644 --- a/src/settings/services/provideServices.ts +++ b/src/settings/services/provideServices.ts @@ -31,28 +31,28 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { 'TagsSettings', ); bottle.decorator('Settings', withoutSelectedServer); - bottle.decorator('Settings', connect(null, [ 'resetSelectedServer' ])); + bottle.decorator('Settings', connect(null, ['resetSelectedServer'])); bottle.serviceFactory('RealTimeUpdatesSettings', () => RealTimeUpdatesSettings); bottle.decorator( 'RealTimeUpdatesSettings', - connect([ 'settings' ], [ 'toggleRealTimeUpdates', 'setRealTimeUpdatesInterval' ]), + connect(['settings'], ['toggleRealTimeUpdates', 'setRealTimeUpdatesInterval']), ); bottle.serviceFactory('ShortUrlCreationSettings', () => ShortUrlCreationSettings); - bottle.decorator('ShortUrlCreationSettings', connect([ 'settings' ], [ 'setShortUrlCreationSettings' ])); + bottle.decorator('ShortUrlCreationSettings', connect(['settings'], ['setShortUrlCreationSettings'])); bottle.serviceFactory('UserInterfaceSettings', () => UserInterfaceSettings); - bottle.decorator('UserInterfaceSettings', connect([ 'settings' ], [ 'setUiSettings' ])); + bottle.decorator('UserInterfaceSettings', connect(['settings'], ['setUiSettings'])); bottle.serviceFactory('VisitsSettings', () => VisitsSettings); - bottle.decorator('VisitsSettings', connect([ 'settings' ], [ 'setVisitsSettings' ])); + bottle.decorator('VisitsSettings', connect(['settings'], ['setVisitsSettings'])); bottle.serviceFactory('TagsSettings', () => TagsSettings); - bottle.decorator('TagsSettings', connect([ 'settings' ], [ 'setTagsSettings' ])); + bottle.decorator('TagsSettings', connect(['settings'], ['setTagsSettings'])); bottle.serviceFactory('ShortUrlsListSettings', () => ShortUrlsListSettings); - bottle.decorator('ShortUrlsListSettings', connect([ 'settings' ], [ 'setShortUrlsListSettings' ])); + bottle.decorator('ShortUrlsListSettings', connect(['settings'], ['setShortUrlsListSettings'])); // Actions bottle.serviceFactory('toggleRealTimeUpdates', () => toggleRealTimeUpdates); diff --git a/src/short-urls/CreateShortUrl.tsx b/src/short-urls/CreateShortUrl.tsx index a13daab8..ef9694f4 100644 --- a/src/short-urls/CreateShortUrl.tsx +++ b/src/short-urls/CreateShortUrl.tsx @@ -41,7 +41,7 @@ const CreateShortUrl = (ShortUrlForm: FC, CreateShortUrlResul basicMode = false, settings: { shortUrlCreation: shortUrlCreationSettings }, }: CreateShortUrlConnectProps) => { - const initialState = useMemo(() => getInitialState(shortUrlCreationSettings), [ shortUrlCreationSettings ]); + const initialState = useMemo(() => getInitialState(shortUrlCreationSettings), [shortUrlCreationSettings]); return ( <> diff --git a/src/short-urls/EditShortUrl.tsx b/src/short-urls/EditShortUrl.tsx index 4e34e2e2..35a93d04 100644 --- a/src/short-urls/EditShortUrl.tsx +++ b/src/short-urls/EditShortUrl.tsx @@ -63,9 +63,9 @@ export const EditShortUrl = (ShortUrlForm: FC) => ({ const { domain } = parseQuery<{ domain?: string }>(search); const initialState = useMemo( () => getInitialState(shortUrl, shortUrlCreationSettings), - [ shortUrl, shortUrlCreationSettings ], + [shortUrl, shortUrlCreationSettings], ); - const [ savingSucceeded,, isSuccessful, isNotSuccessful ] = useToggle(); + const [savingSucceeded,, isSuccessful, isNotSuccessful] = useToggle(); useEffect(() => { params.shortCode && getShortUrlDetail(params.shortCode, domain); diff --git a/src/short-urls/ShortUrlForm.tsx b/src/short-urls/ShortUrlForm.tsx index dd2a9776..6c36ccbb 100644 --- a/src/short-urls/ShortUrlForm.tsx +++ b/src/short-urls/ShortUrlForm.tsx @@ -32,14 +32,14 @@ export interface ShortUrlFormProps { } const normalizeTag = pipe(trim, replace(/ /g, '-')); -const toDate = (date?: string | Date): Date | undefined => typeof date === 'string' ? parseISO(date) : date; +const toDate = (date?: string | Date): Date | undefined => (typeof date === 'string' ? parseISO(date) : date); const dynamicColClasses = (flag: boolean) => ({ 'col-sm-6': flag, 'col-sm-12': !flag }); export const ShortUrlForm = ( TagsSelector: FC, DomainSelector: FC, ): FC => ({ mode, saving, onSave, initialState, selectedServer }) => { - const [ shortUrlData, setShortUrlData ] = useState(initialState); + const [shortUrlData, setShortUrlData] = useState(initialState); const isEdit = mode === 'edit'; const isBasicMode = mode === 'create-basic'; const hadTitleOriginally = hasValue(initialState.title); @@ -48,9 +48,9 @@ export const ShortUrlForm = ( const resolveNewTitle = (): OptionalString => { const hasNewTitle = hasValue(shortUrlData.title); const matcher = cond([ - [ () => !hasNewTitle && !hadTitleOriginally, () => undefined ], - [ () => !hasNewTitle && hadTitleOriginally, () => null ], - [ T, () => shortUrlData.title ], + [() => !hasNewTitle && !hadTitleOriginally, () => undefined], + [() => !hasNewTitle && hadTitleOriginally, () => null], + [T, () => shortUrlData.title], ]); return matcher(); @@ -65,7 +65,7 @@ export const ShortUrlForm = ( useEffect(() => { setShortUrlData(initialState); - }, [ initialState ]); + }, [initialState]); const renderOptionalInput = ( id: NonDateFields, diff --git a/src/short-urls/ShortUrlsFilteringBar.tsx b/src/short-urls/ShortUrlsFilteringBar.tsx index 71082df2..6b21b20b 100644 --- a/src/short-urls/ShortUrlsFilteringBar.tsx +++ b/src/short-urls/ShortUrlsFilteringBar.tsx @@ -29,23 +29,23 @@ export interface ShortUrlsFilteringProps { shortUrlsAmount?: number; } -const dateOrNull = (date?: string) => date ? parseISO(date) : null; +const dateOrNull = (date?: string) => (date ? parseISO(date) : null); const ShortUrlsFilteringBar = ( colorGenerator: ColorGenerator, ExportShortUrlsBtn: FC, ): FC => ({ selectedServer, className, shortUrlsAmount, order, handleOrderBy }) => { - const [{ search, tags, startDate, endDate, tagsMode = 'any' }, toFirstPage ] = useShortUrlsQuery(); + const [{ search, tags, startDate, endDate, tagsMode = 'any' }, toFirstPage] = useShortUrlsQuery(); const setDates = pipe( - ({ startDate, endDate }: DateRange) => ({ - startDate: formatIsoDate(startDate) ?? undefined, - endDate: formatIsoDate(endDate) ?? undefined, + ({ startDate: theStartDate, endDate: theEndDate }: DateRange) => ({ + startDate: formatIsoDate(theStartDate) ?? undefined, + endDate: formatIsoDate(theEndDate) ?? undefined, }), toFirstPage, ); const setSearch = pipe( - (searchTerm: string) => isEmpty(searchTerm) ? undefined : searchTerm, - (search) => toFirstPage({ search }), + (searchTerm: string) => (isEmpty(searchTerm) ? undefined : searchTerm), + (searchTerm) => toFirstPage({ search: searchTerm }), ); const removeTag = pipe( (tag: string) => tags.filter((selectedTag) => selectedTag !== tag), @@ -53,8 +53,8 @@ const ShortUrlsFilteringBar = ( ); const canChangeTagsMode = supportsAllTagsFiltering(selectedServer); const toggleTagsMode = pipe( - () => tagsMode === 'any' ? 'all' : 'any', - (tagsMode) => toFirstPage({ tagsMode }), + () => (tagsMode === 'any' ? 'all' : 'any'), + (mode) => toFirstPage({ tagsMode: mode }), ); return ( diff --git a/src/short-urls/ShortUrlsList.tsx b/src/short-urls/ShortUrlsList.tsx index 363c8e18..b46652ba 100644 --- a/src/short-urls/ShortUrlsList.tsx +++ b/src/short-urls/ShortUrlsList.tsx @@ -30,8 +30,8 @@ const ShortUrlsList = ( const serverId = getServerId(selectedServer); const { page } = useParams(); const location = useLocation(); - const [{ tags, search, startDate, endDate, orderBy, tagsMode }, toFirstPage ] = useShortUrlsQuery(); - const [ actualOrderBy, setActualOrderBy ] = useState( + const [{ tags, search, startDate, endDate, orderBy, tagsMode }, toFirstPage] = useShortUrlsQuery(); + const [actualOrderBy, setActualOrderBy] = useState( // This separated state handling is needed to be able to fall back to settings value, but only once when loaded orderBy ?? settings.shortUrlsList?.defaultOrdering ?? DEFAULT_SHORT_URLS_ORDERING, ); @@ -45,7 +45,7 @@ const ShortUrlsList = ( const renderOrderIcon = (field: ShortUrlsOrderableFields) => ; const addTag = pipe( - (newTag: string) => [ ...new Set([ ...tags, newTag ]) ], + (newTag: string) => [...new Set([...tags, newTag])], (updatedTags) => toFirstPage({ tags: updatedTags }), ); @@ -59,7 +59,7 @@ const ShortUrlsList = ( orderBy: actualOrderBy, tagsMode, }); - }, [ page, search, tags, startDate, endDate, actualOrderBy, tagsMode ]); + }, [page, search, tags, startDate, endDate, actualOrderBy, tagsMode]); return ( <> @@ -82,6 +82,6 @@ const ShortUrlsList = ( ); -}, () => [ Topics.visits ]); +}, () => [Topics.visits]); export default ShortUrlsList; diff --git a/src/short-urls/ShortUrlsTable.tsx b/src/short-urls/ShortUrlsTable.tsx index daeff009..7a918672 100644 --- a/src/short-urls/ShortUrlsTable.tsx +++ b/src/short-urls/ShortUrlsTable.tsx @@ -70,11 +70,11 @@ export const ShortUrlsTable = (ShortUrlsRow: FC) => ({ Short URL {renderOrderIcon?.('shortCode')} - {!supportsTitle && ( + {!supportsTitle ? ( Long URL {renderOrderIcon?.('longUrl')} - ) || ( + ) : ( Title {renderOrderIcon?.('title')} diff --git a/src/short-urls/UseExistingIfFoundInfoIcon.tsx b/src/short-urls/UseExistingIfFoundInfoIcon.tsx index 2d003a1e..6024c810 100644 --- a/src/short-urls/UseExistingIfFoundInfoIcon.tsx +++ b/src/short-urls/UseExistingIfFoundInfoIcon.tsx @@ -37,7 +37,7 @@ const InfoModal = ({ isOpen, toggle }: { isOpen: boolean; toggle: () => void }) ); const UseExistingIfFoundInfoIcon = () => { - const [ isModalOpen, toggleModal ] = useToggle(); + const [isModalOpen, toggleModal] = useToggle(); return ( <> diff --git a/src/short-urls/helpers/CreateShortUrlResult.tsx b/src/short-urls/helpers/CreateShortUrlResult.tsx index ccf1ea94..f3e2cbfd 100644 --- a/src/short-urls/helpers/CreateShortUrlResult.tsx +++ b/src/short-urls/helpers/CreateShortUrlResult.tsx @@ -19,7 +19,7 @@ export interface CreateShortUrlResultProps extends ShortUrlCreation { const CreateShortUrlResult = (useStateFlagTimeout: StateFlagTimeout) => ( { error, errorData, result, resetCreateShortUrl, canBeClosed = false }: CreateShortUrlResultProps, ) => { - const [ showCopyTooltip, setShowCopyTooltip ] = useStateFlagTimeout(); + const [showCopyTooltip, setShowCopyTooltip] = useStateFlagTimeout(); useEffect(() => { resetCreateShortUrl(); diff --git a/src/short-urls/helpers/DeleteShortUrlModal.tsx b/src/short-urls/helpers/DeleteShortUrlModal.tsx index 435b3318..106690ce 100644 --- a/src/short-urls/helpers/DeleteShortUrlModal.tsx +++ b/src/short-urls/helpers/DeleteShortUrlModal.tsx @@ -17,7 +17,7 @@ interface DeleteShortUrlModalConnectProps extends ShortUrlModalProps { const DeleteShortUrlModal = ( { shortUrl, toggle, isOpen, shortUrlDeletion, resetDeleteShortUrl, deleteShortUrl }: DeleteShortUrlModalConnectProps, ) => { - const [ inputValue, setInputValue ] = useState(''); + const [inputValue, setInputValue] = useState(''); useEffect(() => resetDeleteShortUrl, []); diff --git a/src/short-urls/helpers/ExportShortUrlsBtn.tsx b/src/short-urls/helpers/ExportShortUrlsBtn.tsx index be5490c2..5a5f1233 100644 --- a/src/short-urls/helpers/ExportShortUrlsBtn.tsx +++ b/src/short-urls/helpers/ExportShortUrlsBtn.tsx @@ -22,7 +22,7 @@ export const ExportShortUrlsBtn = ( { exportShortUrls }: ReportExporter, ): FC => ({ amount = 0, selectedServer }) => { const [{ tags, search, startDate, endDate, orderBy, tagsMode }] = useShortUrlsQuery(); - const [ loading,, startLoading, stopLoading ] = useToggle(); + const [loading,, startLoading, stopLoading] = useToggle(); const exportAllUrls = async () => { if (!isServerWithId(selectedServer)) { return; diff --git a/src/short-urls/helpers/QrCodeModal.tsx b/src/short-urls/helpers/QrCodeModal.tsx index 295f6778..88230978 100644 --- a/src/short-urls/helpers/QrCodeModal.tsx +++ b/src/short-urls/helpers/QrCodeModal.tsx @@ -25,28 +25,28 @@ interface QrCodeModalConnectProps extends ShortUrlModalProps { const QrCodeModal = (imageDownloader: ImageDownloader, ForServerVersion: FC) => ( // eslint-disable-line { shortUrl: { shortUrl, shortCode }, toggle, isOpen, selectedServer }: QrCodeModalConnectProps, ) => { - const [ size, setSize ] = useState(300); - const [ margin, setMargin ] = useState(0); - const [ format, setFormat ] = useState('png'); - const [ errorCorrection, setErrorCorrection ] = useState('L'); + const [size, setSize] = useState(300); + const [margin, setMargin] = useState(0); + const [format, setFormat] = useState('png'); + const [errorCorrection, setErrorCorrection] = useState('L'); const capabilities: QrCodeCapabilities = useMemo(() => ({ useSizeInPath: !supportsQrCodeSizeInQuery(selectedServer), marginIsSupported: supportsQrCodeMargin(selectedServer), errorCorrectionIsSupported: supportsQrErrorCorrection(selectedServer), - }), [ selectedServer ]); + }), [selectedServer]); const willRenderThreeControls = capabilities.marginIsSupported !== capabilities.errorCorrectionIsSupported; const qrCodeUrl = useMemo( () => buildQrCodeUrl(shortUrl, { size, format, margin, errorCorrection }, capabilities), - [ shortUrl, size, format, margin, errorCorrection, capabilities ], + [shortUrl, size, format, margin, errorCorrection, capabilities], ); - const totalSize = useMemo(() => size + margin, [ size, margin ]); + const totalSize = useMemo(() => size + margin, [size, margin]); const modalSize = useMemo(() => { if (totalSize < 500) { return undefined; } return totalSize < 800 ? 'lg' : 'xl'; - }, [ totalSize ]); + }, [totalSize]); return ( @@ -69,8 +69,9 @@ const QrCodeModal = (imageDownloader: ImageDownloader, ForServerVersion: FC {capabilities.marginIsSupported && ( - + imageDownloader.saveImage(qrCodeUrl, `${shortCode}-qr-code.${format}`)} + onClick={() => { + imageDownloader.saveImage(qrCodeUrl, `${shortCode}-qr-code.${format}`).catch(() => {}); + }} > Download diff --git a/src/short-urls/helpers/ShortUrlsRow.tsx b/src/short-urls/helpers/ShortUrlsRow.tsx index f87bf49c..fa829a4d 100644 --- a/src/short-urls/helpers/ShortUrlsRow.tsx +++ b/src/short-urls/helpers/ShortUrlsRow.tsx @@ -23,8 +23,8 @@ const ShortUrlsRow = ( colorGenerator: ColorGenerator, useStateFlagTimeout: StateFlagTimeout, ) => ({ shortUrl, selectedServer, onTagClick }: ShortUrlsRowProps) => { - const [ copiedToClipboard, setCopiedToClipboard ] = useStateFlagTimeout(); - const [ active, setActive ] = useStateFlagTimeout(false, 500); + const [copiedToClipboard, setCopiedToClipboard] = useStateFlagTimeout(); + const [active, setActive] = useStateFlagTimeout(false, 500); const isFirstRun = useRef(true); const renderTags = (tags: string[]) => { @@ -48,7 +48,7 @@ const ShortUrlsRow = ( } else { setActive(); } - }, [ shortUrl.visitsCount ]); + }, [shortUrl.visitsCount]); return ( diff --git a/src/short-urls/helpers/ShortUrlsRowMenu.tsx b/src/short-urls/helpers/ShortUrlsRowMenu.tsx index 9b84501f..a8ac0ade 100644 --- a/src/short-urls/helpers/ShortUrlsRowMenu.tsx +++ b/src/short-urls/helpers/ShortUrlsRowMenu.tsx @@ -23,9 +23,9 @@ const ShortUrlsRowMenu = ( DeleteShortUrlModal: ShortUrlModal, QrCodeModal: ShortUrlModal, ) => ({ shortUrl, selectedServer }: ShortUrlsRowMenuProps) => { - const [ isOpen, toggle ] = useToggle(); - const [ isQrModalOpen, toggleQrCode ] = useToggle(); - const [ isDeleteModalOpen, toggleDelete ] = useToggle(); + const [isOpen, toggle] = useToggle(); + const [isQrModalOpen, toggleQrCode] = useToggle(); + const [isDeleteModalOpen, toggleDelete] = useToggle(); return ( diff --git a/src/short-urls/helpers/hooks.ts b/src/short-urls/helpers/hooks.ts index 7505db47..3f1c165c 100644 --- a/src/short-urls/helpers/hooks.ts +++ b/src/short-urls/helpers/hooks.ts @@ -8,11 +8,6 @@ import { TagsFilteringMode } from '../../api/types'; type ToFirstPage = (extra: Partial) => void; -export interface ShortUrlListRouteParams { - page: string; - serverId: string; -} - interface ShortUrlsQueryCommon { search?: string; startDate?: string; @@ -45,7 +40,7 @@ export const useShortUrlsQuery = (): [ShortUrlsFiltering, ToFirstPage] => { return { ...rest, orderBy: parsedOrderBy, tags: parsedTags }; }, ), - [ location.search ], + [location.search], ); const toFirstPageWithExtra = (extra: Partial) => { const { orderBy, tags, ...mergedQuery } = { ...query, ...extra }; @@ -57,8 +52,8 @@ export const useShortUrlsQuery = (): [ShortUrlsFiltering, ToFirstPage] => { const evolvedQuery = stringifyQuery(normalizedQuery); const queryString = isEmpty(evolvedQuery) ? '' : `?${evolvedQuery}`; - navigate(`/server/${params.serverId}/list-short-urls/1${queryString}`); + navigate(`/server/${params.serverId ?? ''}/list-short-urls/1${queryString}`); }; - return [ query, toFirstPageWithExtra ]; + return [query, toFirstPageWithExtra]; }; diff --git a/src/short-urls/reducers/shortUrlCreation.ts b/src/short-urls/reducers/shortUrlCreation.ts index 940612d1..2be9ff7e 100644 --- a/src/short-urls/reducers/shortUrlCreation.ts +++ b/src/short-urls/reducers/shortUrlCreation.ts @@ -7,12 +7,10 @@ import { ProblemDetailsError } from '../../api/types'; import { parseApiError } from '../../api/utils'; import { ApiErrorAction } from '../../api/types/actions'; -/* eslint-disable padding-line-between-statements */ export const CREATE_SHORT_URL_START = 'shlink/createShortUrl/CREATE_SHORT_URL_START'; export const CREATE_SHORT_URL_ERROR = 'shlink/createShortUrl/CREATE_SHORT_URL_ERROR'; export const CREATE_SHORT_URL = 'shlink/createShortUrl/CREATE_SHORT_URL'; export const RESET_CREATE_SHORT_URL = 'shlink/createShortUrl/RESET_CREATE_SHORT_URL'; -/* eslint-enable padding-line-between-statements */ export interface ShortUrlCreation { result: ShortUrl | null; @@ -43,10 +41,10 @@ export const createShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => getState: GetState, ) => { dispatch({ type: CREATE_SHORT_URL_START }); - const { createShortUrl } = buildShlinkApiClient(getState); + const { createShortUrl: shlinkCreateShortUrl } = buildShlinkApiClient(getState); try { - const result = await createShortUrl(data); + const result = await shlinkCreateShortUrl(data); dispatch({ type: CREATE_SHORT_URL, result }); } catch (e: any) { diff --git a/src/short-urls/reducers/shortUrlDeletion.ts b/src/short-urls/reducers/shortUrlDeletion.ts index 952d0e99..24ec999d 100644 --- a/src/short-urls/reducers/shortUrlDeletion.ts +++ b/src/short-urls/reducers/shortUrlDeletion.ts @@ -6,12 +6,10 @@ import { ShlinkApiClientBuilder } from '../../api/services/ShlinkApiClientBuilde import { parseApiError } from '../../api/utils'; import { ApiErrorAction } from '../../api/types/actions'; -/* eslint-disable padding-line-between-statements */ export const DELETE_SHORT_URL_START = 'shlink/deleteShortUrl/DELETE_SHORT_URL_START'; export const DELETE_SHORT_URL_ERROR = 'shlink/deleteShortUrl/DELETE_SHORT_URL_ERROR'; export const SHORT_URL_DELETED = 'shlink/deleteShortUrl/SHORT_URL_DELETED'; export const RESET_DELETE_SHORT_URL = 'shlink/deleteShortUrl/RESET_DELETE_SHORT_URL'; -/* eslint-enable padding-line-between-statements */ export interface ShortUrlDeletion { shortCode: string; @@ -43,10 +41,10 @@ export const deleteShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => domain?: string | null, ) => async (dispatch: Dispatch, getState: GetState) => { dispatch({ type: DELETE_SHORT_URL_START }); - const { deleteShortUrl } = buildShlinkApiClient(getState); + const { deleteShortUrl: shlinkDeleteShortUrl } = buildShlinkApiClient(getState); try { - await deleteShortUrl(shortCode, domain); + await shlinkDeleteShortUrl(shortCode, domain); dispatch({ type: SHORT_URL_DELETED, shortCode, domain }); } catch (e: any) { dispatch({ type: DELETE_SHORT_URL_ERROR, errorData: parseApiError(e) }); diff --git a/src/short-urls/reducers/shortUrlDetail.ts b/src/short-urls/reducers/shortUrlDetail.ts index d504fdae..dd1bf005 100644 --- a/src/short-urls/reducers/shortUrlDetail.ts +++ b/src/short-urls/reducers/shortUrlDetail.ts @@ -9,11 +9,9 @@ import { ProblemDetailsError } from '../../api/types'; import { parseApiError } from '../../api/utils'; import { ApiErrorAction } from '../../api/types/actions'; -/* eslint-disable padding-line-between-statements */ export const GET_SHORT_URL_DETAIL_START = 'shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_START'; export const GET_SHORT_URL_DETAIL_ERROR = 'shlink/shortUrlDetail/GET_SHORT_URL_DETAIL_ERROR'; export const GET_SHORT_URL_DETAIL = 'shlink/shortUrlDetail/GET_SHORT_URL_DETAIL'; -/* eslint-enable padding-line-between-statements */ export interface ShortUrlDetail { shortUrl?: ShortUrl; @@ -46,7 +44,7 @@ export const getShortUrlDetail = (buildShlinkApiClient: ShlinkApiClientBuilder) try { const { shortUrlsList } = getState(); const shortUrl = shortUrlsList?.shortUrls?.data.find( - (shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), + (url) => shortUrlMatches(url, shortCode, domain), ) ?? await buildShlinkApiClient(getState).getShortUrl(shortCode, domain); dispatch({ shortUrl, type: GET_SHORT_URL_DETAIL }); diff --git a/src/short-urls/reducers/shortUrlEdition.ts b/src/short-urls/reducers/shortUrlEdition.ts index 3a27da08..2fdb5d92 100644 --- a/src/short-urls/reducers/shortUrlEdition.ts +++ b/src/short-urls/reducers/shortUrlEdition.ts @@ -9,11 +9,9 @@ import { parseApiError } from '../../api/utils'; import { supportsTagsInPatch } from '../../utils/helpers/features'; import { ApiErrorAction } from '../../api/types/actions'; -/* eslint-disable padding-line-between-statements */ export const EDIT_SHORT_URL_START = 'shlink/shortUrlEdition/EDIT_SHORT_URL_START'; export const EDIT_SHORT_URL_ERROR = 'shlink/shortUrlEdition/EDIT_SHORT_URL_ERROR'; export const SHORT_URL_EDITED = 'shlink/shortUrlEdition/SHORT_URL_EDITED'; -/* eslint-enable padding-line-between-statements */ export interface ShortUrlEdition { shortUrl?: ShortUrl; @@ -49,7 +47,7 @@ export const editShortUrl = (buildShlinkApiClient: ShlinkApiClientBuilder) => ( const { updateShortUrl, updateShortUrlTags } = buildShlinkApiClient(getState); try { - const [ shortUrl ] = await Promise.all([ + const [shortUrl] = await Promise.all([ updateShortUrl(shortCode, domain, data as any), // FIXME Parse dates sendTagsSeparately && data.tags ? updateShortUrlTags(shortCode, domain, data.tags) : undefined, ]); diff --git a/src/short-urls/reducers/shortUrlsList.ts b/src/short-urls/reducers/shortUrlsList.ts index c1f272da..be70885a 100644 --- a/src/short-urls/reducers/shortUrlsList.ts +++ b/src/short-urls/reducers/shortUrlsList.ts @@ -10,11 +10,9 @@ import { DeleteShortUrlAction, SHORT_URL_DELETED } from './shortUrlDeletion'; import { CREATE_SHORT_URL, CreateShortUrlAction } from './shortUrlCreation'; import { SHORT_URL_EDITED, ShortUrlEditedAction } from './shortUrlEdition'; -/* eslint-disable padding-line-between-statements */ export const LIST_SHORT_URLS_START = 'shlink/shortUrlsList/LIST_SHORT_URLS_START'; export const LIST_SHORT_URLS_ERROR = 'shlink/shortUrlsList/LIST_SHORT_URLS_ERROR'; export const LIST_SHORT_URLS = 'shlink/shortUrlsList/LIST_SHORT_URLS'; -/* eslint-enable padding-line-between-statements */ export const ITEMS_IN_OVERVIEW_PAGE = 5; @@ -46,19 +44,19 @@ export default buildReducer({ [LIST_SHORT_URLS_ERROR]: () => ({ loading: false, error: true }), [LIST_SHORT_URLS]: (_, { shortUrls }) => ({ loading: false, error: false, shortUrls }), [SHORT_URL_DELETED]: pipe( - (state: ShortUrlsList, { shortCode, domain }: DeleteShortUrlAction) => !state.shortUrls ? state : assocPath( - [ 'shortUrls', 'data' ], + (state: ShortUrlsList, { shortCode, domain }: DeleteShortUrlAction) => (!state.shortUrls ? state : assocPath( + ['shortUrls', 'data'], reject((shortUrl) => shortUrlMatches(shortUrl, shortCode, domain), state.shortUrls.data), state, - ), - (state) => !state.shortUrls ? state : assocPath( - [ 'shortUrls', 'pagination', 'totalItems' ], + )), + (state) => (!state.shortUrls ? state : assocPath( + ['shortUrls', 'pagination', 'totalItems'], state.shortUrls.pagination.totalItems - 1, state, - ), + )), ), [CREATE_VISITS]: (state, { createdVisits }) => assocPath( - [ 'shortUrls', 'data' ], + ['shortUrls', 'data'], state.shortUrls?.data?.map( (currentShortUrl) => { // Find the last of the new visit for this short URL, and pick the amount of visits from it @@ -79,36 +77,36 @@ export default buildReducer({ // The only place where the list and the creation form coexist is the overview page. // There we can assume we are displaying page 1, and therefore, we can safely prepend the new short URL. // We can also remove the items above the amount that is displayed there. - (state: ShortUrlsList, { result }: CreateShortUrlAction) => !state.shortUrls ? state : assocPath( - [ 'shortUrls', 'data' ], - [ result, ...state.shortUrls.data.slice(0, ITEMS_IN_OVERVIEW_PAGE - 1) ], + (state: ShortUrlsList, { result }: CreateShortUrlAction) => (!state.shortUrls ? state : assocPath( + ['shortUrls', 'data'], + [result, ...state.shortUrls.data.slice(0, ITEMS_IN_OVERVIEW_PAGE - 1)], state, - ), - (state: ShortUrlsList) => !state.shortUrls ? state : assocPath( - [ 'shortUrls', 'pagination', 'totalItems' ], + )), + (state: ShortUrlsList) => (!state.shortUrls ? state : assocPath( + ['shortUrls', 'pagination', 'totalItems'], state.shortUrls.pagination.totalItems + 1, state, - ), + )), ), - [SHORT_URL_EDITED]: (state, { shortUrl: editedShortUrl }) => !state.shortUrls ? state : assocPath( - [ 'shortUrls', 'data' ], + [SHORT_URL_EDITED]: (state, { shortUrl: editedShortUrl }) => (!state.shortUrls ? state : assocPath( + ['shortUrls', 'data'], state.shortUrls.data.map((shortUrl) => { const { shortCode, domain } = editedShortUrl; return shortUrlMatches(shortUrl, shortCode, domain) ? editedShortUrl : shortUrl; }), state, - ), + )), }, initialState); export const listShortUrls = (buildShlinkApiClient: ShlinkApiClientBuilder) => ( params: ShlinkShortUrlsListParams = {}, ) => async (dispatch: Dispatch, getState: GetState) => { dispatch({ type: LIST_SHORT_URLS_START }); - const { listShortUrls } = buildShlinkApiClient(getState); + const { listShortUrls: shlinkListShortUrls } = buildShlinkApiClient(getState); try { - const shortUrls = await listShortUrls(params); + const shortUrls = await shlinkListShortUrls(params); dispatch({ type: LIST_SHORT_URLS, shortUrls }); } catch (e) { diff --git a/src/short-urls/services/provideServices.ts b/src/short-urls/services/provideServices.ts index 165cf91d..052cb165 100644 --- a/src/short-urls/services/provideServices.ts +++ b/src/short-urls/services/provideServices.ts @@ -22,8 +22,8 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { // Components bottle.serviceFactory('ShortUrlsList', ShortUrlsList, 'ShortUrlsTable', 'ShortUrlsFilteringBar'); bottle.decorator('ShortUrlsList', connect( - [ 'selectedServer', 'mercureInfo', 'shortUrlsList', 'settings' ], - [ 'listShortUrls', 'createNewVisits', 'loadMercureInfo' ], + ['selectedServer', 'mercureInfo', 'shortUrlsList', 'settings'], + ['listShortUrls', 'createNewVisits', 'loadMercureInfo'], )); bottle.serviceFactory('ShortUrlsTable', ShortUrlsTable, 'ShortUrlsRow'); @@ -35,25 +35,25 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { bottle.serviceFactory('CreateShortUrl', CreateShortUrl, 'ShortUrlForm', 'CreateShortUrlResult'); bottle.decorator( 'CreateShortUrl', - connect([ 'shortUrlCreationResult', 'selectedServer', 'settings' ], [ 'createShortUrl', 'resetCreateShortUrl' ]), + connect(['shortUrlCreationResult', 'selectedServer', 'settings'], ['createShortUrl', 'resetCreateShortUrl']), ); bottle.serviceFactory('EditShortUrl', EditShortUrl, 'ShortUrlForm'); bottle.decorator('EditShortUrl', connect( - [ 'shortUrlDetail', 'shortUrlEdition', 'selectedServer', 'settings' ], - [ 'getShortUrlDetail', 'editShortUrl' ], + ['shortUrlDetail', 'shortUrlEdition', 'selectedServer', 'settings'], + ['getShortUrlDetail', 'editShortUrl'], )); bottle.serviceFactory('DeleteShortUrlModal', () => DeleteShortUrlModal); - bottle.decorator('DeleteShortUrlModal', connect([ 'shortUrlDeletion' ], [ 'deleteShortUrl', 'resetDeleteShortUrl' ])); + bottle.decorator('DeleteShortUrlModal', connect(['shortUrlDeletion'], ['deleteShortUrl', 'resetDeleteShortUrl'])); bottle.serviceFactory('QrCodeModal', QrCodeModal, 'ImageDownloader', 'ForServerVersion'); - bottle.decorator('QrCodeModal', connect([ 'selectedServer' ])); + bottle.decorator('QrCodeModal', connect(['selectedServer'])); bottle.serviceFactory('ShortUrlsFilteringBar', ShortUrlsFilteringBar, 'ColorGenerator', 'ExportShortUrlsBtn'); bottle.serviceFactory('ExportShortUrlsBtn', ExportShortUrlsBtn, 'buildShlinkApiClient', 'ReportExporter'); - bottle.decorator('ExportShortUrlsBtn', connect([ 'selectedServer' ])); + bottle.decorator('ExportShortUrlsBtn', connect(['selectedServer'])); // Actions bottle.serviceFactory('listShortUrls', listShortUrls, 'buildShlinkApiClient'); diff --git a/src/tags/TagCard.tsx b/src/tags/TagCard.tsx index b8526342..755d9769 100644 --- a/src/tags/TagCard.tsx +++ b/src/tags/TagCard.tsx @@ -25,9 +25,9 @@ const TagCard = ( EditTagModal: FC, colorGenerator: ColorGenerator, ) => ({ tag, selectedServer, displayed, toggle }: TagCardProps) => { - const [ isDeleteModalOpen, toggleDelete ] = useToggle(); - const [ isEditModalOpen, toggleEdit ] = useToggle(); - const [ hasTitle,, displayTitle ] = useToggle(); + const [isDeleteModalOpen, toggleDelete] = useToggle(); + const [isEditModalOpen, toggleEdit] = useToggle(); + const [hasTitle,, displayTitle] = useToggle(); const titleRef = useRef(); const serverId = getServerId(selectedServer); @@ -35,7 +35,7 @@ const TagCard = ( if (isTruncated(titleRef.current)) { displayTitle(); } - }, [ titleRef.current ]); + }, [titleRef.current]); return ( diff --git a/src/tags/TagsCards.tsx b/src/tags/TagsCards.tsx index 9e6d0b54..95917540 100644 --- a/src/tags/TagsCards.tsx +++ b/src/tags/TagsCards.tsx @@ -8,7 +8,7 @@ const { ceil } = Math; const TAGS_GROUPS_AMOUNT = 4; export const TagsCards = (TagCard: FC): FC => ({ sortedTags, selectedServer }) => { - const [ displayedTag, setDisplayedTag ] = useState(); + const [displayedTag, setDisplayedTag] = useState(); const tagsCount = sortedTags.length; const tagsGroups = splitEvery(ceil(tagsCount / TAGS_GROUPS_AMOUNT), sortedTags); diff --git a/src/tags/TagsList.tsx b/src/tags/TagsList.tsx index a4828d30..d5ac0a00 100644 --- a/src/tags/TagsList.tsx +++ b/src/tags/TagsList.tsx @@ -33,8 +33,8 @@ export interface TagsListProps { const TagsList = (TagsCards: FC, TagsTable: FC) => boundToMercureHub(( { filterTags, forceListTags, tagsList, selectedServer, settings }: TagsListProps, ) => { - const [ mode, setMode ] = useState(settings.tags?.defaultMode ?? 'cards'); - const [ order, setOrder ] = useState(settings.tags?.defaultOrdering ?? {}); + const [mode, setMode] = useState(settings.tags?.defaultMode ?? 'cards'); + const [order, setOrder] = useState(settings.tags?.defaultOrdering ?? {}); const resolveSortedTags = pipe( () => tagsList.filteredTags.map((tag): NormalizedTag => ({ tag, @@ -103,6 +103,6 @@ const TagsList = (TagsCards: FC, TagsTable: FC ); -}, () => [ Topics.visits ]); +}, () => [Topics.visits]); export default TagsList; diff --git a/src/tags/TagsTable.tsx b/src/tags/TagsTable.tsx index eab4686d..8298140c 100644 --- a/src/tags/TagsTable.tsx +++ b/src/tags/TagsTable.tsx @@ -23,7 +23,7 @@ export const TagsTable = (TagsTableRow: FC) => ( const isFirstLoad = useRef(true); const { search } = useLocation(); const { page: pageFromQuery = 1 } = parseQuery<{ page?: number | string }>(search); - const [ page, setPage ] = useQueryState('page', Number(pageFromQuery)); + const [page, setPage] = useQueryState('page', Number(pageFromQuery)); const pages = splitEvery(TAGS_PER_PAGE, sortedTags); const showPaginator = pages.length > 1; const currentPage = pages[page - 1] ?? []; @@ -31,10 +31,10 @@ export const TagsTable = (TagsTableRow: FC) => ( useEffect(() => { !isFirstLoad.current && setPage(1); isFirstLoad.current = false; - }, [ sortedTags ]); + }, [sortedTags]); useEffect(() => { scrollTo(0, 0); - }, [ page ]); + }, [page]); return ( @@ -50,9 +50,9 @@ export const TagsTable = (TagsTableRow: FC) => ( Visits - + - + {currentPage.length === 0 && No results found} diff --git a/src/tags/TagsTableRow.tsx b/src/tags/TagsTableRow.tsx index b924e921..55bf4ba9 100644 --- a/src/tags/TagsTableRow.tsx +++ b/src/tags/TagsTableRow.tsx @@ -21,9 +21,9 @@ export const TagsTableRow = ( EditTagModal: FC, colorGenerator: ColorGenerator, ) => ({ tag, selectedServer }: TagsTableRowProps) => { - const [ isDeleteModalOpen, toggleDelete ] = useToggle(); - const [ isEditModalOpen, toggleEdit ] = useToggle(); - const [ isDropdownOpen, toggleDropdown ] = useToggle(); + const [isDeleteModalOpen, toggleDelete] = useToggle(); + const [isEditModalOpen, toggleEdit] = useToggle(); + const [isDropdownOpen, toggleDropdown] = useToggle(); const serverId = getServerId(selectedServer); return ( diff --git a/src/tags/helpers/DeleteTagConfirmModal.tsx b/src/tags/helpers/DeleteTagConfirmModal.tsx index c4ef46ab..61027e88 100644 --- a/src/tags/helpers/DeleteTagConfirmModal.tsx +++ b/src/tags/helpers/DeleteTagConfirmModal.tsx @@ -1,4 +1,4 @@ -import { Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap'; +import { Button, Modal, ModalBody, ModalFooter, ModalHeader } from 'reactstrap'; import { TagDeletion } from '../reducers/tagDelete'; import { TagModalProps } from '../data'; import { Result } from '../../utils/Result'; @@ -34,10 +34,10 @@ const DeleteTagConfirmModal = ( )} - - + + ); diff --git a/src/tags/helpers/EditTagModal.tsx b/src/tags/helpers/EditTagModal.tsx index 89110993..6bd676ae 100644 --- a/src/tags/helpers/EditTagModal.tsx +++ b/src/tags/helpers/EditTagModal.tsx @@ -21,9 +21,9 @@ interface EditTagModalProps extends TagModalProps { const EditTagModal = ({ getColorForKey }: ColorGenerator) => ( { tag, editTag, toggle, tagEdited, isOpen, tagEdit }: EditTagModalProps, ) => { - const [ newTagName, setNewTagName ] = useState(tag); - const [ color, setColor ] = useState(getColorForKey(tag)); - const [ showColorPicker, toggleColorPicker, , hideColorPicker ] = useToggle(); + const [newTagName, setNewTagName] = useState(tag); + const [color, setColor] = useState(getColorForKey(tag)); + const [showColorPicker, toggleColorPicker, , hideColorPicker] = useToggle(); const { editing, error, errorData } = tagEdit; const saveTag = handleEventPreventingDefault( async () => editTag(tag, newTagName, color) diff --git a/src/tags/helpers/TagsSelector.tsx b/src/tags/helpers/TagsSelector.tsx index 8b585fe2..deb336d4 100644 --- a/src/tags/helpers/TagsSelector.tsx +++ b/src/tags/helpers/TagsSelector.tsx @@ -13,7 +13,7 @@ export interface TagsSelectorProps { } interface TagsSelectorConnectProps extends TagsSelectorProps { - listTags: Function; + listTags: () => void; tagsList: TagsList; settings: Settings; } @@ -47,14 +47,14 @@ const TagsSelector = (colorGenerator: ColorGenerator) => ( addOnBlur placeholderText={placeholder ?? 'Add tags to the URL'} minQueryLength={1} - delimiters={[ 'Enter', 'Tab', ',' ]} + delimiters={['Enter', 'Tab', ',']} suggestionsTransform={ searchMode === 'includes' ? (query, suggestions) => suggestions.filter(({ name }) => name.includes(query)) : undefined } onDelete={(removedTagIndex) => { - const tagsCopy = [ ...selectedTags ]; + const tagsCopy = [...selectedTags]; tagsCopy.splice(removedTagIndex, 1); onChange(tagsCopy); @@ -62,7 +62,7 @@ const TagsSelector = (colorGenerator: ColorGenerator) => ( onAddition={({ name: newTag }) => onChange( // * Avoid duplicated tags (thanks to the Set), // * Split any of the new tags by comma, allowing to paste multiple comma-separated tags at once. - [ ...new Set([ ...selectedTags, ...newTag.toLowerCase().split(',') ]) ], + [...new Set([...selectedTags, ...newTag.toLowerCase().split(',')])], )} /> ); diff --git a/src/tags/reducers/tagDelete.ts b/src/tags/reducers/tagDelete.ts index 5b38722d..68002479 100644 --- a/src/tags/reducers/tagDelete.ts +++ b/src/tags/reducers/tagDelete.ts @@ -6,12 +6,10 @@ import { ProblemDetailsError } from '../../api/types'; import { parseApiError } from '../../api/utils'; import { ApiErrorAction } from '../../api/types/actions'; -/* eslint-disable padding-line-between-statements */ export const DELETE_TAG_START = 'shlink/deleteTag/DELETE_TAG_START'; export const DELETE_TAG_ERROR = 'shlink/deleteTag/DELETE_TAG_ERROR'; export const DELETE_TAG = 'shlink/deleteTag/DELETE_TAG'; export const TAG_DELETED = 'shlink/deleteTag/TAG_DELETED'; -/* eslint-enable padding-line-between-statements */ export interface TagDeletion { deleting: boolean; @@ -42,7 +40,7 @@ export const deleteTag = (buildShlinkApiClient: ShlinkApiClientBuilder) => (tag: const { deleteTags } = buildShlinkApiClient(getState); try { - await deleteTags([ tag ]); + await deleteTags([tag]); dispatch({ type: DELETE_TAG }); } catch (e: any) { dispatch({ type: DELETE_TAG_ERROR, errorData: parseApiError(e) }); diff --git a/src/tags/reducers/tagEdit.ts b/src/tags/reducers/tagEdit.ts index ddaa2fed..6e9829a8 100644 --- a/src/tags/reducers/tagEdit.ts +++ b/src/tags/reducers/tagEdit.ts @@ -8,11 +8,9 @@ import { ProblemDetailsError } from '../../api/types'; import { parseApiError } from '../../api/utils'; import { ApiErrorAction } from '../../api/types/actions'; -/* eslint-disable padding-line-between-statements */ export const EDIT_TAG_START = 'shlink/editTag/EDIT_TAG_START'; export const EDIT_TAG_ERROR = 'shlink/editTag/EDIT_TAG_ERROR'; export const EDIT_TAG = 'shlink/editTag/EDIT_TAG'; -/* eslint-enable padding-line-between-statements */ export const TAG_EDITED = 'shlink/editTag/TAG_EDITED'; @@ -41,7 +39,7 @@ export default buildReducer({ [EDIT_TAG_START]: (state) => ({ ...state, editing: true, error: false }), [EDIT_TAG_ERROR]: (state, { errorData }) => ({ ...state, editing: false, error: true, errorData }), [EDIT_TAG]: (_, action) => ({ - ...pick([ 'oldName', 'newName' ], action), + ...pick(['oldName', 'newName'], action), editing: false, error: false, }), @@ -53,10 +51,10 @@ export const editTag = (buildShlinkApiClient: ShlinkApiClientBuilder, colorGener color: string, ) => async (dispatch: Dispatch, getState: GetState) => { dispatch({ type: EDIT_TAG_START }); - const { editTag } = buildShlinkApiClient(getState); + const { editTag: shlinkEditTag } = buildShlinkApiClient(getState); try { - await editTag(oldName, newName); + await shlinkEditTag(oldName, newName); colorGenerator.setColorForKey(newName, color); dispatch({ type: EDIT_TAG, oldName, newName }); } catch (e: any) { diff --git a/src/tags/reducers/tagsList.ts b/src/tags/reducers/tagsList.ts index fafbd339..afc6e620 100644 --- a/src/tags/reducers/tagsList.ts +++ b/src/tags/reducers/tagsList.ts @@ -13,12 +13,10 @@ import { CREATE_SHORT_URL, CreateShortUrlAction } from '../../short-urls/reducer import { DeleteTagAction, TAG_DELETED } from './tagDelete'; import { EditTagAction, TAG_EDITED } from './tagEdit'; -/* eslint-disable padding-line-between-statements */ export const LIST_TAGS_START = 'shlink/tagsList/LIST_TAGS_START'; export const LIST_TAGS_ERROR = 'shlink/tagsList/LIST_TAGS_ERROR'; export const LIST_TAGS = 'shlink/tagsList/LIST_TAGS'; export const FILTER_TAGS = 'shlink/tagsList/FILTER_TAGS'; -/* eslint-enable padding-line-between-statements */ type TagsStatsMap = Record; @@ -58,19 +56,19 @@ const initialState = { type TagIncrease = [string, number]; -const renameTag = (oldName: string, newName: string) => (tag: string) => tag === oldName ? newName : tag; +const renameTag = (oldName: string, newName: string) => (tag: string) => (tag === oldName ? newName : tag); const rejectTag = (tags: string[], tagToReject: string) => reject((tag) => tag === tagToReject, tags); -const increaseVisitsForTags = (tags: TagIncrease[], stats: TagsStatsMap) => tags.reduce((stats, [ tag, increase ]) => { - if (!stats[tag]) { - return stats; +const increaseVisitsForTags = (tags: TagIncrease[], stats: TagsStatsMap) => tags.reduce((theStats, [tag, increase]) => { + if (!theStats[tag]) { + return theStats; } - const tagStats = stats[tag]; + const tagStats = theStats[tag]; - tagStats.visitsCount = tagStats.visitsCount + increase; - stats[tag] = tagStats; + tagStats.visitsCount += increase; + theStats[tag] = tagStats; // eslint-disable-line no-param-reassign - return stats; + return theStats; }, { ...stats }); const calculateVisitsPerTag = (createdVisits: CreateVisit[]): TagIncrease[] => Object.entries( createdVisits.reduce((acc, { shortUrl }) => { @@ -123,8 +121,8 @@ export const listTags = (buildShlinkApiClient: ShlinkApiClientBuilder, force = t dispatch({ type: LIST_TAGS_START }); try { - const { listTags } = buildShlinkApiClient(getState); - const { tags, stats = [] }: ShlinkTags = await listTags(); + const { listTags: shlinkListTags } = buildShlinkApiClient(getState); + const { tags, stats = [] }: ShlinkTags = await shlinkListTags(); const processedStats = stats.reduce((acc, { tag, shortUrlsCount, visitsCount }) => { acc[tag] = { shortUrlsCount, visitsCount }; diff --git a/src/tags/services/provideServices.ts b/src/tags/services/provideServices.ts index 99009367..5a1a4221 100644 --- a/src/tags/services/provideServices.ts +++ b/src/tags/services/provideServices.ts @@ -15,15 +15,15 @@ import { TagsTableRow } from '../TagsTableRow'; const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { // Components bottle.serviceFactory('TagsSelector', TagsSelector, 'ColorGenerator'); - bottle.decorator('TagsSelector', connect([ 'tagsList', 'settings' ], [ 'listTags' ])); + bottle.decorator('TagsSelector', connect(['tagsList', 'settings'], ['listTags'])); bottle.serviceFactory('TagCard', TagCard, 'DeleteTagConfirmModal', 'EditTagModal', 'ColorGenerator'); bottle.serviceFactory('DeleteTagConfirmModal', () => DeleteTagConfirmModal); - bottle.decorator('DeleteTagConfirmModal', connect([ 'tagDelete' ], [ 'deleteTag', 'tagDeleted' ])); + bottle.decorator('DeleteTagConfirmModal', connect(['tagDelete'], ['deleteTag', 'tagDeleted'])); bottle.serviceFactory('EditTagModal', EditTagModal, 'ColorGenerator'); - bottle.decorator('EditTagModal', connect([ 'tagEdit' ], [ 'editTag', 'tagEdited' ])); + bottle.decorator('EditTagModal', connect(['tagEdit'], ['editTag', 'tagEdited'])); bottle.serviceFactory('TagsCards', TagsCards, 'TagCard'); bottle.serviceFactory('TagsTableRow', TagsTableRow, 'DeleteTagConfirmModal', 'EditTagModal', 'ColorGenerator'); @@ -32,8 +32,8 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { bottle.serviceFactory('TagsList', TagsList, 'TagsCards', 'TagsTable'); bottle.decorator('TagsList', connect( - [ 'tagsList', 'selectedServer', 'mercureInfo', 'settings' ], - [ 'forceListTags', 'filterTags', 'createNewVisits', 'loadMercureInfo' ], + ['tagsList', 'selectedServer', 'mercureInfo', 'settings'], + ['forceListTags', 'filterTags', 'createNewVisits', 'loadMercureInfo'], )); // Actions diff --git a/src/utils/DropdownBtn.tsx b/src/utils/DropdownBtn.tsx index 1deee007..bbed5ba5 100644 --- a/src/utils/DropdownBtn.tsx +++ b/src/utils/DropdownBtn.tsx @@ -15,7 +15,7 @@ export interface DropdownBtnProps { export const DropdownBtn: FC = ( { text, disabled = false, className = '', children, dropdownClassName, right = false, minWidth }, ) => { - const [ isOpen, toggle ] = useToggle(); + const [isOpen, toggle] = useToggle(); const toggleClasses = `dropdown-btn__toggle btn-block ${className}`; const style = { minWidth: minWidth && `${minWidth}px` }; diff --git a/src/utils/OrderingDropdown.tsx b/src/utils/OrderingDropdown.tsx index 7010f5dd..7b391c6a 100644 --- a/src/utils/OrderingDropdown.tsx +++ b/src/utils/OrderingDropdown.tsx @@ -38,7 +38,7 @@ export function OrderingDropdown( end={right} className={classNames('w-100', { 'ordering-dropdown__menu--link': !isButton })} > - {toPairs(items).map(([ fieldKey, fieldValue ]) => ( + {toPairs(items).map(([fieldKey, fieldValue]) => ( {fieldValue} {order.field === fieldKey && ( diff --git a/src/utils/SearchField.tsx b/src/utils/SearchField.tsx index e3997e83..5c84ed69 100644 --- a/src/utils/SearchField.tsx +++ b/src/utils/SearchField.tsx @@ -16,7 +16,7 @@ interface SearchFieldProps { } const SearchField = ({ onChange, className, large = true, noBorder = false, initialValue = '' }: SearchFieldProps) => { - const [ searchTerm, setSearchTerm ] = useState(initialValue); + const [searchTerm, setSearchTerm] = useState(initialValue); const resetTimer = () => { timer && clearTimeout(timer); diff --git a/src/utils/dates/DateRangeSelector.tsx b/src/utils/dates/DateRangeSelector.tsx index c9d7dd1a..08a569b4 100644 --- a/src/utils/dates/DateRangeSelector.tsx +++ b/src/utils/dates/DateRangeSelector.tsx @@ -25,8 +25,8 @@ export const DateRangeSelector = ( { onDatesChange, initialDateRange, defaultText, disabled, updatable = false }: DateRangeSelectorProps, ) => { const initialIntervalIsRange = rangeIsInterval(initialDateRange); - const [ activeInterval, setActiveInterval ] = useState(initialIntervalIsRange ? initialDateRange : undefined); - const [ activeDateRange, setActiveDateRange ] = useState(initialIntervalIsRange ? undefined : initialDateRange); + const [activeInterval, setActiveInterval] = useState(initialIntervalIsRange ? initialDateRange : undefined); + const [activeDateRange, setActiveDateRange] = useState(initialIntervalIsRange ? undefined : initialDateRange); const updateDateRange = (dateRange: DateRange) => { setActiveInterval(dateRangeIsEmpty(dateRange) ? 'all' : undefined); @@ -44,7 +44,7 @@ export const DateRangeSelector = ( isDateInterval && updateInterval(initialDateRange); initialDateRange && !isDateInterval && updateDateRange(initialDateRange); - }, [ initialDateRange ]); + }, [initialDateRange]); return ( diff --git a/src/utils/dates/types/index.ts b/src/utils/dates/types/index.ts index 6041a68f..d7d81d78 100644 --- a/src/utils/dates/types/index.ts +++ b/src/utils/dates/types/index.ts @@ -88,13 +88,13 @@ export const dateToMatchingInterval = (date: DateOrString): DateInterval => { const theDate: Date = parseISO(date); return cond([ - [ () => isBeforeOrEqual(startOfDay(new Date()), theDate), () => 'today' ], - [ () => isBeforeOrEqual(startOfDaysAgo(1), theDate), () => 'yesterday' ], - [ () => isBeforeOrEqual(startOfDaysAgo(7), theDate), () => 'last7Days' ], - [ () => isBeforeOrEqual(startOfDaysAgo(30), theDate), () => 'last30Days' ], - [ () => isBeforeOrEqual(startOfDaysAgo(90), theDate), () => 'last90Days' ], - [ () => isBeforeOrEqual(startOfDaysAgo(180), theDate), () => 'last180Days' ], - [ () => isBeforeOrEqual(startOfDaysAgo(365), theDate), () => 'last365Days' ], - [ T, () => 'all' ], + [() => isBeforeOrEqual(startOfDay(new Date()), theDate), () => 'today'], + [() => isBeforeOrEqual(startOfDaysAgo(1), theDate), () => 'yesterday'], + [() => isBeforeOrEqual(startOfDaysAgo(7), theDate), () => 'last7Days'], + [() => isBeforeOrEqual(startOfDaysAgo(30), theDate), () => 'last30Days'], + [() => isBeforeOrEqual(startOfDaysAgo(90), theDate), () => 'last90Days'], + [() => isBeforeOrEqual(startOfDaysAgo(180), theDate), () => 'last180Days'], + [() => isBeforeOrEqual(startOfDaysAgo(365), theDate), () => 'last365Days'], + [T, () => 'all'], ])(); }; diff --git a/src/utils/forms/InputFormGroup.tsx b/src/utils/forms/InputFormGroup.tsx index b0039a43..016671ad 100644 --- a/src/utils/forms/InputFormGroup.tsx +++ b/src/utils/forms/InputFormGroup.tsx @@ -5,7 +5,6 @@ import { LabeledFormGroup } from './LabeledFormGroup'; export interface InputFormGroupProps { value: string; onChange: (newValue: string) => void; - id?: string; type?: InputType; required?: boolean; placeholder?: string; diff --git a/src/utils/forms/LabeledFormGroup.tsx b/src/utils/forms/LabeledFormGroup.tsx index de52ecbc..cb7fd726 100644 --- a/src/utils/forms/LabeledFormGroup.tsx +++ b/src/utils/forms/LabeledFormGroup.tsx @@ -7,6 +7,7 @@ interface LabeledFormGroupProps { labelClassName?: string; } +/* eslint-disable jsx-a11y/label-has-associated-control */ export const LabeledFormGroup: FC = ( { children, label, className = '', labelClassName = '', noMargin = false }, ) => ( diff --git a/src/utils/helpers/charts.ts b/src/utils/helpers/charts.ts index e702dc09..5a849064 100644 --- a/src/utils/helpers/charts.ts +++ b/src/utils/helpers/charts.ts @@ -1,7 +1,7 @@ import { ActiveElement, ChartEvent, ChartType, TooltipItem } from 'chart.js'; import { prettify } from './numbers'; -export const pointerOnHover = ({ native }: ChartEvent, [ firstElement ]: ActiveElement[]) => { +export const pointerOnHover = ({ native }: ChartEvent, [firstElement]: ActiveElement[]) => { if (!native?.target) { return; } diff --git a/src/utils/helpers/date.ts b/src/utils/helpers/date.ts index 98aa1d4d..75c8b766 100644 --- a/src/utils/helpers/date.ts +++ b/src/utils/helpers/date.ts @@ -15,15 +15,15 @@ const formatDateFromFormat = (date?: NullableDate, theFormat?: string): Optional return theFormat ? format(date, theFormat) : formatISO(date); }; -export const formatDate = (format = 'yyyy-MM-dd') => (date?: NullableDate) => formatDateFromFormat(date, format); +export const formatDate = (theFormat = 'yyyy-MM-dd') => (date?: NullableDate) => formatDateFromFormat(date, theFormat); export const formatIsoDate = (date?: NullableDate) => formatDateFromFormat(date, undefined); export const formatInternational = formatDate(); -export const parseDate = (date: string, format: string) => parse(date, format, new Date()); +export const parseDate = (date: string, theFormat: string) => parse(date, theFormat, new Date()); -export const parseISO = (date: DateOrString): Date => isDateObject(date) ? date : stdParseISO(date); +export const parseISO = (date: DateOrString): Date => (isDateObject(date) ? date : stdParseISO(date)); export const isBetween = (date: DateOrString, start?: DateOrString, end?: DateOrString): boolean => { try { diff --git a/src/utils/helpers/features.ts b/src/utils/helpers/features.ts index 1bf01b02..850f3b57 100644 --- a/src/utils/helpers/features.ts +++ b/src/utils/helpers/features.ts @@ -5,27 +5,15 @@ const serverMatchesVersions = (versions: Versions) => (selectedServer: SelectedS isReachableServer(selectedServer) && versionMatch(selectedServer.version, versions); export const supportsQrCodeSizeInQuery = serverMatchesVersions({ minVersion: '2.5.0' }); - export const supportsShortUrlTitle = serverMatchesVersions({ minVersion: '2.6.0' }); - export const supportsOrphanVisits = supportsShortUrlTitle; - export const supportsQrCodeMargin = supportsShortUrlTitle; - export const supportsTagsInPatch = supportsShortUrlTitle; - export const supportsBotVisits = serverMatchesVersions({ minVersion: '2.7.0' }); - export const supportsCrawlableVisits = supportsBotVisits; - export const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' }); - export const supportsDomainRedirects = supportsQrErrorCorrection; - export const supportsForwardQuery = serverMatchesVersions({ minVersion: '2.9.0' }); - export const supportsDefaultDomainRedirectsEdition = serverMatchesVersions({ minVersion: '2.10.0' }); - export const supportsNonOrphanVisits = serverMatchesVersions({ minVersion: '3.0.0' }); - export const supportsAllTagsFiltering = supportsNonOrphanVisits; diff --git a/src/utils/helpers/files.ts b/src/utils/helpers/files.ts index 89f0da85..dde8bfea 100644 --- a/src/utils/helpers/files.ts +++ b/src/utils/helpers/files.ts @@ -10,7 +10,7 @@ export const saveUrl = ({ document }: Window, url: string, filename: string) => }; export const saveCsv = (window: Window, csv: string, filename: string) => { - const blob = new Blob([ csv ], { type: 'text/csv;charset=utf-8;' }); + const blob = new Blob([csv], { type: 'text/csv;charset=utf-8;' }); const url = URL.createObjectURL(blob); saveUrl(window, url, filename); diff --git a/src/utils/helpers/hooks.ts b/src/utils/helpers/hooks.ts index 63b566bb..9ad034f6 100644 --- a/src/utils/helpers/hooks.ts +++ b/src/utils/helpers/hooks.ts @@ -11,7 +11,7 @@ export const useStateFlagTimeout = ( setTimeout: (callback: Function, timeout: number) => number, clearTimeout: (timer: number) => void, ): StateFlagTimeout => (initialValue = false, delay = DEFAULT_DELAY) => { - const [ flag, setFlag ] = useState(initialValue); + const [flag, setFlag] = useState(initialValue); const timeout = useRef(undefined); const callback = () => { setFlag(!initialValue); @@ -23,15 +23,15 @@ export const useStateFlagTimeout = ( timeout.current = setTimeout(() => setFlag(initialValue), delay); }; - return [ flag, callback ]; + return [flag, callback]; }; type ToggleResult = [ boolean, () => void, () => void, () => void ]; export const useToggle = (initialValue = false): ToggleResult => { - const [ flag, setFlag ] = useState(initialValue); + const [flag, setFlag] = useState(initialValue); - return [ flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false) ]; + return [flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false)]; }; export const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) => { @@ -55,17 +55,17 @@ export const useSwipeable = (showSidebar: () => void, hideSidebar: () => void) = }; export const useQueryState = (paramName: string, initialState: T): [ T, (newValue: T) => void ] => { - const [ value, setValue ] = useState(initialState); - const setValueWithLocation = (value: T) => { + const [value, setValue] = useState(initialState); + const setValueWithLocation = (valueToSet: T) => { const { location, history } = window; const query = parseQuery(location.search); - query[paramName] = value; + query[paramName] = valueToSet; history.pushState(null, '', `${location.pathname}?${stringifyQuery(query)}`); - setValue(value); + setValue(valueToSet); }; - return [ value, setValueWithLocation ]; + return [value, setValueWithLocation]; }; export const useEffectExceptFirstTime = (callback: EffectCallback, deps: DependencyList): void => { diff --git a/src/utils/helpers/leaflet.ts b/src/utils/helpers/leaflet.ts index 2c1f621b..809e1575 100644 --- a/src/utils/helpers/leaflet.ts +++ b/src/utils/helpers/leaflet.ts @@ -4,7 +4,7 @@ import marker from 'leaflet/dist/images/marker-icon.png'; import markerShadow from 'leaflet/dist/images/marker-shadow.png'; export const fixLeafletIcons = () => { - delete (L.Icon.Default.prototype as any)._getIconUrl; + delete (L.Icon.Default.prototype as any)._getIconUrl; // eslint-disable-line no-underscore-dangle L.Icon.Default.mergeOptions({ iconRetinaUrl: marker2x, diff --git a/src/utils/helpers/ordering.ts b/src/utils/helpers/ordering.ts index 478cdeed..d79a9898 100644 --- a/src/utils/helpers/ordering.ts +++ b/src/utils/helpers/ordering.ts @@ -22,20 +22,20 @@ export const determineOrderDir = ( return currentOrderDir ? newOrderMap[currentOrderDir] : 'ASC'; }; -export const sortList = (list: List[], { field, dir }: Order>) => !field || !dir - ? list - : list.sort((a, b) => { +export const sortList = (list: List[], { field, dir }: Order>) => ( + !field || !dir ? list : list.sort((a, b) => { const greaterThan = dir === 'ASC' ? 1 : -1; const smallerThan = dir === 'ASC' ? -1 : 1; return a[field] > b[field] ? greaterThan : smallerThan; - }); + }) +); -export const orderToString = (order: Order): string | undefined => - order.dir ? `${order.field}-${order.dir}` : undefined; +export const orderToString = (order: Order): string | undefined => ( + order.dir ? `${order.field}-${order.dir}` : undefined +); export const stringToOrder = (order: string): Order => { - const [ field, dir ] = order.split('-') as [ T | undefined, OrderDir | undefined ]; - + const [field, dir] = order.split('-') as [ T | undefined, OrderDir | undefined ]; return { field, dir }; }; diff --git a/src/utils/helpers/pagination.ts b/src/utils/helpers/pagination.ts index 0fa2b87b..283fda8d 100644 --- a/src/utils/helpers/pagination.ts +++ b/src/utils/helpers/pagination.ts @@ -30,7 +30,10 @@ export const progressivePagination = (currentPage: number, pageCount: number): N export const pageIsEllipsis = (pageNumber: NumberOrEllipsis): pageNumber is Ellipsis => pageNumber === ELLIPSIS; -export const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string => - pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber); +export const prettifyPageNumber = (pageNumber: NumberOrEllipsis): string => ( + pageIsEllipsis(pageNumber) ? pageNumber : prettify(pageNumber) +); -export const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}`; +export const keyForPage = (pageNumber: NumberOrEllipsis, index: number) => ( + !pageIsEllipsis(pageNumber) ? `${pageNumber}` : `${pageNumber}_${index}` +); diff --git a/src/utils/helpers/sw.ts b/src/utils/helpers/sw.ts index a318047b..114593ff 100644 --- a/src/utils/helpers/sw.ts +++ b/src/utils/helpers/sw.ts @@ -1,9 +1,7 @@ export const forceUpdate = async () => { const registrations = await navigator.serviceWorker?.getRegistrations() ?? []; - for (const registration of registrations) { - const { waiting } = registration; - + registrations.forEach(({ waiting }) => { waiting?.addEventListener('statechange', (event) => { if ((event.target as any)?.state === 'activated') { window.location.reload(); @@ -12,5 +10,5 @@ export const forceUpdate = async () => { // The logic that makes skipWaiting to be called when this message is posted is in service-worker.ts waiting?.postMessage({ type: 'SKIP_WAITING' }); - } + }); }; diff --git a/src/utils/helpers/uri.ts b/src/utils/helpers/uri.ts index a9a41d84..a32cea3f 100644 --- a/src/utils/helpers/uri.ts +++ b/src/utils/helpers/uri.ts @@ -1,6 +1,6 @@ export const replaceAuthorityFromUri = (uri: string, newAuthority: string): string => { - const [ schema, rest ] = uri.split('://'); - const [ , ...pathParts ] = rest.split('/'); + const [schema, rest] = uri.split('://'); + const [, ...pathParts] = rest.split('/'); const normalizedPath = pathParts.length ? `/${pathParts.join('/')}` : ''; return `${schema}://${newAuthority}${normalizedPath}`; diff --git a/src/utils/helpers/version.ts b/src/utils/helpers/version.ts index 41cf9ade..6116a6da 100644 --- a/src/utils/helpers/version.ts +++ b/src/utils/helpers/version.ts @@ -34,7 +34,7 @@ const versionIsValidSemVer = memoizeWith(identity, (version: string): version is } }); -export const versionToPrintable = (version: string) => !versionIsValidSemVer(version) ? version : `v${version}`; +export const versionToPrintable = (version: string) => (!versionIsValidSemVer(version) ? version : `v${version}`); export const versionToSemVer = (defaultValue: SemVer = 'latest') => - (version: string): SemVer => versionIsValidSemVer(version) ? version : defaultValue; + (version: string): SemVer => (versionIsValidSemVer(version) ? version : defaultValue); diff --git a/src/utils/utils.ts b/src/utils/utils.ts index e341e51d..8f07a336 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -25,6 +25,6 @@ export type RecursivePartial = { [P in keyof T]?: RecursivePartial; }; -export const nonEmptyValueOrNull = (value: T): T | null => isEmpty(value) ? null : value; +export const nonEmptyValueOrNull = (value: T): T | null => (isEmpty(value) ? null : value); export const capitalize = (value: T): string => `${value.charAt(0).toUpperCase()}${value.slice(1)}`; diff --git a/src/visits/NonOrphanVisits.tsx b/src/visits/NonOrphanVisits.tsx index b5e4a1eb..231c2f7e 100644 --- a/src/visits/NonOrphanVisits.tsx +++ b/src/visits/NonOrphanVisits.tsx @@ -39,4 +39,4 @@ export const NonOrphanVisits = ({ exportVisits }: ReportExporter) => boundToMerc ); -}, () => [ Topics.visits ]); +}, () => [Topics.visits]); diff --git a/src/visits/OrphanVisits.tsx b/src/visits/OrphanVisits.tsx index e2e20393..8779be4b 100644 --- a/src/visits/OrphanVisits.tsx +++ b/src/visits/OrphanVisits.tsx @@ -44,4 +44,4 @@ export const OrphanVisits = ({ exportVisits }: ReportExporter) => boundToMercure ); -}, () => [ Topics.orphanVisits ]); +}, () => [Topics.orphanVisits]); diff --git a/src/visits/ShortUrlVisits.tsx b/src/visits/ShortUrlVisits.tsx index 153da858..55323aec 100644 --- a/src/visits/ShortUrlVisits.tsx +++ b/src/visits/ShortUrlVisits.tsx @@ -59,6 +59,6 @@ const ShortUrlVisits = ({ exportVisits }: ReportExporter) => boundToMercureHub(( ); -}, (_, params) => [ Topics.shortUrlVisits(params.shortCode) ]); +}, (_, params) => [Topics.shortUrlVisits(params.shortCode)]); export default ShortUrlVisits; diff --git a/src/visits/ShortUrlVisitsHeader.tsx b/src/visits/ShortUrlVisitsHeader.tsx index 10f1a546..f7d0bf5a 100644 --- a/src/visits/ShortUrlVisitsHeader.tsx +++ b/src/visits/ShortUrlVisitsHeader.tsx @@ -19,7 +19,7 @@ const ShortUrlVisitsHeader = ({ shortUrlDetail, shortUrlVisits, goBack }: ShortU const longLink = shortUrl?.longUrl ?? ''; const title = shortUrl?.title; - const renderDate = () => !shortUrl ? Loading... : ( + const renderDate = () => (!shortUrl ? Loading... : ( - ); + )); const visitsStatsTitle = <>Visits for ; return ( diff --git a/src/visits/TagVisits.tsx b/src/visits/TagVisits.tsx index 993edca7..74018ec5 100644 --- a/src/visits/TagVisits.tsx +++ b/src/visits/TagVisits.tsx @@ -43,6 +43,6 @@ const TagVisits = (colorGenerator: ColorGenerator, { exportVisits }: ReportExpor ); -}, () => [ Topics.visits ]); +}, () => [Topics.visits]); export default TagVisits; diff --git a/src/visits/VisitsStats.tsx b/src/visits/VisitsStats.tsx index cb0b8e77..90e7fbe7 100644 --- a/src/visits/VisitsStats.tsx +++ b/src/visits/VisitsStats.tsx @@ -67,13 +67,13 @@ const VisitsStats: FC = ({ isOrphanVisits = false, }) => { const { visits, loading, loadingLarge, error, errorData, progress, fallbackInterval } = visitsInfo; - const [ initialInterval, setInitialInterval ] = useState( + const [initialInterval, setInitialInterval] = useState( fallbackInterval ?? settings.visits?.defaultInterval ?? 'last30Days', ); - const [ dateRange, setDateRange ] = useState(intervalToDateRange(initialInterval)); - const [ highlightedVisits, setHighlightedVisits ] = useState([]); - const [ highlightedLabel, setHighlightedLabel ] = useState(); - const [ visitsFilter, setVisitsFilter ] = useState({}); + const [dateRange, setDateRange] = useState(intervalToDateRange(initialInterval)); + const [highlightedVisits, setHighlightedVisits] = useState([]); + const [highlightedLabel, setHighlightedLabel] = useState(); + const [visitsFilter, setVisitsFilter] = useState({}); const botsSupported = supportsBotVisits(selectedServer); const isFirstLoad = useRef(true); @@ -82,10 +82,10 @@ const VisitsStats: FC = ({ return !subPath ? `${query}` : `${subPath}${query}`; }; - const normalizedVisits = useMemo(() => normalizeVisits(visits), [ visits ]); + const normalizedVisits = useMemo(() => normalizeVisits(visits), [visits]); const { os, browsers, referrers, countries, cities, citiesForMap, visitedUrls } = useMemo( () => processStatsFromVisits(normalizedVisits), - [ normalizedVisits ], + [normalizedVisits], ); const mapLocations = values(citiesForMap); @@ -111,10 +111,10 @@ const VisitsStats: FC = ({ useEffect(() => { getVisits({ dateRange, filter: visitsFilter }, isFirstLoad.current); isFirstLoad.current = false; - }, [ dateRange, visitsFilter ]); + }, [dateRange, visitsFilter]); useEffect(() => { fallbackInterval && setInitialInterval(fallbackInterval); - }, [ fallbackInterval ]); + }, [fallbackInterval]); const renderVisitsContent = () => { if (loadingLarge) { @@ -235,10 +235,9 @@ const VisitsStats: FC = ({ stats={cities} highlightedStats={highlightedVisitsToStats(highlightedVisits, 'city')} highlightedLabel={highlightedLabel} - extraHeaderContent={(activeCities: string[]) => - mapLocations.length > 0 && + extraHeaderContent={(activeCities: string[]) => mapLocations.length > 0 && ( - } + )} sortingItems={{ name: 'City name', amount: 'Visits amount', diff --git a/src/visits/VisitsTable.tsx b/src/visits/VisitsTable.tsx index 21cfae83..d5b02a0e 100644 --- a/src/visits/VisitsTable.tsx +++ b/src/visits/VisitsTable.tsx @@ -37,7 +37,7 @@ const searchVisits = (searchTerm: string, visits: NormalizedVisit[]) => visits.filter((visit) => visitMatchesSearch(visit, searchTerm)); const sortVisits = (order: VisitsOrder, visits: NormalizedVisit[]) => sortList(visits, order as any); const calculateVisits = (allVisits: NormalizedVisit[], searchTerm: string | undefined, order: VisitsOrder) => { - const filteredVisits = searchTerm ? searchVisits(searchTerm, allVisits) : [ ...allVisits ]; + const filteredVisits = searchTerm ? searchVisits(searchTerm, allVisits) : [...allVisits]; const sortedVisits = sortVisits(order, filteredVisits); const total = sortedVisits.length; const visitsGroups = splitEvery(PAGE_SIZE, sortedVisits); @@ -56,12 +56,12 @@ const VisitsTable = ({ const headerCellsClass = 'visits-table__header-cell visits-table__sticky'; const matchMobile = () => matchMedia('(max-width: 767px)').matches; - const [ isMobileDevice, setIsMobileDevice ] = useState(matchMobile()); - const [ searchTerm, setSearchTerm ] = useState(undefined); - const [ order, setOrder ] = useState({}); - const resultSet = useMemo(() => calculateVisits(visits, searchTerm, order), [ searchTerm, order ]); + const [isMobileDevice, setIsMobileDevice] = useState(matchMobile()); + const [searchTerm, setSearchTerm] = useState(undefined); + const [order, setOrder] = useState({}); + const resultSet = useMemo(() => calculateVisits(visits, searchTerm, order), [searchTerm, order]); const isFirstLoad = useRef(true); - const [ page, setPage ] = useState(1); + const [page, setPage] = useState(1); const end = page * PAGE_SIZE; const start = end - PAGE_SIZE; const supportsBots = supportsBotVisits(selectedServer); @@ -84,7 +84,7 @@ const VisitsTable = ({ !isFirstLoad.current && setSelectedVisits([]); isFirstLoad.current = false; - }, [ searchTerm ]); + }, [searchTerm]); return (
@@ -159,7 +159,7 @@ const VisitsTable = ({ style={{ cursor: 'pointer' }} className={classNames({ 'table-active': isSelected })} onClick={() => setSelectedVisits( - isSelected ? selectedVisits.filter((v) => v !== visit) : [ ...selectedVisits, visit ], + isSelected ? selectedVisits.filter((v) => v !== visit) : [...selectedVisits, visit], )} > diff --git a/src/visits/charts/DoughnutChart.tsx b/src/visits/charts/DoughnutChart.tsx index 07280a32..bc403488 100644 --- a/src/visits/charts/DoughnutChart.tsx +++ b/src/visits/charts/DoughnutChart.tsx @@ -37,7 +37,7 @@ const generateChartData = (labels: string[], data: number[]): ChartData => ({ }); export const DoughnutChart: FC = memo(({ stats }) => { - const [ chartRef, setChartRef ] = useState(); // Cannot use useRef here + const [chartRef, setChartRef] = useState(); // Cannot use useRef here const labels = keys(stats); const data = values(stats); diff --git a/src/visits/charts/HorizontalBarChart.tsx b/src/visits/charts/HorizontalBarChart.tsx index 112974a5..4ab27664 100644 --- a/src/visits/charts/HorizontalBarChart.tsx +++ b/src/visits/charts/HorizontalBarChart.tsx @@ -16,9 +16,9 @@ export interface HorizontalBarChartProps { onClick?: (label: string) => void; } -const dropLabelIfHidden = (label: string) => label.startsWith('hidden') ? '' : label; +const dropLabelIfHidden = (label: string) => (label.startsWith('hidden') ? '' : label); const statsAreDefined = (stats: Stats | undefined): stats is Stats => !!stats && Object.keys(stats).length > 0; -const determineHeight = (labels: string[]): number | undefined => labels.length > 20 ? labels.length * 10 : undefined; +const determineHeight = (labels: string[]): number | undefined => (labels.length > 20 ? labels.length * 10 : undefined); const generateChartDatasets = ( data: number[], @@ -34,7 +34,7 @@ const generateChartDatasets = ( }; if (highlightedData.every((value) => value === 0)) { - return [ mainDataset ]; + return [mainDataset]; } const highlightedDataset: ChartDataset = { @@ -45,7 +45,7 @@ const generateChartDatasets = ( borderWidth: 2, }; - return [ mainDataset, highlightedDataset ]; + return [mainDataset, highlightedDataset]; }; const generateChartData = ( labels: string[], @@ -58,7 +58,7 @@ const generateChartData = ( }); type ClickedCharts = [{ index: number }] | []; -const chartElementAtEvent = (labels: string[], onClick?: (label: string) => void) => ([ chart ]: ClickedCharts) => { +const chartElementAtEvent = (labels: string[], onClick?: (label: string) => void) => ([chart]: ClickedCharts) => { if (!onClick || !chart) { return; } diff --git a/src/visits/charts/LineChartCard.tsx b/src/visits/charts/LineChartCard.tsx index 38c47453..78399daf 100644 --- a/src/visits/charts/LineChartCard.tsx +++ b/src/visits/charts/LineChartCard.tsx @@ -79,9 +79,9 @@ const determineInitialStep = (oldestVisitDate: string): Step => { const now = new Date(); const oldestDate = parseISO(oldestVisitDate); const matcher = cond([ - [ () => differenceInDays(now, oldestDate) <= 2, always('hourly') ], // Less than 2 days - [ () => differenceInMonths(now, oldestDate) <= 1, always('daily') ], // Between 2 days and 1 month - [ () => differenceInMonths(now, oldestDate) <= 6, always('weekly') ], // Between 1 and 6 months + [() => differenceInDays(now, oldestDate) <= 2, always('hourly')], // Less than 2 days + [() => differenceInMonths(now, oldestDate) <= 1, always('daily')], // Between 2 days and 1 month + [() => differenceInMonths(now, oldestDate) <= 6, always('weekly')], // Between 1 and 6 months ]); return matcher() ?? 'monthly'; @@ -126,12 +126,12 @@ const generateLabelsAndGroupedVisits = ( skipNoElements: boolean, ): [string[], number[]] => { if (skipNoElements) { - return [ Object.keys(groupedVisitsWithGaps), Object.values(groupedVisitsWithGaps) ]; + return [Object.keys(groupedVisitsWithGaps), Object.values(groupedVisitsWithGaps)]; } const labels = generateLabels(step, visits); - return [ labels, fillTheGaps(groupedVisitsWithGaps, labels) ]; + return [labels, fillTheGaps(groupedVisitsWithGaps, labels)]; }; const generateDataset = (data: number[], label: string, color: string): ChartDataset => ({ @@ -149,7 +149,7 @@ const chartElementAtEvent = ( labels: string[], datasetsByPoint: Record, setSelectedVisits?: (visits: NormalizedVisit[]) => void, -) => ([ chart ]: [{ index: number }]) => { +) => ([chart]: [{ index: number }]) => { if (!setSelectedVisits || !chart) { return; } @@ -160,7 +160,7 @@ const chartElementAtEvent = ( setSelectedVisits([]); selectedLabel = null; } else { - setSelectedVisits(labels[index] && datasetsByPoint[labels[index]] || []); + setSelectedVisits(labels[index] ? datasetsByPoint[labels[index]] : []); selectedLabel = labels[index] ?? null; } }; @@ -168,31 +168,31 @@ const chartElementAtEvent = ( const LineChartCard = ( { title, visits, highlightedVisits, highlightedLabel = 'Selected', setSelectedVisits }: LineChartCardProps, ) => { - const [ step, setStep ] = useState( + const [step, setStep] = useState( visits.length > 0 ? determineInitialStep(visits[visits.length - 1].date) : 'monthly', ); - const [ skipNoVisits, toggleSkipNoVisits ] = useToggle(true); + const [skipNoVisits, toggleSkipNoVisits] = useToggle(true); - const datasetsByPoint = useMemo(() => visitsToDatasetGroups(step, visits), [ step, visits ]); - const groupedVisitsWithGaps = useMemo(() => groupVisitsByStep(step, reverse(visits)), [ step, visits ]); - const [ labels, groupedVisits ] = useMemo( + const datasetsByPoint = useMemo(() => visitsToDatasetGroups(step, visits), [step, visits]); + const groupedVisitsWithGaps = useMemo(() => groupVisitsByStep(step, reverse(visits)), [step, visits]); + const [labels, groupedVisits] = useMemo( () => generateLabelsAndGroupedVisits(visits, groupedVisitsWithGaps, step, skipNoVisits), - [ visits, step, skipNoVisits ], + [visits, step, skipNoVisits], ); const groupedHighlighted = useMemo( () => fillTheGaps(groupVisitsByStep(step, reverse(highlightedVisits)), labels), - [ highlightedVisits, step, labels ], + [highlightedVisits, step, labels], ); const generateChartDatasets = (): ChartDataset[] => { const mainDataset = generateDataset(groupedVisits, 'Visits', MAIN_COLOR); if (highlightedVisits.length === 0) { - return [ mainDataset ]; + return [mainDataset]; } const highlightedDataset = generateDataset(groupedHighlighted, highlightedLabel, HIGHLIGHTED_COLOR); - return [ mainDataset, highlightedDataset ]; + return [mainDataset, highlightedDataset]; }; const generateChartData = (): ChartData => ({ labels, datasets: generateChartDatasets() }); @@ -238,7 +238,7 @@ const LineChartCard = ( Group by - {Object.entries(STEPS_MAP).map(([ value, menuText ]) => ( + {Object.entries(STEPS_MAP).map(([value, menuText]) => ( setStep(value as Step)}> {menuText} diff --git a/src/visits/charts/SortableBarChartCard.tsx b/src/visits/charts/SortableBarChartCard.tsx index 6b39fd17..0111585e 100644 --- a/src/visits/charts/SortableBarChartCard.tsx +++ b/src/visits/charts/SortableBarChartCard.tsx @@ -17,9 +17,9 @@ interface SortableBarChartCardProps extends Omit extraHeaderContent?: Function; } -const toLowerIfString = (value: any) => type(value) === 'String' ? toLower(value) : value; // eslint-disable-line @typescript-eslint/no-unsafe-return -const pickKeyFromPair = ([ key ]: StatsRow) => key; -const pickValueFromPair = ([ , value ]: StatsRow) => value; +const toLowerIfString = (value: any) => (type(value) === 'String' ? toLower(value) : value); +const pickKeyFromPair = ([key]: StatsRow) => key; +const pickValueFromPair = ([, value]: StatsRow) => value; export const SortableBarChartCard: FC = ({ stats, @@ -30,15 +30,15 @@ export const SortableBarChartCard: FC = ({ withPagination = true, ...rest }) => { - const [ order, setOrder ] = useState>({}); - const [ currentPage, setCurrentPage ] = useState(1); - const [ itemsPerPage, setItemsPerPage ] = useState(50); + const [order, setOrder] = useState>({}); + const [currentPage, setCurrentPage] = useState(1); + const [itemsPerPage, setItemsPerPage] = useState(50); - const getSortedPairsForStats = (stats: Stats, sortingItems: Record) => { - const pairs = toPairs(stats); + const getSortedPairsForStats = (statsToSort: Stats, sorting: Record) => { + const pairs = toPairs(statsToSort); const sortedPairs = !order.field ? pairs : sortBy( pipe( - order.field === Object.keys(sortingItems)[0] ? pickKeyFromPair : pickValueFromPair, + order.field === Object.keys(sorting)[0] ? pickKeyFromPair : pickValueFromPair, toLowerIfString, ), pairs, @@ -56,16 +56,16 @@ export const SortableBarChartCard: FC = ({ const firstPageLength = pages[0].length; // Using the "hidden" key, the chart will just replace the label by an empty string - return [ ...page, ...rangeOf(firstPageLength - page.length, (i): StatsRow => [ `hidden_${i}`, 0 ]) ]; + return [...page, ...rangeOf(firstPageLength - page.length, (i): StatsRow => [`hidden_${i}`, 0])]; }; const renderPagination = (pagesCount: number) => ; - const determineStats = (stats: Stats, highlightedStats: Stats | undefined, sortingItems: Record) => { - const sortedPairs = getSortedPairsForStats(stats, sortingItems); + const determineStats = (statsToSort: Stats, sorting: Record, theHighlightedStats?: Stats) => { + const sortedPairs = getSortedPairsForStats(statsToSort, sorting); const sortedKeys = sortedPairs.map(pickKeyFromPair); // The highlighted stats have to be ordered based on the regular stats, not on its own values - const sortedHighlightedPairs = highlightedStats && toPairs( - { ...zipObj(sortedKeys, sortedKeys.map(() => 0)), ...highlightedStats }, + const sortedHighlightedPairs = theHighlightedStats && toPairs( + { ...zipObj(sortedKeys, sortedKeys.map(() => 0)), ...theHighlightedStats }, ); if (sortedPairs.length <= itemsPerPage) { @@ -88,8 +88,8 @@ export const SortableBarChartCard: FC = ({ const { currentPageStats, currentPageHighlightedStats, pagination, max } = determineStats( stats, - highlightedStats && Object.keys(highlightedStats).length > 0 ? highlightedStats : undefined, sortingItems, + highlightedStats && Object.keys(highlightedStats).length > 0 ? highlightedStats : undefined, ); const activeCities = Object.keys(currentPageStats); const computeTitle = () => ( @@ -111,10 +111,10 @@ export const SortableBarChartCard: FC = ({
{ - setItemsPerPage(itemsPerPage); + setValue={(value) => { + setItemsPerPage(value); setCurrentPage(1); }} /> diff --git a/src/visits/helpers/OpenMapModalBtn.tsx b/src/visits/helpers/OpenMapModalBtn.tsx index 32845502..d4a5f88a 100644 --- a/src/visits/helpers/OpenMapModalBtn.tsx +++ b/src/visits/helpers/OpenMapModalBtn.tsx @@ -1,7 +1,7 @@ import { useRef, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faMapMarkedAlt as mapIcon } from '@fortawesome/free-solid-svg-icons'; -import { Dropdown, DropdownItem, DropdownMenu, UncontrolledTooltip } from 'reactstrap'; +import { Button, Dropdown, DropdownItem, DropdownMenu, UncontrolledTooltip } from 'reactstrap'; import { useToggle } from '../../utils/helpers/hooks'; import { CityStats } from '../types'; import MapModal from './MapModal'; @@ -14,9 +14,9 @@ interface OpenMapModalBtnProps { } const OpenMapModalBtn = ({ modalTitle, activeCities, locations = [] }: OpenMapModalBtnProps) => { - const [ mapIsOpened, , openMap, closeMap ] = useToggle(); - const [ dropdownIsOpened, toggleDropdown, openDropdown ] = useToggle(); - const [ locationsToShow, setLocationsToShow ] = useState([]); + const [mapIsOpened, , openMap, closeMap] = useToggle(); + const [dropdownIsOpened, toggleDropdown, openDropdown] = useToggle(); + const [locationsToShow, setLocationsToShow] = useState([]); const buttonRef = useRef(); const filterLocations = (cities: CityStats[]) => cities.filter(({ cityName }) => activeCities.includes(cityName)); @@ -37,9 +37,9 @@ const OpenMapModalBtn = ({ modalTitle, activeCities, locations = [] }: OpenMapMo return ( <> - + buttonRef.current) as any}>Show in map diff --git a/src/visits/reducers/common.ts b/src/visits/reducers/common.ts index 0d9ecff6..1a08d7a7 100644 --- a/src/visits/reducers/common.ts +++ b/src/visits/reducers/common.ts @@ -11,7 +11,7 @@ const PARALLEL_REQUESTS_COUNT = 4; const PARALLEL_STARTING_PAGE = 2; const isLastPage = ({ currentPage, pagesCount }: ShlinkPaginator): boolean => currentPage >= pagesCount; -const calcProgress = (total: number, current: number): number => current * 100 / total; +const calcProgress = (total: number, current: number): number => (current * 100) / total; type VisitsLoader = (page: number, itemsPerPage: number) => Promise; type LastVisitLoader = () => Promise; @@ -73,7 +73,7 @@ export const getVisitsWithLoader = async & { visits: V }; try { - const [ visits, lastVisit ] = await Promise.all([ loadVisits(), lastVisitLoader() ]); + const [visits, lastVisit] = await Promise.all([loadVisits(), lastVisitLoader()]); dispatch( !visits.length && lastVisit diff --git a/src/visits/reducers/nonOrphanVisits.ts b/src/visits/reducers/nonOrphanVisits.ts index 2ce9fa9d..41d1a5dc 100644 --- a/src/visits/reducers/nonOrphanVisits.ts +++ b/src/visits/reducers/nonOrphanVisits.ts @@ -14,7 +14,6 @@ import { isBetween } from '../../utils/helpers/date'; import { getVisitsWithLoader, lastVisitLoaderForLoader } from './common'; import { CREATE_VISITS, CreateVisitsAction } from './visitCreation'; -/* eslint-disable padding-line-between-statements */ export const GET_NON_ORPHAN_VISITS_START = 'shlink/orphanVisits/GET_NON_ORPHAN_VISITS_START'; export const GET_NON_ORPHAN_VISITS_ERROR = 'shlink/orphanVisits/GET_NON_ORPHAN_VISITS_ERROR'; export const GET_NON_ORPHAN_VISITS = 'shlink/orphanVisits/GET_NON_ORPHAN_VISITS'; @@ -22,7 +21,6 @@ export const GET_NON_ORPHAN_VISITS_LARGE = 'shlink/orphanVisits/GET_NON_ORPHAN_V export const GET_NON_ORPHAN_VISITS_CANCEL = 'shlink/orphanVisits/GET_NON_ORPHAN_VISITS_CANCEL'; export const GET_NON_ORPHAN_VISITS_PROGRESS_CHANGED = 'shlink/orphanVisits/GET_NON_ORPHAN_VISITS_PROGRESS_CHANGED'; export const GET_NON_ORPHAN_VISITS_FALLBACK_TO_INTERVAL = 'shlink/orphanVisits/GET_NON_ORPHAN_VISITS_FALLBACK_TO_INTERVAL'; -/* eslint-enable padding-line-between-statements */ export interface NonOrphanVisitsAction extends Action { visits: Visit[]; @@ -59,7 +57,7 @@ export default buildReducer({ .filter(({ visit }) => isBetween(visit.date, startDate, endDate)) .map(({ visit }) => visit); - return { ...state, visits: [ ...newVisits, ...visits ] }; + return { ...state, visits: [...newVisits, ...visits] }; }, }, initialState); @@ -67,10 +65,10 @@ export const getNonOrphanVisits = (buildShlinkApiClient: ShlinkApiClientBuilder) query: ShlinkVisitsParams = {}, doIntervalFallback = false, ) => async (dispatch: Dispatch, getState: GetState) => { - const { getNonOrphanVisits } = buildShlinkApiClient(getState); + const { getNonOrphanVisits: shlinkGetNonOrphanVisits } = buildShlinkApiClient(getState); const visitsLoader = async (page: number, itemsPerPage: number) => - getNonOrphanVisits({ ...query, page, itemsPerPage }); - const lastVisitLoader = lastVisitLoaderForLoader(doIntervalFallback, getNonOrphanVisits); + shlinkGetNonOrphanVisits({ ...query, page, itemsPerPage }); + const lastVisitLoader = lastVisitLoaderForLoader(doIntervalFallback, shlinkGetNonOrphanVisits); const shouldCancel = () => getState().orphanVisits.cancelLoad; const extraFinishActionData: Partial = { query }; const actionMap = { diff --git a/src/visits/reducers/orphanVisits.ts b/src/visits/reducers/orphanVisits.ts index 03a93cf6..69fec2cd 100644 --- a/src/visits/reducers/orphanVisits.ts +++ b/src/visits/reducers/orphanVisits.ts @@ -17,7 +17,6 @@ import { isBetween } from '../../utils/helpers/date'; import { getVisitsWithLoader, lastVisitLoaderForLoader } from './common'; import { CREATE_VISITS, CreateVisitsAction } from './visitCreation'; -/* eslint-disable padding-line-between-statements */ export const GET_ORPHAN_VISITS_START = 'shlink/orphanVisits/GET_ORPHAN_VISITS_START'; export const GET_ORPHAN_VISITS_ERROR = 'shlink/orphanVisits/GET_ORPHAN_VISITS_ERROR'; export const GET_ORPHAN_VISITS = 'shlink/orphanVisits/GET_ORPHAN_VISITS'; @@ -25,7 +24,6 @@ export const GET_ORPHAN_VISITS_LARGE = 'shlink/orphanVisits/GET_ORPHAN_VISITS_LA export const GET_ORPHAN_VISITS_CANCEL = 'shlink/orphanVisits/GET_ORPHAN_VISITS_CANCEL'; export const GET_ORPHAN_VISITS_PROGRESS_CHANGED = 'shlink/orphanVisits/GET_ORPHAN_VISITS_PROGRESS_CHANGED'; export const GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL = 'shlink/orphanVisits/GET_ORPHAN_VISITS_FALLBACK_TO_INTERVAL'; -/* eslint-enable padding-line-between-statements */ export interface OrphanVisitsAction extends Action { visits: Visit[]; @@ -62,7 +60,7 @@ export default buildReducer({ .filter(({ visit, shortUrl }) => !shortUrl && isBetween(visit.date, startDate, endDate)) .map(({ visit }) => visit); - return { ...state, visits: [ ...newVisits, ...visits ] }; + return { ...state, visits: [...newVisits, ...visits] }; }, }, initialState); @@ -74,14 +72,14 @@ export const getOrphanVisits = (buildShlinkApiClient: ShlinkApiClientBuilder) => orphanVisitsType?: OrphanVisitType, doIntervalFallback = false, ) => async (dispatch: Dispatch, getState: GetState) => { - const { getOrphanVisits } = buildShlinkApiClient(getState); - const visitsLoader = async (page: number, itemsPerPage: number) => getOrphanVisits({ ...query, page, itemsPerPage }) + const { getOrphanVisits: getVisits } = buildShlinkApiClient(getState); + const visitsLoader = async (page: number, itemsPerPage: number) => getVisits({ ...query, page, itemsPerPage }) .then((result) => { const visits = result.data.filter((visit) => isOrphanVisit(visit) && matchesType(visit, orphanVisitsType)); return { ...result, data: visits }; }); - const lastVisitLoader = lastVisitLoaderForLoader(doIntervalFallback, getOrphanVisits); + const lastVisitLoader = lastVisitLoaderForLoader(doIntervalFallback, getVisits); const shouldCancel = () => getState().orphanVisits.cancelLoad; const extraFinishActionData: Partial = { query }; const actionMap = { diff --git a/src/visits/reducers/shortUrlVisits.ts b/src/visits/reducers/shortUrlVisits.ts index 9b5cd352..9f568768 100644 --- a/src/visits/reducers/shortUrlVisits.ts +++ b/src/visits/reducers/shortUrlVisits.ts @@ -11,7 +11,6 @@ import { isBetween } from '../../utils/helpers/date'; import { getVisitsWithLoader, lastVisitLoaderForLoader } from './common'; import { CREATE_VISITS, CreateVisitsAction } from './visitCreation'; -/* eslint-disable padding-line-between-statements */ export const GET_SHORT_URL_VISITS_START = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS_START'; export const GET_SHORT_URL_VISITS_ERROR = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS_ERROR'; export const GET_SHORT_URL_VISITS = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS'; @@ -19,7 +18,6 @@ export const GET_SHORT_URL_VISITS_LARGE = 'shlink/shortUrlVisits/GET_SHORT_URL_V export const GET_SHORT_URL_VISITS_CANCEL = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS_CANCEL'; export const GET_SHORT_URL_VISITS_PROGRESS_CHANGED = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS_PROGRESS_CHANGED'; export const GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL = 'shlink/shortUrlVisits/GET_SHORT_URL_VISITS_FALLBACK_TO_INTERVAL'; -/* eslint-enable padding-line-between-statements */ export interface ShortUrlVisits extends VisitsInfo, ShortUrlIdentifier {} @@ -71,7 +69,7 @@ export default buildReducer({ ) .map(({ visit }) => visit); - return newVisits.length === 0 ? state : { ...state, visits: [ ...newVisits, ...visits ] }; + return newVisits.length === 0 ? state : { ...state, visits: [...newVisits, ...visits] }; }, }, initialState); @@ -80,14 +78,14 @@ export const getShortUrlVisits = (buildShlinkApiClient: ShlinkApiClientBuilder) query: ShlinkVisitsParams = {}, doIntervalFallback = false, ) => async (dispatch: Dispatch, getState: GetState) => { - const { getShortUrlVisits } = buildShlinkApiClient(getState); - const visitsLoader = async (page: number, itemsPerPage: number) => getShortUrlVisits( + const { getShortUrlVisits: shlinkGetShortUrlVisits } = buildShlinkApiClient(getState); + const visitsLoader = async (page: number, itemsPerPage: number) => shlinkGetShortUrlVisits( shortCode, { ...query, page, itemsPerPage }, ); const lastVisitLoader = lastVisitLoaderForLoader( doIntervalFallback, - async (params) => getShortUrlVisits(shortCode, { ...params, domain: query.domain }), + async (params) => shlinkGetShortUrlVisits(shortCode, { ...params, domain: query.domain }), ); const shouldCancel = () => getState().shortUrlVisits.cancelLoad; const extraFinishActionData: Partial = { shortCode, query, domain: query.domain }; diff --git a/src/visits/reducers/tagVisits.ts b/src/visits/reducers/tagVisits.ts index 272bd241..b57f6836 100644 --- a/src/visits/reducers/tagVisits.ts +++ b/src/visits/reducers/tagVisits.ts @@ -9,7 +9,6 @@ import { isBetween } from '../../utils/helpers/date'; import { getVisitsWithLoader, lastVisitLoaderForLoader } from './common'; import { CREATE_VISITS, CreateVisitsAction } from './visitCreation'; -/* eslint-disable padding-line-between-statements */ export const GET_TAG_VISITS_START = 'shlink/tagVisits/GET_TAG_VISITS_START'; export const GET_TAG_VISITS_ERROR = 'shlink/tagVisits/GET_TAG_VISITS_ERROR'; export const GET_TAG_VISITS = 'shlink/tagVisits/GET_TAG_VISITS'; @@ -17,7 +16,6 @@ export const GET_TAG_VISITS_LARGE = 'shlink/tagVisits/GET_TAG_VISITS_LARGE'; export const GET_TAG_VISITS_CANCEL = 'shlink/tagVisits/GET_TAG_VISITS_CANCEL'; export const GET_TAG_VISITS_PROGRESS_CHANGED = 'shlink/tagVisits/GET_TAG_VISITS_PROGRESS_CHANGED'; export const GET_TAG_VISITS_FALLBACK_TO_INTERVAL = 'shlink/tagVisits/GET_TAG_VISITS_FALLBACK_TO_INTERVAL'; -/* eslint-enable padding-line-between-statements */ export interface TagVisits extends VisitsInfo { tag: string; @@ -60,7 +58,7 @@ export default buildReducer({ .filter(({ shortUrl, visit }) => shortUrl?.tags.includes(tag) && isBetween(visit.date, startDate, endDate)) .map(({ visit }) => visit); - return { ...state, visits: [ ...newVisits, ...visits ] }; + return { ...state, visits: [...newVisits, ...visits] }; }, }, initialState); @@ -69,12 +67,12 @@ export const getTagVisits = (buildShlinkApiClient: ShlinkApiClientBuilder) => ( query: ShlinkVisitsParams = {}, doIntervalFallback = false, ) => async (dispatch: Dispatch, getState: GetState) => { - const { getTagVisits } = buildShlinkApiClient(getState); - const visitsLoader = async (page: number, itemsPerPage: number) => getTagVisits( + const { getTagVisits: getVisits } = buildShlinkApiClient(getState); + const visitsLoader = async (page: number, itemsPerPage: number) => getVisits( tag, { ...query, page, itemsPerPage }, ); - const lastVisitLoader = lastVisitLoaderForLoader(doIntervalFallback, async (params) => getTagVisits(tag, params)); + const lastVisitLoader = lastVisitLoaderForLoader(doIntervalFallback, async (params) => getVisits(tag, params)); const shouldCancel = () => getState().tagVisits.cancelLoad; const extraFinishActionData: Partial = { tag, query }; const actionMap = { diff --git a/src/visits/reducers/visitsOverview.ts b/src/visits/reducers/visitsOverview.ts index 292d170c..9c1609b7 100644 --- a/src/visits/reducers/visitsOverview.ts +++ b/src/visits/reducers/visitsOverview.ts @@ -6,11 +6,9 @@ import { buildReducer } from '../../utils/helpers/redux'; import { groupNewVisitsByType } from '../types/helpers'; import { CREATE_VISITS, CreateVisitsAction } from './visitCreation'; -/* eslint-disable padding-line-between-statements */ export const GET_OVERVIEW_START = 'shlink/visitsOverview/GET_OVERVIEW_START'; export const GET_OVERVIEW_ERROR = 'shlink/visitsOverview/GET_OVERVIEW_ERROR'; export const GET_OVERVIEW = 'shlink/visitsOverview/GET_OVERVIEW'; -/* eslint-enable padding-line-between-statements */ export interface VisitsOverview { visitsCount: number; diff --git a/src/visits/services/VisitsParser.ts b/src/visits/services/VisitsParser.ts index a42c3840..32e6404a 100644 --- a/src/visits/services/VisitsParser.ts +++ b/src/visits/services/VisitsParser.ts @@ -4,6 +4,7 @@ import { hasValue } from '../../utils/utils'; import { CityStats, NormalizedVisit, Stats, Visit, VisitsStats } from '../types'; import { isNormalizedOrphanVisit, isOrphanVisit } from '../types/helpers'; +/* eslint-disable no-param-reassign */ const visitHasProperty = (visit: NormalizedVisit, propertyName: keyof NormalizedVisit) => !isNil(visit) && hasValue(visit[propertyName]); @@ -46,10 +47,10 @@ const updateCitiesForMapForVisit = (citiesForMapStats: Record const currentCity = citiesForMapStats[city] || { cityName: city, count: 0, - latLong: [ optionalNumericToNumber(latitude), optionalNumericToNumber(longitude) ], + latLong: [optionalNumericToNumber(latitude), optionalNumericToNumber(longitude)], }; - currentCity.count++; + currentCity.count += 1; citiesForMapStats[city] = currentCity; }; diff --git a/src/visits/services/provideServices.ts b/src/visits/services/provideServices.ts index 90f02dda..3a53d7e1 100644 --- a/src/visits/services/provideServices.ts +++ b/src/visits/services/provideServices.ts @@ -19,26 +19,26 @@ const provideServices = (bottle: Bottle, connect: ConnectDecorator) => { bottle.serviceFactory('ShortUrlVisits', ShortUrlVisits, 'ReportExporter'); bottle.decorator('ShortUrlVisits', connect( - [ 'shortUrlVisits', 'shortUrlDetail', 'mercureInfo', 'settings', 'selectedServer' ], - [ 'getShortUrlVisits', 'getShortUrlDetail', 'cancelGetShortUrlVisits', 'createNewVisits', 'loadMercureInfo' ], + ['shortUrlVisits', 'shortUrlDetail', 'mercureInfo', 'settings', 'selectedServer'], + ['getShortUrlVisits', 'getShortUrlDetail', 'cancelGetShortUrlVisits', 'createNewVisits', 'loadMercureInfo'], )); bottle.serviceFactory('TagVisits', TagVisits, 'ColorGenerator', 'ReportExporter'); bottle.decorator('TagVisits', connect( - [ 'tagVisits', 'mercureInfo', 'settings', 'selectedServer' ], - [ 'getTagVisits', 'cancelGetTagVisits', 'createNewVisits', 'loadMercureInfo' ], + ['tagVisits', 'mercureInfo', 'settings', 'selectedServer'], + ['getTagVisits', 'cancelGetTagVisits', 'createNewVisits', 'loadMercureInfo'], )); bottle.serviceFactory('OrphanVisits', OrphanVisits, 'ReportExporter'); bottle.decorator('OrphanVisits', connect( - [ 'orphanVisits', 'mercureInfo', 'settings', 'selectedServer' ], - [ 'getOrphanVisits', 'cancelGetOrphanVisits', 'createNewVisits', 'loadMercureInfo' ], + ['orphanVisits', 'mercureInfo', 'settings', 'selectedServer'], + ['getOrphanVisits', 'cancelGetOrphanVisits', 'createNewVisits', 'loadMercureInfo'], )); bottle.serviceFactory('NonOrphanVisits', NonOrphanVisits, 'ReportExporter'); bottle.decorator('NonOrphanVisits', connect( - [ 'nonOrphanVisits', 'mercureInfo', 'settings', 'selectedServer' ], - [ 'getNonOrphanVisits', 'cancelGetNonOrphanVisits', 'createNewVisits', 'loadMercureInfo' ], + ['nonOrphanVisits', 'mercureInfo', 'settings', 'selectedServer'], + ['getNonOrphanVisits', 'cancelGetNonOrphanVisits', 'createNewVisits', 'loadMercureInfo'], )); // Services diff --git a/src/visits/types/helpers.ts b/src/visits/types/helpers.ts index a12f093a..be1417c6 100644 --- a/src/visits/types/helpers.ts +++ b/src/visits/types/helpers.ts @@ -3,10 +3,10 @@ import { formatIsoDate } from '../../utils/helpers/date'; import { ShlinkVisitsParams } from '../../api/types'; import { CreateVisit, NormalizedOrphanVisit, NormalizedVisit, OrphanVisit, Stats, Visit, VisitsParams } from './index'; -export const isOrphanVisit = (visit: Visit): visit is OrphanVisit => visit.hasOwnProperty('visitedUrl'); +export const isOrphanVisit = (visit: Visit): visit is OrphanVisit => !!(visit as OrphanVisit).visitedUrl; export const isNormalizedOrphanVisit = (visit: NormalizedVisit): visit is NormalizedOrphanVisit => - visit.hasOwnProperty('visitedUrl'); + !!(visit as NormalizedOrphanVisit).visitedUrl; export interface GroupedNewVisits { orphanVisits: CreateVisit[]; @@ -14,7 +14,7 @@ export interface GroupedNewVisits { } export const groupNewVisitsByType = pipe( - groupBy((newVisit: CreateVisit) => isOrphanVisit(newVisit.visit) ? 'orphanVisits' : 'regularVisits'), + groupBy((newVisit: CreateVisit) => (isOrphanVisit(newVisit.visit) ? 'orphanVisits' : 'regularVisits')), // @ts-expect-error Type declaration on groupBy is not correct. It can return undefined props (result): GroupedNewVisits => ({ orphanVisits: [], regularVisits: [], ...result }), ); diff --git a/test/api/ShlinkApiError.test.tsx b/test/api/ShlinkApiError.test.tsx index 8726aa6d..aad32f72 100644 --- a/test/api/ShlinkApiError.test.tsx +++ b/test/api/ShlinkApiError.test.tsx @@ -4,19 +4,19 @@ import { ShlinkApiError, ShlinkApiErrorProps } from '../../src/api/ShlinkApiErro import { InvalidArgumentError, ProblemDetailsError } from '../../src/api/types'; describe('', () => { - let wrapper: ShallowWrapper; + let commonWrapper: ShallowWrapper; const createWrapper = (props: ShlinkApiErrorProps) => { - wrapper = shallow(); + commonWrapper = shallow(); - return wrapper; + return commonWrapper; }; - afterEach(() => wrapper?.unmount()); + afterEach(() => commonWrapper?.unmount()); it.each([ - [ undefined, 'the fallback', 'the fallback' ], - [ Mock.all(), 'the fallback', 'the fallback' ], - [ Mock.of({ detail: 'the detail' }), 'the fallback', 'the detail' ], + [undefined, 'the fallback', 'the fallback'], + [Mock.all(), 'the fallback', 'the fallback'], + [Mock.of({ detail: 'the detail' }), 'the fallback', 'the detail'], ])('renders proper message', (errorData, fallbackMessage, expectedMessage) => { const wrapper = createWrapper({ errorData, fallbackMessage }); @@ -24,9 +24,9 @@ describe('', () => { }); it.each([ - [ undefined, 0 ], - [ Mock.all(), 0 ], - [ Mock.of({ type: 'INVALID_ARGUMENT', invalidElements: [] }), 1 ], + [undefined, 0], + [Mock.all(), 0], + [Mock.of({ type: 'INVALID_ARGUMENT', invalidElements: [] }), 1], ])('renders list of invalid elements when provided error is an InvalidError', (errorData, expectedElementsCount) => { const wrapper = createWrapper({ errorData }); const p = wrapper.find('p'); diff --git a/test/api/services/ShlinkApiClient.test.ts b/test/api/services/ShlinkApiClient.test.ts index b25a3837..6b08a82e 100644 --- a/test/api/services/ShlinkApiClient.test.ts +++ b/test/api/services/ShlinkApiClient.test.ts @@ -11,13 +11,13 @@ describe('ShlinkApiClient', () => { const createAxiosMock = (data: AxiosRequestConfig = {}) => jest.fn(createAxios(data)) as unknown as AxiosInstance; const createApiClient = (data: AxiosRequestConfig) => new ShlinkApiClient(createAxios(data), '', ''); const shortCodesWithDomainCombinations: [ string, OptionalString ][] = [ - [ 'abc123', null ], - [ 'abc123', undefined ], - [ 'abc123', 'example.com' ], + ['abc123', null], + ['abc123', undefined], + ['abc123', 'example.com'], ]; describe('listShortUrls', () => { - const expectedList = [ 'foo', 'bar' ]; + const expectedList = ['foo', 'bar']; it('properly returns short URLs list', async () => { const { listShortUrls } = createApiClient({ @@ -32,9 +32,9 @@ describe('ShlinkApiClient', () => { }); it.each([ - [ { field: 'visits', dir: 'DESC' } as ShortUrlsOrder, 'visits-DESC' ], - [ { field: 'longUrl', dir: 'ASC' } as ShortUrlsOrder, 'longUrl-ASC' ], - [ { field: 'longUrl', dir: undefined } as ShortUrlsOrder, undefined ], + [{ field: 'visits', dir: 'DESC' } as ShortUrlsOrder, 'visits-DESC'], + [{ field: 'longUrl', dir: 'ASC' } as ShortUrlsOrder, 'longUrl-ASC'], + [{ field: 'longUrl', dir: undefined } as ShortUrlsOrder, undefined], ])('parses orderBy in params', async (orderBy, expectedOrderBy) => { const axiosSpy = createAxiosMock({ data: expectedList, @@ -73,7 +73,7 @@ describe('ShlinkApiClient', () => { describe('getShortUrlVisits', () => { it('properly returns short URL visits', async () => { - const expectedVisits = [ 'foo', 'bar' ]; + const expectedVisits = ['foo', 'bar']; const axiosSpy = createAxiosMock({ data: { visits: { @@ -95,7 +95,7 @@ describe('ShlinkApiClient', () => { describe('getTagVisits', () => { it('properly returns tag visits', async () => { - const expectedVisits = [ 'foo', 'bar' ]; + const expectedVisits = ['foo', 'bar']; const axiosSpy = createAxiosMock({ data: { visits: { @@ -136,7 +136,7 @@ describe('ShlinkApiClient', () => { describe('updateShortUrlTags', () => { it.each(shortCodesWithDomainCombinations)('properly updates short URL tags', async (shortCode, domain) => { - const expectedTags = [ 'foo', 'bar' ]; + const expectedTags = ['foo', 'bar']; const axiosSpy = createAxiosMock({ data: { tags: expectedTags }, }); @@ -176,7 +176,7 @@ describe('ShlinkApiClient', () => { describe('listTags', () => { it('properly returns list of tags', async () => { - const expectedTags = [ 'foo', 'bar' ]; + const expectedTags = ['foo', 'bar']; const axiosSpy = createAxiosMock({ data: { tags: { data: expectedTags }, @@ -193,7 +193,7 @@ describe('ShlinkApiClient', () => { describe('deleteTags', () => { it('properly deletes provided tags', async () => { - const tags = [ 'foo', 'bar' ]; + const tags = ['foo', 'bar']; const axiosSpy = createAxiosMock(); const { deleteTags } = new ShlinkApiClient(axiosSpy, '', ''); @@ -273,7 +273,7 @@ describe('ShlinkApiClient', () => { describe('listDomains', () => { it('returns domains', async () => { - const expectedData = { data: [ Mock.all(), Mock.all() ] }; + const expectedData = { data: [Mock.all(), Mock.all()] }; const resp = { domains: expectedData }; const axiosSpy = createAxiosMock({ data: resp }); const { listDomains } = new ShlinkApiClient(axiosSpy, '', ''); diff --git a/test/api/services/ShlinkApiClientBuilder.test.ts b/test/api/services/ShlinkApiClientBuilder.test.ts index 9dafb6bd..6967b0f4 100644 --- a/test/api/services/ShlinkApiClientBuilder.test.ts +++ b/test/api/services/ShlinkApiClientBuilder.test.ts @@ -16,7 +16,7 @@ describe('ShlinkApiClientBuilder', () => { it('creates new instances when provided params are different', async () => { const builder = createBuilder(); - const [ firstApiClient, secondApiClient, thirdApiClient ] = await Promise.all([ + const [firstApiClient, secondApiClient, thirdApiClient] = await Promise.all([ builder(server({ url: 'foo', apiKey: 'bar' })), builder(server({ url: 'bar', apiKey: 'bar' })), builder(server({ url: 'bar', apiKey: 'foo' })), @@ -30,7 +30,7 @@ describe('ShlinkApiClientBuilder', () => { it('returns existing instances when provided params are the same', async () => { const builder = createBuilder(); const selectedServer = server({ url: 'foo', apiKey: 'bar' }); - const [ firstApiClient, secondApiClient, thirdApiClient ] = await Promise.all([ + const [firstApiClient, secondApiClient, thirdApiClient] = await Promise.all([ builder(selectedServer), builder(selectedServer), builder(selectedServer), diff --git a/test/app/App.test.tsx b/test/app/App.test.tsx index 1d8ff213..8e72b7ef 100644 --- a/test/app/App.test.tsx +++ b/test/app/App.test.tsx @@ -69,9 +69,9 @@ describe('', () => { }); it.each([ - [ '/foo', 'shlink-wrapper' ], - [ '/bar', 'shlink-wrapper' ], - [ '/', 'shlink-wrapper d-flex d-md-block align-items-center' ], + ['/foo', 'shlink-wrapper'], + ['/bar', 'shlink-wrapper'], + ['/', 'shlink-wrapper d-flex d-md-block align-items-center'], ])('renders expected classes on shlink-wrapper based on current pathname', (pathname, expectedClasses) => { (useLocation as any).mockReturnValue({ pathname }); // eslint-disable-line @typescript-eslint/no-unsafe-call diff --git a/test/common/AppUpdateBanner.test.tsx b/test/common/AppUpdateBanner.test.tsx index 6231e8e4..22ae150e 100644 --- a/test/common/AppUpdateBanner.test.tsx +++ b/test/common/AppUpdateBanner.test.tsx @@ -9,7 +9,7 @@ describe('', () => { let wrapper: ShallowWrapper; beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); afterEach(jest.clearAllMocks); diff --git a/test/common/Home.test.tsx b/test/common/Home.test.tsx index 96f17a3e..66cb44ea 100644 --- a/test/common/Home.test.tsx +++ b/test/common/Home.test.tsx @@ -36,7 +36,7 @@ describe('', () => { }, 0, ], - [{}, 3 ], + [{}, 3], ])('shows link to create or set-up server only when no servers exist', (servers, expectedParagraphs) => { const wrapped = createComponent({ servers }); const p = wrapped.find('p'); diff --git a/test/common/MainHeader.test.tsx b/test/common/MainHeader.test.tsx index d472a505..be5fe590 100644 --- a/test/common/MainHeader.test.tsx +++ b/test/common/MainHeader.test.tsx @@ -32,11 +32,11 @@ describe('', () => { }); it.each([ - [ '/foo', false ], - [ '/bar', false ], - [ '/settings', true ], - [ '/settings/foo', true ], - [ '/settings/bar', true ], + ['/foo', false], + ['/bar', false], + ['/settings', true], + ['/settings/foo', true], + ['/settings/bar', true], ])('sets link to settings as active only when current path is settings', (currentPath, isActive) => { const wrapper = createWrapper(currentPath); const settingsLink = wrapper.find(NavLink); diff --git a/test/common/MenuLayout.test.tsx b/test/common/MenuLayout.test.tsx index 25c4e920..47d942f1 100644 --- a/test/common/MenuLayout.test.tsx +++ b/test/common/MenuLayout.test.tsx @@ -36,8 +36,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ null, NoMenuLayout ], - [ Mock.of({ serverNotFound: true }), ServerError ], + [null, NoMenuLayout], + [Mock.of({ serverNotFound: true }), ServerError], ])('returns error when server is not found', (selectedServer, ExpectedComp) => { const wrapper = createWrapper(selectedServer); const comp = wrapper.find(ExpectedComp); @@ -53,12 +53,12 @@ describe('', () => { }); it.each([ - [ '2.5.0' as SemVer, 9 ], - [ '2.6.0' as SemVer, 10 ], - [ '2.7.0' as SemVer, 10 ], - [ '2.8.0' as SemVer, 11 ], - [ '2.10.0' as SemVer, 11 ], - [ '3.0.0' as SemVer, 12 ], + ['2.5.0' as SemVer, 9], + ['2.6.0' as SemVer, 10], + ['2.7.0' as SemVer, 10], + ['2.8.0' as SemVer, 11], + ['2.10.0' as SemVer, 11], + ['3.0.0' as SemVer, 12], ])('has expected amount of routes based on selected server\'s version', (version, expectedAmountOfRoutes) => { const selectedServer = Mock.of({ version }); const wrapper = createWrapper(selectedServer).dive(); diff --git a/test/common/ShlinkVersions.test.tsx b/test/common/ShlinkVersions.test.tsx index 03af9357..a81b22cd 100644 --- a/test/common/ShlinkVersions.test.tsx +++ b/test/common/ShlinkVersions.test.tsx @@ -14,11 +14,11 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ '1.2.3', Mock.of({ version: '1.0.0', printableVersion: 'foo' }), 'v1.2.3', 'foo' ], - [ 'foo', Mock.of({ version: '1.0.0', printableVersion: '1.2.3' }), 'latest', '1.2.3' ], - [ 'latest', Mock.of({ version: '1.0.0', printableVersion: 'latest' }), 'latest', 'latest' ], - [ '5.5.0', Mock.of({ version: '1.0.0', printableVersion: '0.2.8' }), 'v5.5.0', '0.2.8' ], - [ 'not-semver', Mock.of({ version: '1.0.0', printableVersion: 'some' }), 'latest', 'some' ], + ['1.2.3', Mock.of({ version: '1.0.0', printableVersion: 'foo' }), 'v1.2.3', 'foo'], + ['foo', Mock.of({ version: '1.0.0', printableVersion: '1.2.3' }), 'latest', '1.2.3'], + ['latest', Mock.of({ version: '1.0.0', printableVersion: 'latest' }), 'latest', 'latest'], + ['5.5.0', Mock.of({ version: '1.0.0', printableVersion: '0.2.8' }), 'v5.5.0', '0.2.8'], + ['not-semver', Mock.of({ version: '1.0.0', printableVersion: 'some' }), 'latest', 'some'], ])( 'displays expected versions when selected server is reachable', (clientVersion, selectedServer, expectedClientVersion, expectedServerVersion) => { @@ -35,9 +35,9 @@ describe('', () => { ); it.each([ - [ '1.2.3', null ], - [ '1.2.3', Mock.of({ serverNotFound: true }) ], - [ '1.2.3', Mock.of({ serverNotReachable: true }) ], + ['1.2.3', null], + ['1.2.3', Mock.of({ serverNotFound: true })], + ['1.2.3', Mock.of({ serverNotReachable: true })], ])('displays only client version when selected server is not reachable', (clientVersion, selectedServer) => { const wrapper = createWrapper({ clientVersion, selectedServer }); const links = wrapper.find('VersionLink'); diff --git a/test/common/ShlinkVersionsContainer.test.tsx b/test/common/ShlinkVersionsContainer.test.tsx index cec87fed..f4e67731 100644 --- a/test/common/ShlinkVersionsContainer.test.tsx +++ b/test/common/ShlinkVersionsContainer.test.tsx @@ -16,8 +16,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [{ sidebarPresent: false }, 'text-center' ], - [{ sidebarPresent: true }, 'text-center shlink-versions-container--with-sidebar' ], + [{ sidebarPresent: false }, 'text-center'], + [{ sidebarPresent: true }, 'text-center shlink-versions-container--with-sidebar'], ])('renders proper col classes based on sidebar status', (sidebar, expectedClasses) => { const wrapper = createWrapper(sidebar); diff --git a/test/common/SimplePaginator.test.tsx b/test/common/SimplePaginator.test.tsx index 54559628..47ba7d29 100644 --- a/test/common/SimplePaginator.test.tsx +++ b/test/common/SimplePaginator.test.tsx @@ -14,7 +14,7 @@ describe('', () => { afterEach(() => wrapper?.unmount()); - it.each([ -3, -2, 0, 1 ])('renders empty when the amount of pages is smaller than 2', (pagesCount) => { + it.each([-3, -2, 0, 1])('renders empty when the amount of pages is smaller than 2', (pagesCount) => { expect(createWrapper(pagesCount).text()).toEqual(''); }); diff --git a/test/common/img/ShlinkLogo.test.tsx b/test/common/img/ShlinkLogo.test.tsx index 6e4b6494..09793371 100644 --- a/test/common/img/ShlinkLogo.test.tsx +++ b/test/common/img/ShlinkLogo.test.tsx @@ -13,9 +13,9 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ undefined, MAIN_COLOR ], - [ 'red', 'red' ], - [ 'white', 'white' ], + [undefined, MAIN_COLOR], + ['red', 'red'], + ['white', 'white'], ])('renders expected color', (color, expectedColor) => { const wrapper = createWrapper({ color }); @@ -23,9 +23,9 @@ describe('', () => { }); it.each([ - [ undefined, undefined ], - [ 'foo', 'foo' ], - [ 'bar', 'bar' ], + [undefined, undefined], + ['foo', 'foo'], + ['bar', 'bar'], ])('renders expected class', (className, expectedClassName) => { const wrapper = createWrapper({ className }); diff --git a/test/common/reducer/sidebar.test.ts b/test/common/reducer/sidebar.test.ts index ecd31075..ecaa95da 100644 --- a/test/common/reducer/sidebar.test.ts +++ b/test/common/reducer/sidebar.test.ts @@ -10,8 +10,8 @@ import reducer, { describe('sidebarReducer', () => { describe('reducer', () => { it.each([ - [ SIDEBAR_PRESENT, { sidebarPresent: true }], - [ SIDEBAR_NOT_PRESENT, { sidebarPresent: false }], + [SIDEBAR_PRESENT, { sidebarPresent: true }], + [SIDEBAR_NOT_PRESENT, { sidebarPresent: false }], ])('returns expected on %s', (type, expected) => { expect(reducer(Mock.all(), { type })).toEqual(expected); }); diff --git a/test/domains/DomainRow.test.tsx b/test/domains/DomainRow.test.tsx index 40940393..ea87f53f 100644 --- a/test/domains/DomainRow.test.tsx +++ b/test/domains/DomainRow.test.tsx @@ -26,11 +26,11 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ Mock.of({ domain: '', isDefault: true }), undefined, 1, 1, 'defaultDomainBtn' ], - [ Mock.of({ domain: '', isDefault: false }), undefined, 0, 0, undefined ], - [ Mock.of({ domain: 'foo.com', isDefault: true }), undefined, 1, 1, 'defaultDomainBtn' ], - [ Mock.of({ domain: 'foo.bar.com', isDefault: true }), undefined, 1, 1, 'defaultDomainBtn' ], - [ Mock.of({ domain: 'foo.baz', isDefault: false }), undefined, 0, 0, undefined ], + [Mock.of({ domain: '', isDefault: true }), undefined, 1, 1, 'defaultDomainBtn'], + [Mock.of({ domain: '', isDefault: false }), undefined, 0, 0, undefined], + [Mock.of({ domain: 'foo.com', isDefault: true }), undefined, 1, 1, 'defaultDomainBtn'], + [Mock.of({ domain: 'foo.bar.com', isDefault: true }), undefined, 1, 1, 'defaultDomainBtn'], + [Mock.of({ domain: 'foo.baz', isDefault: false }), undefined, 0, 0, undefined], [ Mock.of({ domain: 'foo.baz', isDefault: true }), Mock.of({ version: '2.10.0' }), @@ -85,11 +85,11 @@ describe('', () => { }); it.each([ - [ undefined, 3 ], - [ Mock.of(), 3 ], - [ Mock.of({ baseUrlRedirect: 'foo' }), 2 ], - [ Mock.of({ invalidShortUrlRedirect: 'foo' }), 2 ], - [ Mock.of({ baseUrlRedirect: 'foo', regular404Redirect: 'foo' }), 1 ], + [undefined, 3], + [Mock.of(), 3], + [Mock.of({ baseUrlRedirect: 'foo' }), 2], + [Mock.of({ invalidShortUrlRedirect: 'foo' }), 2], + [Mock.of({ baseUrlRedirect: 'foo', regular404Redirect: 'foo' }), 1], [ Mock.of( { baseUrlRedirect: 'foo', regular404Redirect: 'foo', invalidShortUrlRedirect: 'foo' }, diff --git a/test/domains/DomainSelector.test.tsx b/test/domains/DomainSelector.test.tsx index d512ab60..e3de5195 100644 --- a/test/domains/DomainSelector.test.tsx +++ b/test/domains/DomainSelector.test.tsx @@ -27,8 +27,8 @@ describe('', () => { afterEach(() => wrapper.unmount()); it.each([ - [ '', 'Domain', 'domains-dropdown__toggle-btn' ], - [ 'my-domain.com', 'Domain: my-domain.com', 'domains-dropdown__toggle-btn--active' ], + ['', 'Domain', 'domains-dropdown__toggle-btn'], + ['my-domain.com', 'Domain: my-domain.com', 'domains-dropdown__toggle-btn--active'], ])('shows dropdown by default', (value, expectedText, expectedClassName) => { const wrapper = createWrapper(value); const input = wrapper.find(InputGroup); @@ -54,9 +54,9 @@ describe('', () => { }); it.each([ - [ 0, 'default.comdefault' ], - [ 1, 'foo.com' ], - [ 2, 'bar.com' ], + [0, 'default.comdefault'], + [1, 'foo.com'], + [2, 'bar.com'], ])('shows expected content on every item', (index, expectedContent) => { const item = createWrapper().find(DropdownItem).at(index); diff --git a/test/domains/helpers/DomainStatusIcon.test.tsx b/test/domains/helpers/DomainStatusIcon.test.tsx index fc92cb29..7683a3b5 100644 --- a/test/domains/helpers/DomainStatusIcon.test.tsx +++ b/test/domains/helpers/DomainStatusIcon.test.tsx @@ -35,7 +35,7 @@ describe('', () => { faTimes, 'Oops! There is some missing configuration, and short URLs shared with this domain will not work.', ], - [ 'valid' as DomainStatus, faCheck, 'Congratulations! This domain is properly configured.' ], + ['valid' as DomainStatus, faCheck, 'Congratulations! This domain is properly configured.'], ])('renders expected icon and tooltip when status is not validating', (status, expectedIcon, expectedText) => { const wrapper = createWrapper(status); const tooltip = wrapper.find(UncontrolledTooltip); @@ -59,8 +59,8 @@ describe('', () => { }); it.each([ - [ true, 'top-start' ], - [ false, 'left' ], + [true, 'top-start'], + [false, 'left'], ])('places the tooltip properly based on query match', (isMobile, expectedPlacement) => { matchMedia.mockReturnValue(Mock.of({ matches: isMobile })); diff --git a/test/domains/reducers/domainsList.test.ts b/test/domains/reducers/domainsList.test.ts index 25842eb7..5c1730f5 100644 --- a/test/domains/reducers/domainsList.test.ts +++ b/test/domains/reducers/domainsList.test.ts @@ -30,7 +30,7 @@ describe('domainsListReducer', () => { Mock.of({ domain: 'foo', status: 'validating' }), Mock.of({ domain: 'boo', status: 'validating' }), ]; - const domains = [ ...filteredDomains, Mock.of({ domain: 'bar', status: 'validating' }) ]; + const domains = [...filteredDomains, Mock.of({ domain: 'bar', status: 'validating' })]; beforeEach(jest.clearAllMocks); @@ -64,9 +64,9 @@ describe('domainsListReducer', () => { }); it.each([ - [ 'foo' ], - [ 'bar' ], - [ 'does_not_exist' ], + ['foo'], + ['bar'], + ['does_not_exist'], ])('replaces redirects on proper domain on EDIT_DOMAIN_REDIRECTS', (domain) => { const redirects: ShlinkDomainRedirects = { baseUrlRedirect: 'bar', @@ -84,9 +84,9 @@ describe('domainsListReducer', () => { }); it.each([ - [ 'foo' ], - [ 'bar' ], - [ 'does_not_exist' ], + ['foo'], + ['bar'], + ['does_not_exist'], ])('replaces status on proper domain on VALIDATE_DOMAIN', (domain) => { expect(reducer( Mock.of({ domains, filteredDomains }), @@ -124,9 +124,9 @@ describe('domainsListReducer', () => { describe('filterDomains', () => { it.each([ - [ 'foo' ], - [ 'bar' ], - [ 'something' ], + ['foo'], + ['bar'], + ['something'], ])('creates action as expected', (searchTerm) => { expect(filterDomainsAction(searchTerm)).toEqual({ type: FILTER_DOMAINS, searchTerm }); }); @@ -166,8 +166,8 @@ describe('domainsListReducer', () => { }); it.each([ - [ 'pass', 'valid' ], - [ 'fail', 'invalid' ], + ['pass', 'valid'], + ['fail', 'invalid'], ])('dispatches proper status based on status returned from health endpoint', async ( healthStatus, expectedStatus, diff --git a/test/mercure/helpers/index.test.tsx b/test/mercure/helpers/index.test.tsx index cd93117e..109e2b57 100644 --- a/test/mercure/helpers/index.test.tsx +++ b/test/mercure/helpers/index.test.tsx @@ -14,13 +14,13 @@ describe('helpers', () => { const onTokenExpired = jest.fn(); it.each([ - [ Mock.of({ loading: true, error: false, mercureHubUrl: 'foo' }) ], - [ Mock.of({ loading: false, error: true, mercureHubUrl: 'foo' }) ], - [ Mock.of({ loading: true, error: true, mercureHubUrl: 'foo' }) ], - [ Mock.of({ loading: false, error: false, mercureHubUrl: undefined }) ], - [ Mock.of({ loading: true, error: true, mercureHubUrl: undefined }) ], + [Mock.of({ loading: true, error: false, mercureHubUrl: 'foo' })], + [Mock.of({ loading: false, error: true, mercureHubUrl: 'foo' })], + [Mock.of({ loading: true, error: true, mercureHubUrl: 'foo' })], + [Mock.of({ loading: false, error: false, mercureHubUrl: undefined })], + [Mock.of({ loading: true, error: true, mercureHubUrl: undefined })], ])('does not bind an EventSource when loading, error or no hub URL', (mercureInfo) => { - bindToMercureTopic(mercureInfo, [ '' ], identity, () => {}); + bindToMercureTopic(mercureInfo, [''], identity, () => {}); expect(EventSourcePolyfill).not.toHaveBeenCalled(); expect(onMessage).not.toHaveBeenCalled(); @@ -40,7 +40,7 @@ describe('helpers', () => { error: false, mercureHubUrl, token, - }, [ topic ], onMessage, onTokenExpired); + }, [topic], onMessage, onTokenExpired); expect(EventSourcePolyfill).toHaveBeenCalledWith(hubUrl, { headers: { @@ -48,7 +48,7 @@ describe('helpers', () => { }, }); - const [ es ] = (EventSourcePolyfill as any).mock.instances as EventSourcePolyfill[]; + const [es] = (EventSourcePolyfill as any).mock.instances as EventSourcePolyfill[]; es.onmessage?.({ data: '{"foo": "bar"}' }); es.onerror?.({ status: 401 }); diff --git a/test/servers/CreateServer.test.tsx b/test/servers/CreateServer.test.tsx index 06fde51c..ba9abb4a 100644 --- a/test/servers/CreateServer.test.tsx +++ b/test/servers/CreateServer.test.tsx @@ -18,8 +18,8 @@ describe('', () => { (useNavigate as any).mockReturnValue(navigate); const useStateFlagTimeout = jest.fn() - .mockReturnValueOnce([ serversImported, () => '' ]) - .mockReturnValueOnce([ importFailed, () => '' ]) + .mockReturnValueOnce([serversImported, () => '']) + .mockReturnValueOnce([importFailed, () => '']) .mockReturnValue([]); const CreateServer = createServerConstruct(ImportServersBtn, useStateFlagTimeout); diff --git a/test/servers/DeleteServerModal.test.tsx b/test/servers/DeleteServerModal.test.tsx index 151832b2..83bb6d5b 100644 --- a/test/servers/DeleteServerModal.test.tsx +++ b/test/servers/DeleteServerModal.test.tsx @@ -21,7 +21,7 @@ describe('', () => { ({ name: serverName })} toggle={toggleMock} - isOpen={true} + isOpen deleteServer={deleteServerMock} />, ); diff --git a/test/servers/ManageServers.test.tsx b/test/servers/ManageServers.test.tsx index 3db3bec2..c3940678 100644 --- a/test/servers/ManageServers.test.tsx +++ b/test/servers/ManageServers.test.tsx @@ -12,7 +12,7 @@ describe('', () => { const serversExporter = Mock.of({ exportServers }); const ImportServersBtn = () => null; const ManageServersRow = () => null; - const useStateFlagTimeout = jest.fn().mockReturnValue([ false, jest.fn() ]); + const useStateFlagTimeout = jest.fn().mockReturnValue([false, jest.fn()]); const ManageServers = createManageServers(serversExporter, ImportServersBtn, useStateFlagTimeout, ManageServersRow); let wrapper: ShallowWrapper; const createServerMock = (value: string, autoConnect = false) => Mock.of( @@ -52,8 +52,8 @@ describe('', () => { }); it.each([ - [ createServerMock('foo'), 3 ], - [ createServerMock('foo', true), 4 ], + [createServerMock('foo'), 3], + [createServerMock('foo', true), 4], ])('shows different amount of columns if there are at least one auto-connect server', (server, expectedCols) => { const wrapper = createWrapper({ server }); const row = wrapper.find(ManageServersRow); @@ -63,8 +63,8 @@ describe('', () => { }); it.each([ - [{}, 1 ], - [{ foo: createServerMock('foo') }, 2 ], + [{}, 1], + [{ foo: createServerMock('foo') }, 2], ])('shows export button if the list of servers is not empty', (servers, expectedButtons) => { const wrapper = createWrapper(servers); const exportBtn = wrapper.find(Button); @@ -82,7 +82,7 @@ describe('', () => { }); it('shows an error message if an error occurs while importing servers', () => { - useStateFlagTimeout.mockReturnValue([ true, jest.fn() ]); + useStateFlagTimeout.mockReturnValue([true, jest.fn()]); const wrapper = createWrapper({ foo: createServerMock('foo') }); const result = wrapper.find(Result); diff --git a/test/servers/ManageServersRow.test.tsx b/test/servers/ManageServersRow.test.tsx index 7a1a7658..2b66b6ab 100644 --- a/test/servers/ManageServersRow.test.tsx +++ b/test/servers/ManageServersRow.test.tsx @@ -24,8 +24,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ true, 4 ], - [ false, 3 ], + [true, 4], + [false, 3], ])('renders expected amount of columns', (hasAutoConnect, expectedCols) => { const wrapper = createWrapper(hasAutoConnect); const td = wrapper.find('td'); @@ -43,8 +43,8 @@ describe('', () => { }); it.each([ - [ true, 1 ], - [ false, 0 ], + [true, 1], + [false, 0], ])('renders auto-connect icon only if server is autoConnect', (autoConnect, expectedIcons) => { const wrapper = createWrapper(true, autoConnect); const icon = wrapper.find(FontAwesomeIcon); diff --git a/test/servers/ManageServersRowDropdown.test.tsx b/test/servers/ManageServersRowDropdown.test.tsx index e8dd609a..95470a2a 100644 --- a/test/servers/ManageServersRowDropdown.test.tsx +++ b/test/servers/ManageServersRowDropdown.test.tsx @@ -73,8 +73,8 @@ describe('', () => { }); it.each([ - [ true, 'Do not auto-connect' ], - [ false, 'Auto-connect' ], + [true, 'Do not auto-connect'], + [false, 'Auto-connect'], ])('shows different auto-connect toggle text depending on current server status', (autoConnect, expectedText) => { const wrapper = createWrapper(autoConnect); const item = wrapper.find(DropdownItem).at(2); diff --git a/test/servers/Overview.test.tsx b/test/servers/Overview.test.tsx index 1e8f9322..b678a7a5 100644 --- a/test/servers/Overview.test.tsx +++ b/test/servers/Overview.test.tsx @@ -32,7 +32,7 @@ describe('', () => { listTags={listTags} loadVisitsOverview={loadVisitsOverview} shortUrlsList={Mock.of({ loading, shortUrls })} - tagsList={Mock.of({ loading, tags: [ 'foo', 'bar', 'baz' ] })} + tagsList={Mock.of({ loading, tags: ['foo', 'bar', 'baz'] })} visitsOverview={Mock.of({ loading, visitsCount: 3456, orphanVisitsCount: 28 })} selectedServer={Mock.of({ id: serverId })} createNewVisits={jest.fn()} diff --git a/test/servers/ServersListGroup.test.tsx b/test/servers/ServersListGroup.test.tsx index 9a6ad591..35830681 100644 --- a/test/servers/ServersListGroup.test.tsx +++ b/test/servers/ServersListGroup.test.tsx @@ -40,7 +40,7 @@ describe('', () => { }); it.each([ - [ servers ], + [servers], [[]], ])('shows servers list', (servers) => { const wrapped = createComponent({ servers }); @@ -50,9 +50,9 @@ describe('', () => { }); it.each([ - [ true, 'servers-list__list-group servers-list__list-group--embedded' ], - [ false, 'servers-list__list-group' ], - [ undefined, 'servers-list__list-group' ], + [true, 'servers-list__list-group servers-list__list-group--embedded'], + [false, 'servers-list__list-group'], + [undefined, 'servers-list__list-group'], ])('renders proper classes for embedded', (embedded, expectedClasses) => { const wrapped = createComponent({ servers, embedded }); const listGroup = wrapped.find(ListGroup); diff --git a/test/servers/helpers/DuplicatedServersModal.test.tsx b/test/servers/helpers/DuplicatedServersModal.test.tsx index 6e2b6731..d57af0e2 100644 --- a/test/servers/helpers/DuplicatedServersModal.test.tsx +++ b/test/servers/helpers/DuplicatedServersModal.test.tsx @@ -20,11 +20,11 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [[], 0 ], - [[ Mock.all() ], 2 ], - [[ Mock.all(), Mock.all() ], 2 ], - [[ Mock.all(), Mock.all(), Mock.all() ], 3 ], - [[ Mock.all(), Mock.all(), Mock.all(), Mock.all() ], 4 ], + [[], 0], + [[Mock.all()], 2], + [[Mock.all(), Mock.all()], 2], + [[Mock.all(), Mock.all(), Mock.all()], 3], + [[Mock.all(), Mock.all(), Mock.all(), Mock.all()], 4], ])('renders expected amount of items', (duplicatedServers, expectedItems) => { const wrapper = createWrapper(duplicatedServers); const li = wrapper.find('li'); @@ -34,7 +34,7 @@ describe('', () => { it.each([ [ - [ Mock.all() ], + [Mock.all()], { header: 'Duplicated server', firstParagraph: 'There is already a server with:', @@ -43,7 +43,7 @@ describe('', () => { }, ], [ - [ Mock.all(), Mock.all() ], + [Mock.all(), Mock.all()], { header: 'Duplicated servers', firstParagraph: 'The next servers already exist:', @@ -66,7 +66,7 @@ describe('', () => { it.each([ [[]], - [[ Mock.of({ url: 'url', apiKey: 'apiKey' }) ]], + [[Mock.of({ url: 'url', apiKey: 'apiKey' })]], ])('displays provided server data', (duplicatedServers) => { const wrapper = createWrapper(duplicatedServers); const li = wrapper.find('li'); diff --git a/test/servers/helpers/ForServerVersion.test.tsx b/test/servers/helpers/ForServerVersion.test.tsx index 59031be7..2df01db2 100644 --- a/test/servers/helpers/ForServerVersion.test.tsx +++ b/test/servers/helpers/ForServerVersion.test.tsx @@ -26,9 +26,9 @@ describe('', () => { }); it.each([ - [ '2.0.0' as SemVerPattern, undefined, '1.8.3' as SemVer ], - [ undefined, '1.8.0' as SemVerPattern, '1.8.3' as SemVer ], - [ '1.7.0' as SemVerPattern, '1.8.0' as SemVerPattern, '1.8.3' as SemVer ], + ['2.0.0' as SemVerPattern, undefined, '1.8.3' as SemVer], + [undefined, '1.8.0' as SemVerPattern, '1.8.3' as SemVer], + ['1.7.0' as SemVerPattern, '1.8.0' as SemVerPattern, '1.8.3' as SemVer], ])('does not render children when current version does not match requirements', (min, max, version) => { const wrapped = renderComponent(Mock.of({ version, printableVersion: version }), min, max); @@ -36,11 +36,11 @@ describe('', () => { }); it.each([ - [ '2.0.0' as SemVerPattern, undefined, '2.8.3' as SemVer ], - [ '2.0.0' as SemVerPattern, undefined, '2.0.0' as SemVer ], - [ undefined, '1.8.0' as SemVerPattern, '1.8.0' as SemVer ], - [ undefined, '1.8.0' as SemVerPattern, '1.7.1' as SemVer ], - [ '1.7.0' as SemVerPattern, '1.8.0' as SemVerPattern, '1.7.3' as SemVer ], + ['2.0.0' as SemVerPattern, undefined, '2.8.3' as SemVer], + ['2.0.0' as SemVerPattern, undefined, '2.0.0' as SemVer], + [undefined, '1.8.0' as SemVerPattern, '1.8.0' as SemVer], + [undefined, '1.8.0' as SemVerPattern, '1.7.1' as SemVer], + ['1.7.0' as SemVerPattern, '1.8.0' as SemVerPattern, '1.7.3' as SemVer], ])('renders children when current version matches requirements', (min, max, version) => { const wrapped = renderComponent(Mock.of({ version, printableVersion: version }), min, max); diff --git a/test/servers/helpers/HighlightCard.test.tsx b/test/servers/helpers/HighlightCard.test.tsx index e365f31e..52815fd9 100644 --- a/test/servers/helpers/HighlightCard.test.tsx +++ b/test/servers/helpers/HighlightCard.test.tsx @@ -16,8 +16,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ undefined ], - [ false ], + [undefined], + [false], ])('renders expected components', (link) => { const wrapper = createWrapper({ title: 'foo', link: link as undefined | false }); @@ -30,9 +30,9 @@ describe('', () => { }); it.each([ - [ 'foo' ], - [ 'bar' ], - [ 'baz' ], + ['foo'], + ['bar'], + ['baz'], ])('renders provided title', (title) => { const wrapper = createWrapper({ title }); const cardTitle = wrapper.find(CardTitle); @@ -41,9 +41,9 @@ describe('', () => { }); it.each([ - [ 'foo' ], - [ 'bar' ], - [ 'baz' ], + ['foo'], + ['bar'], + ['baz'], ])('renders provided children', (children) => { const wrapper = createWrapper({ title: 'foo', children }); const cardText = wrapper.find(CardText); @@ -52,9 +52,9 @@ describe('', () => { }); it.each([ - [ 'foo' ], - [ 'bar' ], - [ 'baz' ], + ['foo'], + ['bar'], + ['baz'], ])('adds extra props when a link is provided', (link) => { const wrapper = createWrapper({ title: 'foo', link }); diff --git a/test/servers/helpers/ImportServersBtn.test.tsx b/test/servers/helpers/ImportServersBtn.test.tsx index 1fa2c44e..1aa4b8c1 100644 --- a/test/servers/helpers/ImportServersBtn.test.tsx +++ b/test/servers/helpers/ImportServersBtn.test.tsx @@ -41,9 +41,9 @@ describe('', () => { }); it.each([ - [ undefined, '' ], - [ 'foo', 'foo' ], - [ 'bar', 'bar' ], + [undefined, ''], + ['foo', 'foo'], + ['bar', 'bar'], ])('allows a class name to be provided', (providedClassName, expectedClassName) => { const wrapper = createWrapper({ className: providedClassName }); @@ -51,9 +51,9 @@ describe('', () => { }); it.each([ - [ undefined, true ], - [ 'foo', false ], - [ 'bar', false ], + [undefined, true], + ['foo', false], + ['bar', false], ])('has expected text', (children, expectToHaveDefaultText) => { const wrapper = createWrapper({ children }); @@ -78,14 +78,14 @@ describe('', () => { const wrapper = createWrapper(); const file = wrapper.find('.import-servers-btn__csv-select'); - await file.simulate('change', { target: { files: [ '' ] } }); // eslint-disable-line @typescript-eslint/await-thenable + await file.simulate('change', { target: { files: [''] } }); // eslint-disable-line @typescript-eslint/await-thenable expect(importServersFromFile).toHaveBeenCalledTimes(1); }); it.each([ - [ 'discard' ], - [ 'save' ], + ['discard'], + ['save'], ])('invokes callback in DuplicatedServersModal events', (event) => { const wrapper = createWrapper(); diff --git a/test/servers/helpers/ServerError.test.tsx b/test/servers/helpers/ServerError.test.tsx index 39de8a06..014d6ff3 100644 --- a/test/servers/helpers/ServerError.test.tsx +++ b/test/servers/helpers/ServerError.test.tsx @@ -38,7 +38,7 @@ describe('', () => { const wrapperText = wrapper.html(); const textPairs = Object.entries(textsToFind); - textPairs.forEach(([ text, shouldBeFound ]) => { + textPairs.forEach(([text, shouldBeFound]) => { if (shouldBeFound) { expect(wrapperText).toContain(text); } else { diff --git a/test/servers/reducers/remoteServers.test.ts b/test/servers/reducers/remoteServers.test.ts index c974fd92..56310e09 100644 --- a/test/servers/reducers/remoteServers.test.ts +++ b/test/servers/reducers/remoteServers.test.ts @@ -80,7 +80,7 @@ describe('remoteServersReducer', () => { }, }, ], - [ '', {}], + ['', {}], [{}, {}], ])('tries to fetch servers from remote', async (mockedValue, expectedNewServers) => { get.mockResolvedValue(mockedValue); diff --git a/test/servers/reducers/selectedServer.test.ts b/test/servers/reducers/selectedServer.test.ts index acd896ef..f50a12ac 100644 --- a/test/servers/reducers/selectedServer.test.ts +++ b/test/servers/reducers/selectedServer.test.ts @@ -45,9 +45,9 @@ describe('selectedServerReducer', () => { afterEach(jest.clearAllMocks); it.each([ - [ version, version, `v${version}` ], - [ 'latest', MAX_FALLBACK_VERSION, 'latest' ], - [ '%invalid_semver%', MIN_FALLBACK_VERSION, '%invalid_semver%' ], + [version, version, `v${version}`], + ['latest', MAX_FALLBACK_VERSION, 'latest'], + ['%invalid_semver%', MIN_FALLBACK_VERSION, '%invalid_semver%'], ])('dispatches proper actions', async (serverVersion, expectedVersion, expectedPrintableVersion) => { const id = uuid(); const getState = createGetStateMock(id); diff --git a/test/servers/reducers/servers.test.ts b/test/servers/reducers/servers.test.ts index c781eb54..e39d3561 100644 --- a/test/servers/reducers/servers.test.ts +++ b/test/servers/reducers/servers.test.ts @@ -58,8 +58,8 @@ describe('serverReducer', () => { })); it.each([ - [ true ], - [ false ], + [true], + [false], ])('returns state as it is when trying to set auto-connect on invalid server', (autoConnect) => expect(reducer(list, { type: SET_AUTO_CONNECT, @@ -149,8 +149,8 @@ describe('serverReducer', () => { describe('setAutoConnect', () => { it.each([ - [ true ], - [ false ], + [true], + [false], ])('returns expected action', (autoConnect) => { const serverToEdit = Mock.of({ id: 'abc123' }); const result = setAutoConnect(serverToEdit, autoConnect); diff --git a/test/servers/services/ServersImporter.test.ts b/test/servers/services/ServersImporter.test.ts index cad53997..4d5e7f1d 100644 --- a/test/servers/services/ServersImporter.test.ts +++ b/test/servers/services/ServersImporter.test.ts @@ -4,7 +4,7 @@ import { ServersImporter } from '../../../src/servers/services/ServersImporter'; import { RegularServer } from '../../../src/servers/data'; describe('ServersImporter', () => { - const servers: RegularServer[] = [ Mock.all(), Mock.all() ]; + const servers: RegularServer[] = [Mock.all(), Mock.all()]; const toObject = jest.fn().mockReturnValue(servers); const csvjsonMock = Mock.of({ toObject }); const readAsText = jest.fn(); @@ -37,7 +37,7 @@ describe('ServersImporter', () => { it.each([ [{}], - [ undefined ], + [undefined], [[{ foo: 'bar' }]], [ [ diff --git a/test/settings/RealTimeUpdatesSettings.test.tsx b/test/settings/RealTimeUpdatesSettings.test.tsx index dd65c283..bd7c908a 100644 --- a/test/settings/RealTimeUpdatesSettings.test.tsx +++ b/test/settings/RealTimeUpdatesSettings.test.tsx @@ -62,10 +62,10 @@ describe('', () => { }); it.each([ - [ 1, 'minute' ], - [ 2, 'minutes' ], - [ 10, 'minutes' ], - [ 100, 'minutes' ], + [1, 'minute'], + [2, 'minutes'], + [10, 'minutes'], + [100, 'minutes'], ])('shows expected children when interval is greater than 0', (interval, minutesWord) => { const wrapper = createWrapper({ enabled: true, interval }); const span = wrapper.find('span'); @@ -78,7 +78,7 @@ describe('', () => { expect(input.prop('value')).toEqual(`${interval}`); }); - it.each([[ undefined ], [ 0 ]])('shows expected children when interval is 0 or undefined', (interval) => { + it.each([[undefined], [0]])('shows expected children when interval is 0 or undefined', (interval) => { const wrapper = createWrapper({ enabled: true, interval }); const span = wrapper.find('span'); const formText = wrapper.find(FormText).at(1); diff --git a/test/settings/ShortUrlCreationSettings.test.tsx b/test/settings/ShortUrlCreationSettings.test.tsx index 3f8bff7a..519a065f 100644 --- a/test/settings/ShortUrlCreationSettings.test.tsx +++ b/test/settings/ShortUrlCreationSettings.test.tsx @@ -25,9 +25,9 @@ describe('', () => { afterEach(jest.clearAllMocks); it.each([ - [{ validateUrls: true }, true ], - [{ validateUrls: false }, false ], - [ undefined, false ], + [{ validateUrls: true }, true], + [{ validateUrls: false }, false], + [undefined, false], ])('URL validation switch is toggled if option is true', (shortUrlCreation, expectedChecked) => { const wrapper = createWrapper(shortUrlCreation); const urlValidationToggle = wrapper.find(ToggleSwitch).first(); @@ -36,9 +36,9 @@ describe('', () => { }); it.each([ - [{ forwardQuery: true }, true ], - [{ forwardQuery: false }, false ], - [{}, true ], + [{ forwardQuery: true }, true], + [{ forwardQuery: false }, false], + [{}, true], ])('forward query switch is toggled if option is true', (shortUrlCreation, expectedChecked) => { const wrapper = createWrapper({ validateUrls: true, ...shortUrlCreation }); const forwardQueryToggle = wrapper.find(ToggleSwitch).last(); @@ -47,9 +47,9 @@ describe('', () => { }); it.each([ - [{ validateUrls: true }, 'Validate URL checkbox will be checked' ], - [{ validateUrls: false }, 'Validate URL checkbox will be unchecked' ], - [ undefined, 'Validate URL checkbox will be unchecked' ], + [{ validateUrls: true }, 'Validate URL checkbox will be checked'], + [{ validateUrls: false }, 'Validate URL checkbox will be unchecked'], + [undefined, 'Validate URL checkbox will be unchecked'], ])('shows expected helper text for URL validation', (shortUrlCreation, expectedText) => { const wrapper = createWrapper(shortUrlCreation); const validateUrlText = wrapper.find(FormText).first(); @@ -58,9 +58,9 @@ describe('', () => { }); it.each([ - [{ forwardQuery: true }, 'Forward query params on redirect checkbox will be checked' ], - [{ forwardQuery: false }, 'Forward query params on redirect checkbox will be unchecked' ], - [{}, 'Forward query params on redirect checkbox will be checked' ], + [{ forwardQuery: true }, 'Forward query params on redirect checkbox will be checked'], + [{ forwardQuery: false }, 'Forward query params on redirect checkbox will be unchecked'], + [{}, 'Forward query params on redirect checkbox will be checked'], ])('shows expected helper text for query forwarding', (shortUrlCreation, expectedText) => { const wrapper = createWrapper({ validateUrls: true, ...shortUrlCreation }); const forwardQueryText = wrapper.find(FormText).at(1); @@ -69,13 +69,13 @@ describe('', () => { }); it.each([ - [ { tagFilteringMode: 'includes' } as ShortUrlsSettings, 'Suggest tags including input', 'including' ], + [{ tagFilteringMode: 'includes' } as ShortUrlsSettings, 'Suggest tags including input', 'including'], [ { tagFilteringMode: 'startsWith' } as ShortUrlsSettings, 'Suggest tags starting with input', 'starting with', ], - [ undefined, 'Suggest tags starting with input', 'starting with' ], + [undefined, 'Suggest tags starting with input', 'starting with'], ])('shows expected texts for tags suggestions', (shortUrlCreation, expectedText, expectedHint) => { const wrapper = createWrapper(shortUrlCreation); const hintText = wrapper.find(FormText).last(); @@ -85,7 +85,7 @@ describe('', () => { expect(hintText.html()).toContain(expectedHint); }); - it.each([[ true ], [ false ]])('invokes setShortUrlCreationSettings when URL validation toggle value changes', (validateUrls) => { + it.each([[true], [false]])('invokes setShortUrlCreationSettings when URL validation toggle value changes', (validateUrls) => { const wrapper = createWrapper(); const urlValidationToggle = wrapper.find(ToggleSwitch).first(); @@ -94,7 +94,7 @@ describe('', () => { expect(setShortUrlCreationSettings).toHaveBeenCalledWith({ validateUrls }); }); - it.each([[ true ], [ false ]])('invokes setShortUrlCreationSettings when forward query toggle value changes', (forwardQuery) => { + it.each([[true], [false]])('invokes setShortUrlCreationSettings when forward query toggle value changes', (forwardQuery) => { const wrapper = createWrapper(); const urlValidationToggle = wrapper.find(ToggleSwitch).last(); diff --git a/test/settings/ShortUrlsListSettings.test.tsx b/test/settings/ShortUrlsListSettings.test.tsx index f8ca25e7..c167ea4e 100644 --- a/test/settings/ShortUrlsListSettings.test.tsx +++ b/test/settings/ShortUrlsListSettings.test.tsx @@ -24,8 +24,8 @@ describe('', () => { afterEach(jest.clearAllMocks); it.each([ - [ undefined, DEFAULT_SHORT_URLS_ORDERING ], - [{}, DEFAULT_SHORT_URLS_ORDERING ], + [undefined, DEFAULT_SHORT_URLS_ORDERING], + [{}, DEFAULT_SHORT_URLS_ORDERING], [{ defaultOrdering: {} }, {}], [{ defaultOrdering: { field: 'longUrl', dir: 'DESC' } as ShortUrlsOrder }, { field: 'longUrl', dir: 'DESC' }], [{ defaultOrdering: { field: 'visits', dir: 'ASC' } as ShortUrlsOrder }, { field: 'visits', dir: 'ASC' }], @@ -37,10 +37,10 @@ describe('', () => { }); it.each([ - [ undefined, undefined ], - [ 'longUrl', 'ASC' ], - [ 'visits', undefined ], - [ 'title', 'DESC' ], + [undefined, undefined], + ['longUrl', 'ASC'], + ['visits', undefined], + ['title', 'DESC'], ])('invokes setSettings when ordering changes', (field, dir) => { const wrapper = createWrapper(); const dropdown = wrapper.find(OrderingDropdown); diff --git a/test/settings/TagsSettings.test.tsx b/test/settings/TagsSettings.test.tsx index 574361e5..62de1292 100644 --- a/test/settings/TagsSettings.test.tsx +++ b/test/settings/TagsSettings.test.tsx @@ -28,10 +28,10 @@ describe('', () => { }); it.each([ - [ undefined, 'cards' ], - [{}, 'cards' ], - [{ defaultMode: 'cards' as TagsMode }, 'cards' ], - [{ defaultMode: 'list' as TagsMode }, 'list' ], + [undefined, 'cards'], + [{}, 'cards'], + [{ defaultMode: 'cards' as TagsMode }, 'cards'], + [{ defaultMode: 'list' as TagsMode }, 'list'], ])('shows expected tags displaying mode', (tags, expectedMode) => { const wrapper = createWrapper(tags); const dropdown = wrapper.find(TagsModeDropdown); @@ -42,8 +42,8 @@ describe('', () => { }); it.each([ - [ 'cards' as TagsMode ], - [ 'list' as TagsMode ], + ['cards' as TagsMode], + ['list' as TagsMode], ])('invokes setTagsSettings when tags mode changes', (defaultMode) => { const wrapper = createWrapper(); const dropdown = wrapper.find(TagsModeDropdown); @@ -54,7 +54,7 @@ describe('', () => { }); it.each([ - [ undefined, {}], + [undefined, {}], [{}, {}], [{ defaultOrdering: {} }, {}], [{ defaultOrdering: { field: 'tag', dir: 'DESC' } as TagsOrder }, { field: 'tag', dir: 'DESC' }], @@ -67,10 +67,10 @@ describe('', () => { }); it.each([ - [ undefined, undefined ], - [ 'tag', 'ASC' ], - [ 'visits', undefined ], - [ 'shortUrls', 'DESC' ], + [undefined, undefined], + ['tag', 'ASC'], + ['visits', undefined], + ['shortUrls', 'DESC'], ])('invokes setTagsSettings when ordering changes', (field, dir) => { const wrapper = createWrapper(); const dropdown = wrapper.find(OrderingDropdown); diff --git a/test/settings/UserInterfaceSettings.test.tsx b/test/settings/UserInterfaceSettings.test.tsx index 03391cee..48bd7f43 100644 --- a/test/settings/UserInterfaceSettings.test.tsx +++ b/test/settings/UserInterfaceSettings.test.tsx @@ -20,9 +20,9 @@ describe('', () => { afterEach(jest.clearAllMocks); it.each([ - [{ theme: 'dark' as Theme }, true ], - [{ theme: 'light' as Theme }, false ], - [ undefined, false ], + [{ theme: 'dark' as Theme }, true], + [{ theme: 'light' as Theme }, false], + [undefined, false], ])('toggles switch if theme is dark', (ui, expectedChecked) => { const wrapper = createWrapper(ui); const toggle = wrapper.find(ToggleSwitch); @@ -31,9 +31,9 @@ describe('', () => { }); it.each([ - [{ theme: 'dark' as Theme }, faMoon ], - [{ theme: 'light' as Theme }, faSun ], - [ undefined, faSun ], + [{ theme: 'dark' as Theme }, faMoon], + [{ theme: 'light' as Theme }, faSun], + [undefined, faSun], ])('shows different icons based on theme', (ui, expectedIcon) => { const wrapper = createWrapper(ui); const icon = wrapper.find(FontAwesomeIcon); @@ -42,8 +42,8 @@ describe('', () => { }); it.each([ - [ true, 'dark' ], - [ false, 'light' ], + [true, 'dark'], + [false, 'light'], ])('invokes setUiSettings when theme toggle value changes', (checked, theme) => { const wrapper = createWrapper(); const toggle = wrapper.find(ToggleSwitch); diff --git a/test/settings/VisitsSettings.test.tsx b/test/settings/VisitsSettings.test.tsx index cc65dfde..0e750340 100644 --- a/test/settings/VisitsSettings.test.tsx +++ b/test/settings/VisitsSettings.test.tsx @@ -27,8 +27,8 @@ describe('', () => { }); it.each([ - [ Mock.all(), 'last30Days' ], - [ Mock.of({ visits: {} }), 'last30Days' ], + [Mock.all(), 'last30Days'], + [Mock.of({ visits: {} }), 'last30Days'], [ Mock.of({ visits: { diff --git a/test/settings/reducers/settings.test.ts b/test/settings/reducers/settings.test.ts index 09a7b14c..427eec21 100644 --- a/test/settings/reducers/settings.test.ts +++ b/test/settings/reducers/settings.test.ts @@ -25,7 +25,7 @@ describe('settingsReducer', () => { }); describe('toggleRealTimeUpdates', () => { - it.each([[ true ], [ false ]])('updates settings with provided value and then loads updates again', (enabled) => { + it.each([[true], [false]])('updates settings with provided value and then loads updates again', (enabled) => { const result = toggleRealTimeUpdates(enabled); expect(result).toEqual({ type: SET_SETTINGS, realTimeUpdates: { enabled } }); @@ -33,7 +33,7 @@ describe('settingsReducer', () => { }); describe('setRealTimeUpdatesInterval', () => { - it.each([[ 0 ], [ 1 ], [ 2 ], [ 10 ]])('updates settings with provided value and then loads updates again', (interval) => { + it.each([[0], [1], [2], [10]])('updates settings with provided value and then loads updates again', (interval) => { const result = setRealTimeUpdatesInterval(interval); expect(result).toEqual({ type: SET_SETTINGS, realTimeUpdates: { interval } }); diff --git a/test/short-urls/EditShortUrl.test.tsx b/test/short-urls/EditShortUrl.test.tsx index 5aa2eaa8..71fcb80e 100644 --- a/test/short-urls/EditShortUrl.test.tsx +++ b/test/short-urls/EditShortUrl.test.tsx @@ -60,7 +60,7 @@ describe('', () => { }); it.each([ - [ undefined, { longUrl: '', validateUrl: true }, true ], + [undefined, { longUrl: '', validateUrl: true }, true], [ Mock.of({ meta: {} }), { diff --git a/test/short-urls/Paginator.test.tsx b/test/short-urls/Paginator.test.tsx index 3a844379..ed147a19 100644 --- a/test/short-urls/Paginator.test.tsx +++ b/test/short-urls/Paginator.test.tsx @@ -12,22 +12,22 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ undefined ], - [ buildPaginator() ], - [ buildPaginator(0) ], - [ buildPaginator(1) ], + [undefined], + [buildPaginator()], + [buildPaginator(0)], + [buildPaginator(1)], ])('renders nothing if the number of pages is below 2', (paginator) => { wrapper = shallow(); expect(wrapper.text()).toEqual(''); }); it.each([ - [ buildPaginator(2), 4, 0 ], - [ buildPaginator(3), 5, 0 ], - [ buildPaginator(4), 6, 0 ], - [ buildPaginator(5), 7, 1 ], - [ buildPaginator(6), 7, 1 ], - [ buildPaginator(23), 7, 1 ], + [buildPaginator(2), 4, 0], + [buildPaginator(3), 5, 0], + [buildPaginator(4), 6, 0], + [buildPaginator(5), 7, 1], + [buildPaginator(6), 7, 1], + [buildPaginator(23), 7, 1], ])('renders previous, next and the list of pages, with ellipses when expected', ( paginator, expectedPages, diff --git a/test/short-urls/ShortUrlForm.test.tsx b/test/short-urls/ShortUrlForm.test.tsx index 9f125216..9469d308 100644 --- a/test/short-urls/ShortUrlForm.test.tsx +++ b/test/short-urls/ShortUrlForm.test.tsx @@ -41,7 +41,7 @@ describe('', () => { const validUntil = parseDate('2017-01-06', 'yyyy-MM-dd'); wrapper.find(Input).first().simulate('change', { target: { value: 'https://long-domain.com/foo/bar' } }); - wrapper.find('TagsSelector').simulate('change', [ 'tag_foo', 'tag_bar' ]); + wrapper.find('TagsSelector').simulate('change', ['tag_foo', 'tag_bar']); wrapper.find('#customSlug').simulate('change', { target: { value: 'my-slug' } }); wrapper.find(DomainSelector).simulate('change', 'example.com'); wrapper.find('#maxVisits').simulate('change', { target: { value: '20' } }); @@ -53,7 +53,7 @@ describe('', () => { expect(createShortUrl).toHaveBeenCalledTimes(1); expect(createShortUrl).toHaveBeenCalledWith({ longUrl: 'https://long-domain.com/foo/bar', - tags: [ 'tag_foo', 'tag_bar' ], + tags: ['tag_foo', 'tag_bar'], customSlug: 'my-slug', domain: 'example.com', validSince: formatISO(validSince), @@ -66,12 +66,12 @@ describe('', () => { }); it.each([ - [ null, 'create' as Mode, 4 ], - [ null, 'create-basic' as Mode, 0 ], - [ Mock.of({ version: '2.6.0' }), 'create' as Mode, 4 ], - [ Mock.of({ version: '2.5.0' }), 'create' as Mode, 4 ], - [ Mock.of({ version: '2.6.0' }), 'edit' as Mode, 4 ], - [ Mock.of({ version: '2.5.0' }), 'edit' as Mode, 3 ], + [null, 'create' as Mode, 4], + [null, 'create-basic' as Mode, 0], + [Mock.of({ version: '2.6.0' }), 'create' as Mode, 4], + [Mock.of({ version: '2.5.0' }), 'create' as Mode, 4], + [Mock.of({ version: '2.6.0' }), 'edit' as Mode, 4], + [Mock.of({ version: '2.5.0' }), 'edit' as Mode, 3], ])( 'renders expected amount of cards based on server capabilities and mode', (selectedServer, mode, expectedAmountOfCards) => { @@ -83,16 +83,16 @@ describe('', () => { ); it.each([ - [ null, 'new title', 'new title' ], - [ undefined, 'new title', 'new title' ], - [ '', 'new title', 'new title' ], - [ null, '', undefined ], - [ null, null, undefined ], - [ '', '', undefined ], - [ undefined, undefined, undefined ], - [ 'old title', null, null ], - [ 'old title', undefined, null ], - [ 'old title', '', null ], + [null, 'new title', 'new title'], + [undefined, 'new title', 'new title'], + ['', 'new title', 'new title'], + [null, '', undefined], + [null, null, undefined], + ['', '', undefined], + [undefined, undefined, undefined], + ['old title', null, null], + ['old title', undefined, null], + ['old title', '', null], ])('sends expected title based on original and new values', (originalTitle, newTitle, expectedSentTitle) => { const wrapper = createWrapper(Mock.of({ version: '2.6.0' }), 'create', originalTitle); diff --git a/test/short-urls/ShortUrlsFilteringBar.test.tsx b/test/short-urls/ShortUrlsFilteringBar.test.tsx index 4e0dbbe6..d7307aca 100644 --- a/test/short-urls/ShortUrlsFilteringBar.test.tsx +++ b/test/short-urls/ShortUrlsFilteringBar.test.tsx @@ -53,10 +53,10 @@ describe('', () => { }); it.each([ - [ 'tags=foo,bar,baz', 3 ], - [ 'tags=foo,baz', 2 ], - [ '', 0 ], - [ 'foo=bar', 0 ], + ['tags=foo,bar,baz', 3], + ['tags=foo,baz', 2], + ['', 0], + ['foo=bar', 0], ])('renders the proper amount of tags', (search, expectedTagComps) => { const wrapper = createWrapper(search); @@ -82,8 +82,8 @@ describe('', () => { }); it.each([ - [{ startDate: now }, `startDate=${encodeURIComponent(formatISO(now))}` ], - [{ endDate: now }, `endDate=${encodeURIComponent(formatISO(now))}` ], + [{ startDate: now }, `startDate=${encodeURIComponent(formatISO(now))}`], + [{ endDate: now }, `endDate=${encodeURIComponent(formatISO(now))}`], [ { startDate: now, endDate: now }, `startDate=${encodeURIComponent(formatISO(now))}&endDate=${encodeURIComponent(formatISO(now))}`, @@ -98,12 +98,12 @@ describe('', () => { }); it.each([ - [ 'tags=foo,bar,baz', Mock.of({ version: '3.0.0' }), 1 ], - [ 'tags=foo,bar', Mock.of({ version: '3.1.0' }), 1 ], - [ 'tags=foo', Mock.of({ version: '3.0.0' }), 0 ], - [ '', Mock.of({ version: '3.0.0' }), 0 ], - [ 'tags=foo,bar,baz', Mock.of({ version: '2.10.0' }), 0 ], - [ '', Mock.of({ version: '2.10.0' }), 0 ], + ['tags=foo,bar,baz', Mock.of({ version: '3.0.0' }), 1], + ['tags=foo,bar', Mock.of({ version: '3.1.0' }), 1], + ['tags=foo', Mock.of({ version: '3.0.0' }), 0], + ['', Mock.of({ version: '3.0.0' }), 0], + ['tags=foo,bar,baz', Mock.of({ version: '2.10.0' }), 0], + ['', Mock.of({ version: '2.10.0' }), 0], ])( 'renders tags mode toggle if the server supports it and there is more than one tag selected', (search, selectedServer, expectedTagToggleComponents) => { @@ -115,9 +115,9 @@ describe('', () => { ); it.each([ - [ '', 'Short URLs including any tag.', false ], - [ '&tagsMode=all', 'Short URLs including all tags.', true ], - [ '&tagsMode=any', 'Short URLs including any tag.', false ], + ['', 'Short URLs including any tag.', false], + ['&tagsMode=all', 'Short URLs including all tags.', true], + ['&tagsMode=any', 'Short URLs including any tag.', false], ])('expected tags mode tooltip title', (initialTagsMode, expectedToggleText, expectedChecked) => { const wrapper = createWrapper(`tags=foo,bar${initialTagsMode}`, Mock.of({ version: '3.0.0' })); const toggle = wrapper.find(TooltipToggleSwitch); @@ -127,9 +127,9 @@ describe('', () => { }); it.each([ - [ '', 'tagsMode=all' ], - [ '&tagsMode=all', 'tagsMode=any' ], - [ '&tagsMode=any', 'tagsMode=all' ], + ['', 'tagsMode=all'], + ['&tagsMode=all', 'tagsMode=any'], + ['&tagsMode=any', 'tagsMode=all'], ])('redirects to first page when tags mode changes', (initialTagsMode, expectedRedirectTagsMode) => { const wrapper = createWrapper(`tags=foo,bar${initialTagsMode}`, Mock.of({ version: '3.0.0' })); const toggle = wrapper.find(TooltipToggleSwitch); diff --git a/test/short-urls/ShortUrlsList.test.tsx b/test/short-urls/ShortUrlsList.test.tsx index dae43287..426c94ce 100644 --- a/test/short-urls/ShortUrlsList.test.tsx +++ b/test/short-urls/ShortUrlsList.test.tsx @@ -30,7 +30,7 @@ describe('', () => { shortCode: 'testShortCode', shortUrl: 'https://www.example.com/testShortUrl', longUrl: 'https://www.example.com/testLongUrl', - tags: [ 'test tag' ], + tags: ['test tag'], }), ], pagination: {}, @@ -106,9 +106,9 @@ describe('', () => { }); it.each([ - [ Mock.of({ field: 'visits', dir: 'ASC' }), 'visits', 'ASC' ], - [ Mock.of({ field: 'title', dir: 'DESC' }), 'title', 'DESC' ], - [ Mock.of(), undefined, undefined ], + [Mock.of({ field: 'visits', dir: 'ASC' }), 'visits', 'ASC'], + [Mock.of({ field: 'title', dir: 'DESC' }), 'title', 'DESC'], + [Mock.of(), undefined, undefined], ])('has expected initial ordering', (initialOrderBy, field, dir) => { const wrapper = createWrapper(initialOrderBy); diff --git a/test/short-urls/ShortUrlsTable.test.tsx b/test/short-urls/ShortUrlsTable.test.tsx index a0be282e..47651119 100644 --- a/test/short-urls/ShortUrlsTable.test.tsx +++ b/test/short-urls/ShortUrlsTable.test.tsx @@ -62,10 +62,10 @@ describe('', () => { }); it.each([ - [ '2.6.0' as SemVer ], - [ '2.6.1' as SemVer ], - [ '2.7.0' as SemVer ], - [ '3.0.0' as SemVer ], + ['2.6.0' as SemVer], + ['2.6.1' as SemVer], + ['2.7.0' as SemVer], + ['3.0.0' as SemVer], ])('should render composed column when server supports title', (version) => { const wrapper = createWrapper(Mock.of({ version })); const composedColumn = wrapper.find('table').find('th').at(2); diff --git a/test/short-urls/helpers/CreateShortUrlResult.test.tsx b/test/short-urls/helpers/CreateShortUrlResult.test.tsx index 4430987b..0f74d06f 100644 --- a/test/short-urls/helpers/CreateShortUrlResult.test.tsx +++ b/test/short-urls/helpers/CreateShortUrlResult.test.tsx @@ -10,7 +10,7 @@ import { Result } from '../../../src/utils/Result'; describe('', () => { let wrapper: ShallowWrapper; const copyToClipboard = jest.fn(); - const useStateFlagTimeout = jest.fn(() => [ false, copyToClipboard ]) as StateFlagTimeout; + const useStateFlagTimeout = jest.fn(() => [false, copyToClipboard]) as StateFlagTimeout; const CreateShortUrlResult = createCreateShortUrlResult(useStateFlagTimeout); const createWrapper = (result: ShortUrl | null = null, error = false) => { wrapper = shallow( diff --git a/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx b/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx index b08a11c4..c157b6a7 100644 --- a/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx +++ b/test/short-urls/helpers/ExportShortUrlsBtn.test.tsx @@ -30,9 +30,9 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ undefined, 0 ], - [ 1, 1 ], - [ 4578, 4578 ], + [undefined, 0], + [1, 1], + [4578, 4578], ])('renders expected amount', (amount, expectedAmount) => { const wrapper = createWrapper(amount); @@ -40,8 +40,8 @@ describe('', () => { }); it.each([ - [ null ], - [ Mock.of() ], + [null], + [Mock.of()], ])('does nothing on click if selected server is not reachable', (selectedServer) => { const wrapper = createWrapper(0, selectedServer); @@ -51,12 +51,12 @@ describe('', () => { }); it.each([ - [ 10, 1 ], - [ 30, 2 ], - [ 39, 2 ], - [ 40, 2 ], - [ 41, 3 ], - [ 385, 20 ], + [10, 1], + [30, 2], + [39, 2], + [40, 2], + [41, 3], + [385, 20], ])('loads proper amount of pages based on the amount of results', async (amount, expectedPageLoads) => { const wrapper = createWrapper(amount, Mock.of({ id: '123' })); diff --git a/test/short-urls/helpers/QrCodeModal.test.tsx b/test/short-urls/helpers/QrCodeModal.test.tsx index 2b2a61f8..16149cf4 100644 --- a/test/short-urls/helpers/QrCodeModal.test.tsx +++ b/test/short-urls/helpers/QrCodeModal.test.tsx @@ -22,7 +22,7 @@ describe('', () => { wrapper = shallow( ({ shortUrl })} - isOpen={true} + isOpen toggle={() => {}} selectedServer={selectedServer} />, @@ -43,10 +43,10 @@ describe('', () => { }); it.each([ - [ '2.5.0' as SemVer, 0, '/qr-code?size=300&format=png' ], - [ '2.6.0' as SemVer, 0, '/qr-code?size=300&format=png' ], - [ '2.6.0' as SemVer, 10, '/qr-code?size=300&format=png&margin=10' ], - [ '2.8.0' as SemVer, 0, '/qr-code?size=300&format=png&errorCorrection=L' ], + ['2.5.0' as SemVer, 0, '/qr-code?size=300&format=png'], + ['2.6.0' as SemVer, 0, '/qr-code?size=300&format=png'], + ['2.6.0' as SemVer, 10, '/qr-code?size=300&format=png&margin=10'], + ['2.8.0' as SemVer, 0, '/qr-code?size=300&format=png&errorCorrection=L'], ])('displays an image with the QR code of the URL', (version, margin, expectedUrl) => { const wrapper = createWrapper(version); const formControls = wrapper.find('.form-control-range'); @@ -66,12 +66,12 @@ describe('', () => { }); it.each([ - [ 530, 0, 'lg' ], - [ 200, 0, undefined ], - [ 830, 0, 'xl' ], - [ 430, 80, 'lg' ], - [ 200, 50, undefined ], - [ 720, 100, 'xl' ], + [530, 0, 'lg'], + [200, 0, undefined], + [830, 0, 'xl'], + [430, 80, 'lg'], + [200, 50, undefined], + [720, 100, 'xl'], ])('renders expected size', (size, margin, modalSize) => { const wrapper = createWrapper(); const formControls = wrapper.find('.form-control-range'); @@ -87,8 +87,8 @@ describe('', () => { }); it.each([ - [ '2.6.0' as SemVer, 1, 'col-md-4' ], - [ '2.8.0' as SemVer, 2, 'col-md-6' ], + ['2.6.0' as SemVer, 1, 'col-md-4'], + ['2.8.0' as SemVer, 2, 'col-md-6'], ])('shows expected components based on server version', (version, expectedAmountOfDropdowns, expectedRangeClass) => { const wrapper = createWrapper(version); const dropdownsLength = wrapper.find(QrFormatDropdown).length + wrapper.find(QrErrorCorrectionDropdown).length; diff --git a/test/short-urls/helpers/ShortUrlDetailLink.test.tsx b/test/short-urls/helpers/ShortUrlDetailLink.test.tsx index 9de7902d..5dfe257b 100644 --- a/test/short-urls/helpers/ShortUrlDetailLink.test.tsx +++ b/test/short-urls/helpers/ShortUrlDetailLink.test.tsx @@ -11,13 +11,13 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ undefined, undefined ], - [ null, null ], - [ Mock.of({ id: '1' }), null ], - [ Mock.of({ id: '1' }), undefined ], - [ Mock.of(), Mock.all() ], - [ null, Mock.all() ], - [ undefined, Mock.all() ], + [undefined, undefined], + [null, null], + [Mock.of({ id: '1' }), null], + [Mock.of({ id: '1' }), undefined], + [Mock.of(), Mock.all()], + [null, Mock.all()], + [undefined, Mock.all()], ])('only renders a plain span when either server or short URL are not set', (selectedServer, shortUrl) => { wrapper = shallow( diff --git a/test/short-urls/helpers/ShortUrlFormCheckboxGroup.test.tsx b/test/short-urls/helpers/ShortUrlFormCheckboxGroup.test.tsx index c06b6d8c..da7aec6c 100644 --- a/test/short-urls/helpers/ShortUrlFormCheckboxGroup.test.tsx +++ b/test/short-urls/helpers/ShortUrlFormCheckboxGroup.test.tsx @@ -5,8 +5,8 @@ import { InfoTooltip } from '../../../src/utils/InfoTooltip'; describe('', () => { it.each([ - [ undefined, '', 0 ], - [ 'This is the tooltip', 'me-2', 1 ], + [undefined, '', 0], + ['This is the tooltip', 'me-2', 1], ])('renders tooltip only when provided', (infoTooltip, expectedClassName, expectedAmountOfTooltips) => { const wrapper = shallow(); const checkbox = wrapper.find(Checkbox); diff --git a/test/short-urls/helpers/ShortUrlVisitsCount.test.tsx b/test/short-urls/helpers/ShortUrlVisitsCount.test.tsx index 3eef4ca8..e6420e9b 100644 --- a/test/short-urls/helpers/ShortUrlVisitsCount.test.tsx +++ b/test/short-urls/helpers/ShortUrlVisitsCount.test.tsx @@ -15,7 +15,7 @@ describe('', () => { afterEach(() => wrapper?.unmount()); - it.each([ undefined, {}])('just returns visits when no maxVisits is provided', (meta) => { + it.each([undefined, {}])('just returns visits when no maxVisits is provided', (meta) => { const visitsCount = 45; const wrapper = createWrapper(visitsCount, Mock.of({ meta })); const maxVisitsHelper = wrapper.find('.short-urls-visits-count__max-visits-control'); diff --git a/test/short-urls/helpers/ShortUrlsRow.test.tsx b/test/short-urls/helpers/ShortUrlsRow.test.tsx index beae06cc..fcb9b562 100644 --- a/test/short-urls/helpers/ShortUrlsRow.test.tsx +++ b/test/short-urls/helpers/ShortUrlsRow.test.tsx @@ -18,7 +18,7 @@ describe('', () => { const mockFunction = () => null; const ShortUrlsRowMenu = mockFunction; const stateFlagTimeout = jest.fn(() => true); - const useStateFlagTimeout = jest.fn(() => [ false, stateFlagTimeout ]) as StateFlagTimeout; + const useStateFlagTimeout = jest.fn(() => [false, stateFlagTimeout]) as StateFlagTimeout; const colorGenerator = Mock.of({ getColorForKey: jest.fn(), setColorForKey: jest.fn(), @@ -29,7 +29,7 @@ describe('', () => { shortUrl: 'http://doma.in/abc123', longUrl: 'http://foo.com/bar', dateCreated: formatISO(parseDate('2018-05-23 18:30:41', 'yyyy-MM-dd HH:mm:ss')), - tags: [ 'nodejs', 'reactjs' ], + tags: ['nodejs', 'reactjs'], visitsCount: 45, domain: null, meta: { @@ -51,9 +51,9 @@ describe('', () => { afterEach(() => wrapper.unmount()); it.each([ - [ null, 6 ], - [ undefined, 6 ], - [ 'The title', 7 ], + [null, 6], + [undefined, 6], + ['The title', 7], ])('renders expected amount of columns', (title, expectedAmount) => { const wrapper = createWrapper(title); const cols = wrapper.find('td'); diff --git a/test/short-urls/reducers/shortUrlDeletion.test.ts b/test/short-urls/reducers/shortUrlDeletion.test.ts index e8a74df4..588dc790 100644 --- a/test/short-urls/reducers/shortUrlDeletion.test.ts +++ b/test/short-urls/reducers/shortUrlDeletion.test.ts @@ -60,7 +60,7 @@ describe('shortUrlDeletionReducer', () => { }); it.each( - [[ undefined ], [ null ], [ 'example.com' ]], + [[undefined], [null], ['example.com']], )('dispatches proper actions if API client request succeeds', async (domain) => { const apiClientMock = Mock.of({ deleteShortUrl: jest.fn(() => ''), diff --git a/test/short-urls/reducers/shortUrlDetail.test.ts b/test/short-urls/reducers/shortUrlDetail.test.ts index 748d71f0..d83d035a 100644 --- a/test/short-urls/reducers/shortUrlDetail.test.ts +++ b/test/short-urls/reducers/shortUrlDetail.test.ts @@ -62,8 +62,8 @@ describe('shortUrlDetailReducer', () => { }); it.each([ - [ undefined ], - [ Mock.all() ], + [undefined], + [Mock.all()], [ Mock.of({ shortUrls: { data: [] }, @@ -72,7 +72,7 @@ describe('shortUrlDetailReducer', () => { [ Mock.of({ shortUrls: { - data: [ Mock.of({ shortCode: 'this_will_not_match' }) ], + data: [Mock.of({ shortCode: 'this_will_not_match' })], }, }), ], @@ -96,7 +96,7 @@ describe('shortUrlDetailReducer', () => { dispatchMock, buildGetState(Mock.of({ shortUrls: { - data: [ foundShortUrl ], + data: [foundShortUrl], }, })), ); diff --git a/test/short-urls/reducers/shortUrlEdition.test.ts b/test/short-urls/reducers/shortUrlEdition.test.ts index 5775f5b8..364a32e9 100644 --- a/test/short-urls/reducers/shortUrlEdition.test.ts +++ b/test/short-urls/reducers/shortUrlEdition.test.ts @@ -48,7 +48,7 @@ describe('shortUrlEditionReducer', () => { afterEach(jest.clearAllMocks); - it.each([[ undefined ], [ null ], [ 'example.com' ]])('dispatches short URL on success', async (domain) => { + it.each([[undefined], [null], ['example.com']])('dispatches short URL on success', async (domain) => { await editShortUrl(buildShlinkApiClient)(shortCode, domain, { longUrl })(dispatch, createGetState()); expect(buildShlinkApiClient).toHaveBeenCalledTimes(1); @@ -60,12 +60,12 @@ describe('shortUrlEditionReducer', () => { }); it.each([ - [ null, { tags: [ 'foo', 'bar' ] }, 1 ], - [ null, {}, 0 ], - [ Mock.of({ version: '2.6.0' }), {}, 0 ], - [ Mock.of({ version: '2.6.0' }), { tags: [ 'foo', 'bar' ] }, 0 ], - [ Mock.of({ version: '2.5.0' }), {}, 0 ], - [ Mock.of({ version: '2.5.0' }), { tags: [ 'foo', 'bar' ] }, 1 ], + [null, { tags: ['foo', 'bar'] }, 1], + [null, {}, 0], + [Mock.of({ version: '2.6.0' }), {}, 0], + [Mock.of({ version: '2.6.0' }), { tags: ['foo', 'bar'] }, 0], + [Mock.of({ version: '2.5.0' }), {}, 0], + [Mock.of({ version: '2.5.0' }), { tags: ['foo', 'bar'] }, 1], ])( 'sends tags separately when appropriate, based on selected server and the payload', async (server, payload, expectedTagsCalls) => { diff --git a/test/short-urls/reducers/shortUrlsList.test.ts b/test/short-urls/reducers/shortUrlsList.test.ts index 8eac84c3..4aac6f92 100644 --- a/test/short-urls/reducers/shortUrlsList.test.ts +++ b/test/short-urls/reducers/shortUrlsList.test.ts @@ -67,11 +67,11 @@ describe('shortUrlsListReducer', () => { }); it.each([ - [[ createNewShortUrlVisit(11) ], 11 ], - [[ createNewShortUrlVisit(30) ], 30 ], - [[ createNewShortUrlVisit(20), createNewShortUrlVisit(40) ], 40 ], - [[{}], 10 ], - [[], 10 ], + [[createNewShortUrlVisit(11)], 11], + [[createNewShortUrlVisit(30)], 30], + [[createNewShortUrlVisit(20), createNewShortUrlVisit(40)], 40], + [[{}], 10], + [[], 10], ])('updates visits count on CREATE_VISITS', (createdVisits, expectedCount) => { const state = { shortUrls: Mock.of({ @@ -155,9 +155,9 @@ describe('shortUrlsListReducer', () => { it.each([ ((): [ShortUrl, ShortUrl[], ShortUrl[]] => { const editedShortUrl = Mock.of({ shortCode: 'notMatching' }); - const list = [ Mock.of({ shortCode: 'foo' }), Mock.of({ shortCode: 'bar' }) ]; + const list = [Mock.of({ shortCode: 'foo' }), Mock.of({ shortCode: 'bar' })]; - return [ editedShortUrl, list, list ]; + return [editedShortUrl, list, list]; })(), ((): [ShortUrl, ShortUrl[], ShortUrl[]] => { const editedShortUrl = Mock.of({ shortCode: 'matching', longUrl: 'new_one' }); @@ -165,9 +165,9 @@ describe('shortUrlsListReducer', () => { Mock.of({ shortCode: 'matching', longUrl: 'old_one' }), Mock.of({ shortCode: 'bar' }), ]; - const expectedList = [ editedShortUrl, list[1] ]; + const expectedList = [editedShortUrl, list[1]]; - return [ editedShortUrl, list, expectedList ]; + return [editedShortUrl, list, expectedList]; })(), ])('updates matching short URL on SHORT_URL_EDITED', (editedShortUrl, initialList, expectedList) => { const state = { diff --git a/test/tags/TagCard.test.tsx b/test/tags/TagCard.test.tsx index 87a2c021..94189d12 100644 --- a/test/tags/TagCard.test.tsx +++ b/test/tags/TagCard.test.tsx @@ -16,7 +16,7 @@ describe('', () => { ({ id: '1' })} - displayed={true} + displayed toggle={() => {}} />, ); @@ -30,8 +30,8 @@ describe('', () => { afterEach(jest.resetAllMocks); it.each([ - [ 'ssr', '/server/1/list-short-urls/1?tags=ssr' ], - [ 'ssr-&-foo', '/server/1/list-short-urls/1?tags=ssr-%26-foo' ], + ['ssr', '/server/1/list-short-urls/1?tags=ssr'], + ['ssr-&-foo', '/server/1/list-short-urls/1?tags=ssr-%26-foo'], ])('shows a TagBullet and a link to the list filtering by the tag', (tag, expectedLink) => { const wrapper = createWrapper(tag); const links = wrapper.find(Link); diff --git a/test/tags/TagsList.test.tsx b/test/tags/TagsList.test.tsx index 1d6de35b..82c441a4 100644 --- a/test/tags/TagsList.test.tsx +++ b/test/tags/TagsList.test.tsx @@ -65,7 +65,7 @@ describe('', () => { }); it('renders proper component based on the display mode', () => { - const wrapper = createWrapper({ filteredTags: [ 'foo', 'bar' ], stats: {} }); + const wrapper = createWrapper({ filteredTags: ['foo', 'bar'], stats: {} }); expect(wrapper.find(TagsCards)).toHaveLength(1); expect(wrapper.find(TagsTable)).toHaveLength(0); @@ -97,7 +97,7 @@ describe('', () => { }); it('can update current order via orderByColumn from table component', () => { - const wrapper = createWrapper({ filteredTags: [ 'foo', 'bar' ], stats: {} }); + const wrapper = createWrapper({ filteredTags: ['foo', 'bar'], stats: {} }); const callOrderBy = (field: TagsOrderableFields) => { ((wrapper.find(TagsTable).prop('orderByColumn') as Function)(field) as Function)(); }; diff --git a/test/tags/TagsTable.test.tsx b/test/tags/TagsTable.test.tsx index ef8315af..4b14bf78 100644 --- a/test/tags/TagsTable.test.tsx +++ b/test/tags/TagsTable.test.tsx @@ -43,12 +43,12 @@ describe('', () => { }); it.each([ - [[ 'foo', 'bar', 'baz' ], 3 ], - [[ 'foo' ], 1 ], - [ tags(19), 19 ], - [ tags(20), 20 ], - [ tags(30), 20 ], - [ tags(100), 20 ], + [['foo', 'bar', 'baz'], 3], + [['foo'], 1], + [tags(19), 19], + [tags(20), 20], + [tags(30), 20], + [tags(100), 20], ])('renders as many rows as there are in current page', (filteredTags, expectedRows) => { const wrapper = createWrapper(filteredTags); const tagRows = wrapper.find(TagsTableRow); @@ -57,12 +57,12 @@ describe('', () => { }); it.each([ - [[ 'foo', 'bar', 'baz' ], 0 ], - [[ 'foo' ], 0 ], - [ tags(19), 0 ], - [ tags(20), 0 ], - [ tags(30), 1 ], - [ tags(100), 1 ], + [['foo', 'bar', 'baz'], 0], + [['foo'], 0], + [tags(19), 0], + [tags(20), 0], + [tags(30), 1], + [tags(100), 1], ])('renders paginator if there are more than one page', (filteredTags, expectedPaginators) => { const wrapper = createWrapper(filteredTags); const paginator = wrapper.find(SimplePaginator); @@ -71,12 +71,12 @@ describe('', () => { }); it.each([ - [ 1, 20, 0 ], - [ 2, 20, 20 ], - [ 3, 20, 40 ], - [ 4, 20, 60 ], - [ 5, 7, 80 ], - [ 6, 0, 0 ], + [1, 20, 0], + [2, 20, 20], + [3, 20, 40], + [4, 20, 60], + [5, 7, 80], + [6, 0, 0], ])('renders page from query if present', (page, expectedRows, offset) => { const wrapper = createWrapper(tags(87), `page=${page}`); const tagRows = wrapper.find(TagsTableRow); diff --git a/test/tags/TagsTableRow.test.tsx b/test/tags/TagsTableRow.test.tsx index 40306224..bd8c5191 100644 --- a/test/tags/TagsTableRow.test.tsx +++ b/test/tags/TagsTableRow.test.tsx @@ -26,8 +26,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ undefined, '0', '0' ], - [{ shortUrls: 10, visits: 3480 }, '10', '3,480' ], + [undefined, '0', '0'], + [{ shortUrls: 10, visits: 3480 }, '10', '3,480'], ])('shows expected tag stats', (stats, expectedShortUrls, expectedVisits) => { const wrapper = createWrapper(stats); const links = wrapper.find(Link); diff --git a/test/tags/helpers/EditTagModal.test.tsx b/test/tags/helpers/EditTagModal.test.tsx index 85ddcf50..286457c6 100644 --- a/test/tags/helpers/EditTagModal.test.tsx +++ b/test/tags/helpers/EditTagModal.test.tsx @@ -46,8 +46,8 @@ describe('', () => { }); it.each([ - [ true, 'Saving...' ], - [ false, 'Save' ], + [true, 'Saving...'], + [false, 'Save'], ])('renders submit button in expected state', (editing, expectedText) => { const wrapper = createWrapper({ editing }); const submitBtn = wrapper.find(Button).findWhere((btn) => btn.prop('color') === 'primary'); @@ -57,8 +57,8 @@ describe('', () => { }); it.each([ - [ true, 1 ], - [ false, 0 ], + [true, 1], + [false, 0], ])('displays error result in case of error', (error, expectedResultCount) => { const wrapper = createWrapper({ error, errorData: Mock.all() }); const result = wrapper.find(Result); diff --git a/test/tags/helpers/Tag.test.tsx b/test/tags/helpers/Tag.test.tsx index 44b68bba..53a4bb4b 100644 --- a/test/tags/helpers/Tag.test.tsx +++ b/test/tags/helpers/Tag.test.tsx @@ -26,8 +26,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ true ], - [ false ], + [true], + [false], ])('includes an extra class when the color is light', (isLight) => { isColorLightForKey.mockReturnValue(isLight); @@ -37,11 +37,11 @@ describe('', () => { }); it.each([ - [ MAIN_COLOR ], - [ '#8A661C' ], - [ '#F7BE05' ], - [ '#5A02D8' ], - [ '#202786' ], + [MAIN_COLOR], + ['#8A661C'], + ['#F7BE05'], + ['#5A02D8'], + ['#202786'], ])('includes generated color as backgroundColor', (generatedColor) => { getColorForKey.mockReturnValue(generatedColor); @@ -64,9 +64,9 @@ describe('', () => { }); it.each([ - [ true, 1, 'auto' ], - [ false, 0, 'pointer' ], - [ undefined, 0, 'pointer' ], + [true, 1, 'auto'], + [false, 0, 'pointer'], + [undefined, 0, 'pointer'], ])('includes a close component when the tag is clearable', (clearable, expectedCloseBtnAmount, expectedCursor) => { const wrapper = createWrapper('foo', clearable); @@ -75,8 +75,8 @@ describe('', () => { }); it.each([ - [ undefined, 'foo' ], - [ 'bar', 'bar' ], + [undefined, 'foo'], + ['bar', 'bar'], ])('falls back to text as children when no children are provided', (children, expectedChildren) => { const wrapper = createWrapper('foo', false, children); diff --git a/test/tags/helpers/TagsSelector.test.tsx b/test/tags/helpers/TagsSelector.test.tsx index 91934aca..b4d1f6fa 100644 --- a/test/tags/helpers/TagsSelector.test.tsx +++ b/test/tags/helpers/TagsSelector.test.tsx @@ -8,8 +8,8 @@ import { Settings } from '../../../src/settings/reducers/settings'; describe('', () => { const onChange = jest.fn(); const TagsSelector = createTagsSelector(Mock.all()); - const tags = [ 'foo', 'bar' ]; - const tagsList = Mock.of({ tags: [ ...tags, 'baz' ] }); + const tags = ['foo', 'bar']; + const tagsList = Mock.of({ tags: [...tags, 'baz'] }); let wrapper: ShallowWrapper; beforeEach(jest.clearAllMocks); @@ -57,9 +57,9 @@ describe('', () => { }); it.each([ - [ 'The-New-Tag', [ ...tags, 'the-new-tag' ]], - [ 'comma,separated,tags', [ ...tags, 'comma', 'separated', 'tags' ]], - [ 'foo', tags ], + ['The-New-Tag', [...tags, 'the-new-tag']], + ['comma,separated,tags', [...tags, 'comma', 'separated', 'tags']], + ['foo', tags], ])('invokes onChange when new tags are added', (newTag, expectedTags) => { wrapper.simulate('addition', { name: newTag }); @@ -67,11 +67,11 @@ describe('', () => { }); it.each([ - [ 0, 'bar' ], - [ 1, 'foo' ], + [0, 'bar'], + [1, 'foo'], ])('invokes onChange when tags are deleted', (index, expected) => { wrapper.simulate('delete', index); - expect(onChange).toHaveBeenCalledWith([ expected ]); + expect(onChange).toHaveBeenCalledWith([expected]); }); }); diff --git a/test/tags/reducers/tagDelete.test.ts b/test/tags/reducers/tagDelete.test.ts index b51650d5..c68578a2 100644 --- a/test/tags/reducers/tagDelete.test.ts +++ b/test/tags/reducers/tagDelete.test.ts @@ -59,7 +59,7 @@ describe('tagDeleteReducer', () => { await dispatchable(dispatch, getState); expect(apiClientMock.deleteTags).toHaveBeenCalledTimes(1); - expect(apiClientMock.deleteTags).toHaveBeenNthCalledWith(1, [ tag ]); + expect(apiClientMock.deleteTags).toHaveBeenNthCalledWith(1, [tag]); expect(dispatch).toHaveBeenCalledTimes(2); expect(dispatch).toHaveBeenNthCalledWith(1, { type: DELETE_TAG_START }); @@ -79,7 +79,7 @@ describe('tagDeleteReducer', () => { } expect(apiClientMock.deleteTags).toHaveBeenCalledTimes(1); - expect(apiClientMock.deleteTags).toHaveBeenNthCalledWith(1, [ tag ]); + expect(apiClientMock.deleteTags).toHaveBeenNthCalledWith(1, [tag]); expect(dispatch).toHaveBeenCalledTimes(2); expect(dispatch).toHaveBeenNthCalledWith(1, { type: DELETE_TAG_START }); diff --git a/test/tags/reducers/tagsList.test.ts b/test/tags/reducers/tagsList.test.ts index 67bf868f..a0251203 100644 --- a/test/tags/reducers/tagsList.test.ts +++ b/test/tags/reducers/tagsList.test.ts @@ -33,7 +33,7 @@ describe('tagsListReducer', () => { }); it('returns provided tags as filtered and regular tags on LIST_TAGS', () => { - const tags = [ 'foo', 'bar', 'baz' ]; + const tags = ['foo', 'bar', 'baz']; expect(reducer(undefined, { type: LIST_TAGS, tags } as any)).toEqual({ tags, @@ -44,9 +44,9 @@ describe('tagsListReducer', () => { }); it('removes provided tag from filtered and regular tags on TAG_DELETED', () => { - const tags = [ 'foo', 'bar', 'baz' ]; + const tags = ['foo', 'bar', 'baz']; const tag = 'foo'; - const expectedTags = [ 'bar', 'baz' ]; + const expectedTags = ['bar', 'baz']; expect(reducer(state({ tags, filteredTags: tags }), { type: TAG_DELETED, tag } as any)).toEqual({ tags: expectedTags, @@ -55,10 +55,10 @@ describe('tagsListReducer', () => { }); it('renames provided tag from filtered and regular tags on TAG_EDITED', () => { - const tags = [ 'foo', 'bar', 'baz' ]; + const tags = ['foo', 'bar', 'baz']; const oldName = 'bar'; const newName = 'renamed'; - const expectedTags = [ 'foo', 'renamed', 'baz' ].sort(); + const expectedTags = ['foo', 'renamed', 'baz'].sort(); expect(reducer(state({ tags, filteredTags: tags }), { type: TAG_EDITED, oldName, newName } as any)).toEqual({ tags: expectedTags, @@ -67,9 +67,9 @@ describe('tagsListReducer', () => { }); it('filters original list of tags by provided search term on FILTER_TAGS', () => { - const tags = [ 'foo', 'bar', 'baz', 'foo2', 'fo' ]; + const tags = ['foo', 'bar', 'baz', 'foo2', 'fo']; const searchTerm = 'fo'; - const filteredTags = [ 'foo', 'foo2', 'fo' ]; + const filteredTags = ['foo', 'foo2', 'fo']; expect(reducer(state({ tags }), { type: FILTER_TAGS, searchTerm } as any)).toEqual({ tags, @@ -78,11 +78,11 @@ describe('tagsListReducer', () => { }); it.each([ - [[ 'foo', 'foo3', 'bar3', 'fo' ], [ 'foo', 'bar', 'baz', 'foo2', 'fo', 'foo3', 'bar3' ]], - [[ 'foo', 'bar' ], [ 'foo', 'bar', 'baz', 'foo2', 'fo' ]], - [[ 'new', 'tag' ], [ 'foo', 'bar', 'baz', 'foo2', 'fo', 'new', 'tag' ]], + [['foo', 'foo3', 'bar3', 'fo'], ['foo', 'bar', 'baz', 'foo2', 'fo', 'foo3', 'bar3']], + [['foo', 'bar'], ['foo', 'bar', 'baz', 'foo2', 'fo']], + [['new', 'tag'], ['foo', 'bar', 'baz', 'foo2', 'fo', 'new', 'tag']], ])('appends new short URL\'s tags to the list of tags on CREATE_SHORT_URL', (shortUrlTags, expectedTags) => { - const tags = [ 'foo', 'bar', 'baz', 'foo2', 'fo' ]; + const tags = ['foo', 'bar', 'baz', 'foo2', 'fo']; const result = Mock.of({ tags: shortUrlTags }); expect(reducer(state({ tags }), { type: CREATE_SHORT_URL, result } as any)).toEqual({ @@ -116,11 +116,11 @@ describe('tagsListReducer', () => { it('does nothing when loading', async () => assertNoAction(state({ loading: true }))); it( 'does nothing when list is not empty', - async () => assertNoAction(state({ loading: false, tags: [ 'foo', 'bar' ] })), + async () => assertNoAction(state({ loading: false, tags: ['foo', 'bar'] })), ); it('dispatches loaded lists when no error occurs', async () => { - const tags = [ 'foo', 'bar', 'baz' ]; + const tags = ['foo', 'bar', 'baz']; listTagsMock.mockResolvedValue({ tags, stats: [] }); buildShlinkApiClient.mockReturnValue({ listTags: listTagsMock }); diff --git a/test/utils/Checkbox.test.tsx b/test/utils/Checkbox.test.tsx index 5b2350d7..ecb9b098 100644 --- a/test/utils/Checkbox.test.tsx +++ b/test/utils/Checkbox.test.tsx @@ -16,7 +16,7 @@ describe('', () => { afterEach(() => wrapped?.unmount()); it('includes extra class names when provided', () => { - const classNames = [ 'foo', 'bar', 'baz' ]; + const classNames = ['foo', 'bar', 'baz']; expect.assertions(classNames.length); classNames.forEach((className) => { @@ -27,7 +27,7 @@ describe('', () => { }); it('marks input as checked if defined', () => { - const checkeds = [ true, false ]; + const checkeds = [true, false]; expect.assertions(checkeds.length); checkeds.forEach((checked) => { @@ -39,7 +39,7 @@ describe('', () => { }); it('renders provided children inside the label', () => { - const labels = [ 'foo', 'bar', 'baz' ]; + const labels = ['foo', 'bar', 'baz']; expect.assertions(labels.length); labels.forEach((children) => { diff --git a/test/utils/DropdownBtn.test.tsx b/test/utils/DropdownBtn.test.tsx index a8ee2012..0a6d301a 100644 --- a/test/utils/DropdownBtn.test.tsx +++ b/test/utils/DropdownBtn.test.tsx @@ -6,21 +6,21 @@ import { DropdownBtn, DropdownBtnProps } from '../../src/utils/DropdownBtn'; describe('', () => { let wrapper: ShallowWrapper; const createWrapper = (props: PropsWithChildren) => { - wrapper = shallow(); + wrapper = shallow(); return wrapper; }; afterEach(() => wrapper?.unmount()); - it.each([[ 'foo' ], [ 'bar' ], [ 'baz' ]])('displays provided text', (text) => { + it.each([['foo'], ['bar'], ['baz']])('displays provided text', (text) => { const wrapper = createWrapper({ text }); const toggle = wrapper.find(DropdownToggle); expect(toggle.prop('children')).toContain(text); }); - it.each([[ 'foo' ], [ 'bar' ], [ 'baz' ]])('displays provided children', (children) => { + it.each([['foo'], ['bar'], ['baz']])('displays provided children', (children) => { const wrapper = createWrapper({ text: '', children }); const menu = wrapper.find(DropdownMenu); @@ -28,10 +28,10 @@ describe('', () => { }); it.each([ - [ undefined, 'dropdown-btn__toggle btn-block' ], - [ '', 'dropdown-btn__toggle btn-block' ], - [ 'foo', 'dropdown-btn__toggle btn-block foo' ], - [ 'bar', 'dropdown-btn__toggle btn-block bar' ], + [undefined, 'dropdown-btn__toggle btn-block'], + ['', 'dropdown-btn__toggle btn-block'], + ['foo', 'dropdown-btn__toggle btn-block foo'], + ['bar', 'dropdown-btn__toggle btn-block bar'], ])('includes provided classes', (className, expectedClasses) => { const wrapper = createWrapper({ text: '', className }); const toggle = wrapper.find(DropdownToggle); @@ -40,9 +40,9 @@ describe('', () => { }); it.each([ - [ 100, { minWidth: '100px' }], - [ 250, { minWidth: '250px' }], - [ undefined, {}], + [100, { minWidth: '100px' }], + [250, { minWidth: '250px' }], + [undefined, {}], ])('renders proper styles when minWidth is provided', (minWidth, expectedStyle) => { const wrapper = createWrapper({ text: '', minWidth }); const style = wrapper.find(DropdownMenu).prop('style'); diff --git a/test/utils/DropdownBtnMenu.test.tsx b/test/utils/DropdownBtnMenu.test.tsx index 30ab3d74..42f43f00 100644 --- a/test/utils/DropdownBtnMenu.test.tsx +++ b/test/utils/DropdownBtnMenu.test.tsx @@ -37,9 +37,9 @@ describe('', () => { }); it.each([ - [ undefined, true ], - [ true, true ], - [ false, false ], + [undefined, true], + [true, true], + [false, false], ])('renders menu to right when expected', (right, expectedRight) => { const wrapper = createWrapper({ right }); diff --git a/test/utils/ExportBtn.test.tsx b/test/utils/ExportBtn.test.tsx index 97d27eee..03f27420 100644 --- a/test/utils/ExportBtn.test.tsx +++ b/test/utils/ExportBtn.test.tsx @@ -15,8 +15,8 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ true, 'Exporting...' ], - [ false, 'Export (' ], + [true, 'Exporting...'], + [false, 'Export ('], ])('renders a button', (loading, text) => { const wrapper = createWrapper(undefined, loading); @@ -27,10 +27,10 @@ describe('', () => { }); it.each([ - [ undefined, '0' ], - [ 10, '10' ], - [ 10_000, '10,000' ], - [ 10_000_000, '10,000,000' ], + [undefined, '0'], + [10, '10'], + [10_000, '10,000'], + [10_000_000, '10,000,000'], ])('renders expected amount', (amount, expectedRenderedAmount) => { const wrapper = createWrapper(amount); diff --git a/test/utils/InfoTooltip.test.tsx b/test/utils/InfoTooltip.test.tsx index bce776a5..efbe3af3 100644 --- a/test/utils/InfoTooltip.test.tsx +++ b/test/utils/InfoTooltip.test.tsx @@ -5,9 +5,9 @@ import { InfoTooltip } from '../../src/utils/InfoTooltip'; describe('', () => { it.each([ - [ undefined ], - [ 'foo' ], - [ 'bar' ], + [undefined], + ['foo'], + ['bar'], ])('renders expected className on span', (className) => { const wrapper = shallow(); const span = wrapper.find('span'); @@ -16,10 +16,10 @@ describe('', () => { }); it.each([ - [ ], - [ 'Foo' ], - [ 'Hello' ], - [[ 'One', 'Two', ]], + [], + ['Foo'], + ['Hello'], + [['One', 'Two', ]], ])('passes children down to the nested tooltip component', (children) => { const wrapper = shallow({children}); const tooltip = wrapper.find(UncontrolledTooltip); @@ -28,10 +28,10 @@ describe('', () => { }); it.each([ - [ 'right' as Placement ], - [ 'left' as Placement ], - [ 'top' as Placement ], - [ 'bottom' as Placement ], + ['right' as Placement], + ['left' as Placement], + ['top' as Placement], + ['bottom' as Placement], ])('places tooltip where requested', (placement) => { const wrapper = shallow(); const tooltip = wrapper.find(UncontrolledTooltip); diff --git a/test/utils/Message.test.tsx b/test/utils/Message.test.tsx index 578d68b6..2ad9d531 100644 --- a/test/utils/Message.test.tsx +++ b/test/utils/Message.test.tsx @@ -15,9 +15,9 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ true, 1, 0 ], - [ false, 0, 1 ], - [ undefined, 0, 1 ], + [true, 1, 0], + [false, 0, 1], + [undefined, 0, 1], ])('renders expected classes based on width', (fullWidth, expectedFull, expectedNonFull) => { const wrapper = createWrapper({ fullWidth }); @@ -26,27 +26,27 @@ describe('', () => { }); it.each([ - [ true, 'These are the children contents' ], - [ false, 'These are the children contents' ], - [ true, undefined ], - [ false, undefined ], + [true, 'These are the children contents'], + [false, 'These are the children contents'], + [true, undefined], + [false, undefined], ])('renders expected content', (loading, children) => { const wrapper = createWrapper({ loading, children }); expect(wrapper.find(FontAwesomeIcon)).toHaveLength(loading ? 1 : 0); if (loading) { - expect(wrapper.find('span').text()).toContain(children ? children : 'Loading...'); + expect(wrapper.find('span').text()).toContain(children || 'Loading...'); } else { expect(wrapper.find('span')).toHaveLength(0); - expect(wrapper.find('h3').text()).toContain(children ? children : ''); + expect(wrapper.find('h3').text()).toContain(children || ''); } }); it.each([ - [ 'error', 'border-danger', 'text-danger' ], - [ 'default', '', 'text-muted' ], - [ undefined, '', 'text-muted' ], + ['error', 'border-danger', 'text-danger'], + ['default', '', 'text-muted'], + [undefined, '', 'text-muted'], ])('renders proper classes based on message type', (type, expectedCardClass, expectedH3Class) => { const wrapper = createWrapper({ type: type as 'default' | 'error' | undefined }); const card = wrapper.find(Card); diff --git a/test/utils/NavPills.test.tsx b/test/utils/NavPills.test.tsx index 5f015432..b06d1524 100644 --- a/test/utils/NavPills.test.tsx +++ b/test/utils/NavPills.test.tsx @@ -4,9 +4,9 @@ import { NavPillItem, NavPills } from '../../src/utils/NavPills'; describe('', () => { it.each([ - [ 'Foo' ], - [ Hi! ], - [[ , Hi! ]], + ['Foo'], + [Hi!], + [[, Hi!]], ])('throws error when any of the children is not a NavPillItem', (children) => { expect.assertions(1); @@ -18,9 +18,9 @@ describe('', () => { }); it.each([ - [ undefined ], - [ true ], - [ false ], + [undefined], + [true], + [false], ])('renders provided items', (fill) => { const wrapper = shallow( diff --git a/test/utils/PaginationDropdown.test.tsx b/test/utils/PaginationDropdown.test.tsx index d17c6edf..5a413a86 100644 --- a/test/utils/PaginationDropdown.test.tsx +++ b/test/utils/PaginationDropdown.test.tsx @@ -7,7 +7,7 @@ describe('', () => { let wrapper: ShallowWrapper; beforeEach(() => { - wrapper = shallow(); + wrapper = shallow(); }); afterEach(jest.clearAllMocks); @@ -20,11 +20,11 @@ describe('', () => { }); it.each([ - [ 0, 10 ], - [ 1, 50 ], - [ 2, 100 ], - [ 3, 200 ], - [ 5, Infinity ], + [0, 10], + [1, 50], + [2, 100], + [3, 200], + [5, Infinity], ])('sets expected value when an item is clicked', (index, expectedValue) => { const item = wrapper.find(DropdownItem).at(index); diff --git a/test/utils/Result.test.tsx b/test/utils/Result.test.tsx index ab0062d2..b8a17cbb 100644 --- a/test/utils/Result.test.tsx +++ b/test/utils/Result.test.tsx @@ -13,9 +13,9 @@ describe('', () => { afterEach(() => wrapper?.unmount()); it.each([ - [ 'success' as ResultType, 'bg-main text-white' ], - [ 'error' as ResultType, 'bg-danger text-white' ], - [ 'warning' as ResultType, 'bg-warning' ], + ['success' as ResultType, 'bg-main text-white'], + ['error' as ResultType, 'bg-danger text-white'], + ['warning' as ResultType, 'bg-warning'], ])('renders expected classes based on type', (type, expectedClasses) => { const wrapper = createWrapper({ type }); const innerCard = wrapper.find(SimpleCard); @@ -24,9 +24,9 @@ describe('', () => { }); it.each([ - [ undefined ], - [ 'foo' ], - [ 'bar' ], + [undefined], + ['foo'], + ['bar'], ])('renders provided classes in root element', (className) => { const wrapper = createWrapper({ type: 'success', className }); diff --git a/test/utils/SimpleCard.test.tsx b/test/utils/SimpleCard.test.tsx index 776cff07..a589c486 100644 --- a/test/utils/SimpleCard.test.tsx +++ b/test/utils/SimpleCard.test.tsx @@ -4,8 +4,8 @@ import { SimpleCard } from '../../src/utils/SimpleCard'; describe('', () => { it.each([ - [{}, 0 ], - [{ title: 'Cool title' }, 1 ], + [{}, 0], + [{ title: 'Cool title' }, 1], ])('renders header only if title is provided', (props, expectedAmountOfHeaders) => { const wrapper = shallow(); diff --git a/test/utils/SortingDropdown.test.tsx b/test/utils/SortingDropdown.test.tsx index a2c874ce..aff01c1a 100644 --- a/test/utils/SortingDropdown.test.tsx +++ b/test/utils/SortingDropdown.test.tsx @@ -76,8 +76,8 @@ describe('', () => { }); it.each([ - [{ isButton: false }, <>Order by ], - [{ isButton: true }, <>Order by... ], + [{ isButton: false }, <>Order by], + [{ isButton: true }, <>Order by...], [ { isButton: true, order: { field: 'foo', dir: 'ASC' as OrderDir } }, 'Order by: "Foo" - "ASC"', @@ -86,11 +86,11 @@ describe('', () => { { isButton: true, order: { field: 'baz', dir: 'DESC' as OrderDir } }, 'Order by: "Hello World" - "DESC"', ], - [{ isButton: true, order: { field: 'baz' } }, 'Order by: "Hello World" - "DESC"' ], + [{ isButton: true, order: { field: 'baz' } }, 'Order by: "Hello World" - "DESC"'], ])('displays expected text in toggle', (props, expectedText) => { const wrapper = createWrapper(props); const toggle = wrapper.find(DropdownToggle); - const [ children ] = (toggle.prop('children') as any[]).filter(Boolean); + const [children] = (toggle.prop('children') as any[]).filter(Boolean); expect(children).toEqual(expectedText); }); diff --git a/test/utils/Time.test.tsx b/test/utils/Time.test.tsx index 3742624d..a62dc06c 100644 --- a/test/utils/Time.test.tsx +++ b/test/utils/Time.test.tsx @@ -13,8 +13,8 @@ describe('