diff --git a/.circleci/config.yml b/.circleci/config.yml index 242bc61aec..8cb6891619 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,44 +1,112 @@ +version: 2.1 + dockerhub_auth: &dockerhub_auth auth: username: $DOCKERHUB_USERNAME password: $DOCKERHUB_PASSWORD -# yaml fragment for deploy filters deploy_filter: &deploy_filter filters: branches: ignore: - /__.*/ -version: 2.1 - -jobs: - test_form_backend: - docker: - - image: eaadtbs/ib-ci-build:3.0 - <<: *dockerhub_auth - working_directory: "~/InfoBase" +commands: + top_level_install: steps: - - checkout: - path: "~/InfoBase" - restore_cache: keys: - - form-backend-dependencies-{{ checksum "form_backend/package-lock.json" }}-v2 - top-level-dependencies-{{ checksum "package-lock.json" }}-v2 - run: command: | - [ -e "form_backend/node_modules" ] || (cd form_backend && npm ci) + [ -e "node_modules" ] || npm ci + - save_cache: + key: top-level-dependencies-{{ checksum "package-lock.json" }}-v2 + paths: + - node_modules + form_backend_install: + steps: + - restore_cache: + keys: + - form-backend-dependencies-{{ checksum "form_backend/package-lock.json" }}-v2 - run: command: | - [ -e "node_modules" ] || npm ci + [ -e "form_backend/node_modules" ] || (cd form_backend && npm ci) - save_cache: key: form-backend-dependencies-{{ checksum "form_backend/package-lock.json" }}-v2 paths: - form_backend/node_modules + server_install: + steps: + - restore_cache: + keys: + - server-dependencies-{{ checksum "server/package-lock.json" }}-v2 + - run: + command: | + [ -e "server/node_modules" ] || (cd server && npm ci) - save_cache: - key: top-level-dependencies-{{ checksum "package-lock.json" }}-v2 + key: server-dependencies-{{ checksum "server/package-lock.json" }}-v2 paths: - - node_modules + - server/node_modules + client_install: + steps: + # need to bust the client package cache on patch changes in addition to package-lock changes + - run: cksum ./client/patches/* > client-patch-checksums + - restore_cache: + keys: + - client-dependencies-{{ checksum "client/package-lock.json" }}-{{ checksum "client-patch-checksums" }}-v2 + - run: + command: | + [ -e "client/node_modules" ] || (cd client && npm ci) + - save_cache: + key: client-dependencies-{{ checksum "client/package-lock.json" }}-{{ checksum "client-patch-checksums" }}-v2 + paths: + - client/node_modules + - client/.cache/Cypress # path set by CYPRESS_CACHE_FOLDER env var + +jobs: + static_analysis: + docker: + - image: eaadtbs/ib-ci-build:3.0 + <<: *dockerhub_auth + working_directory: "~/InfoBase" + steps: + - checkout: + path: "~/InfoBase" + + - top_level_install + - form_backend_install + - server_install + - client_install + + - restore_cache: + keys: + - repo-wide-lint-cache-{{ .Branch }} + - repo-wide-lint-cache-master + - run: + command: npm run eslint + - save_cache: + key: repo-wide-lint-cache-{{ .Branch }} + paths: + - .eslintcache + + - run: + command: npm run prettier + + - run: + command: cd client && npx tsc --noEmit + + test_form_backend: + docker: + - image: eaadtbs/ib-ci-build:3.0 + <<: *dockerhub_auth + working_directory: "~/InfoBase" + steps: + - checkout: + path: "~/InfoBase" + + - top_level_install + - form_backend_install - restore_cache: keys: @@ -90,49 +158,15 @@ jobs: - image: eaadtbs/ib-ci-build:3.0 <<: *dockerhub_auth working_directory: "~/InfoBase" - environment: - CYPRESS_CACHE_FOLDER: "~/InfoBase/client/.cache/Cypress" resource_class: medium steps: - checkout: path: "~/InfoBase" - run: ./scripts/ci_scripts/create_envs.sh - - restore_cache: - keys: - - top-level-dependencies-{{ checksum "package-lock.json" }}-v4 - - run: - command: | - [ -e "node_modules" ] || npm ci - - save_cache: - key: top-level-dependencies-{{ checksum "package-lock.json" }}-v4 - paths: - - node_modules - - # need to bust the client package cache on patch changes in addition to package-lock changes - - run: cksum ./client/patches/* > client-patch-checksums - - restore_cache: - keys: - - client-dependencies-{{ checksum "client/package-lock.json" }}-{{ checksum "client-patch-checksums" }}-v2 - - run: - command: | - [ -e "client/node_modules" ] || (cd client && npm ci) - - save_cache: - key: client-dependencies-{{ checksum "client/package-lock.json" }}-{{ checksum "client-patch-checksums" }}-v2 - paths: - - client/node_modules - - client/.cache/Cypress - - - restore_cache: - keys: - - server-dependencies-{{ checksum "server/package-lock.json" }}-v2 - - run: - command: | - [ -e "server/node_modules" ] || (cd server && npm ci) - - save_cache: - key: server-dependencies-{{ checksum "server/package-lock.json" }}-v2 - paths: - - server/node_modules + - top_level_install + - client_install + - server_install # transpiling the server slightly out of place for this job, not needed till the server deploy step, but # the deploy job image isn't guaranteed to have the necessary environment for this @@ -272,8 +306,6 @@ jobs: - image: eaadtbs/ib-ci-cypress:4.0 <<: *dockerhub_auth working_directory: "~/InfoBase" - environment: - CYPRESS_CACHE_FOLDER: "~/InfoBase/client/.cache/Cypress" parameters: batch-count: type: integer @@ -380,6 +412,10 @@ jobs: - run: if [[ $CIRCLE_BRANCH = master ]]; then ./scripts/ci_scripts/store_bundle_stats.sh; fi workflows: + static_analysis: + jobs: + - static_analysis + test_form_backend: jobs: - test_form_backend diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..810b188aab --- /dev/null +++ b/.eslintignore @@ -0,0 +1,7 @@ +*/.coverage +*/.cache +*/transpiled_build +client/build +client/build_prod +client/src/**/*.scss.d.ts +client/scripts/typescript_progress/output diff --git a/.eslintrc.json b/.eslintrc.json index e9ec5a92bd..88c5cc6829 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,10 @@ "plugin:import/errors" ], "rules": { - "no-unused-vars": ["warn", { "args": "none" }], + "no-unused-vars": [ + "warn", + { "ignoreRestSiblings": true, "argsIgnorePattern": "^_.+" } + ], "no-use-before-define": ["error", { "functions": true, "classes": true }], "no-throw-literal": "error", "lodash/no-double-unwrap": ["error"], diff --git a/.gitignore b/.gitignore index 0f27a7739a..80c3f03bee 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ npm-debug* node_modules/ .local_mongo .coverage -.cache \ No newline at end of file +.cache +.eslintcache \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index a3324e8638..a333abc71c 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -20,8 +20,4 @@ local_branch_name=$(echo "$local_ref" | sed "s/refs\/heads\///") if [[ ($local_branch_name =~ ^__ || $local_branch_name =~ ^archived__ ) && $remote != "archive" ]]; then echo -e "\033[0;31mDouble underscore and archived branches can only be pushed to the archive (private) remote!\033[0m" exit 1 -fi - - -# run prettier check -npm run prettier_check . \ No newline at end of file +fi \ No newline at end of file diff --git a/client/.eslintignore b/client/.eslintignore deleted file mode 100644 index 3371dfeb08..0000000000 --- a/client/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -patches/* -build/* -build_prod/* \ No newline at end of file diff --git a/client/.eslintrc.json b/client/.eslintrc.json index e3f4661102..d6430072ce 100644 --- a/client/.eslintrc.json +++ b/client/.eslintrc.json @@ -47,8 +47,11 @@ ], "rules": { "no-prototype-builtins": "off", //common TS pattern - "@typescript-eslint/no-unused-vars": "off", // Lot of false positives on this rule. Better to use the exprimental - "@typescript-eslint/no-unused-vars-experimental": "warn", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { "ignoreRestSiblings": true, "argsIgnorePattern": "^_.+" } + ], "@typescript-eslint/no-redeclare": ["error"], "@typescript-eslint/explicit-module-boundary-types": "off", // TODO might want to turn this on later, but it will take a while to fix all the warnings "@typescript-eslint/ban-types": [ @@ -66,7 +69,8 @@ } } } - ] + ], + "@typescript-eslint/consistent-type-imports": "error" } } ], diff --git a/client/build_code/webpack_common.js b/client/build_code/webpack_common.js index 8af117b19f..54a4a43aee 100644 --- a/client/build_code/webpack_common.js +++ b/client/build_code/webpack_common.js @@ -145,7 +145,7 @@ function get_plugins({ }), new CircularDependencyPlugin({ exclude: /node_modules/, - onDetected({ module: webpackModuleRecord, paths, compilation }) { + onDetected({ paths, compilation }) { /* Reminder: circular dependencies aren't _necessarily_ problematic. The concern is that when they _are_ the source of a bug, they can be a very hard to identify source. Best to avoid creating them, but at a certain point avoiding them can start diff --git a/client/build_code/write_footnote_bundles.js b/client/build_code/write_footnote_bundles.js index 8d9145d5f8..e836cdae08 100644 --- a/client/build_code/write_footnote_bundles.js +++ b/client/build_code/write_footnote_bundles.js @@ -36,7 +36,7 @@ function populate_stores(parsed_models) { crso_deptcodes[id] = dept_code; }); - _.each(programs, ({ dept_code, activity_code, crso_id }) => { + _.each(programs, ({ dept_code, activity_code }) => { const prog_id = `${dept_code}-${activity_code}`; program_deptcodes[prog_id] = dept_code; }); @@ -50,7 +50,7 @@ function populate_stores(parsed_models) { //initialize all depts and tags to have empty array of footnotes footnotes_by_deptcode = _.chain(depts) - .map(({ org_id, dept_code }) => [dept_code, []]) + .map(({ dept_code }) => [dept_code, []]) .fromPairs() .value(); diff --git a/client/cypress/integration/InfoBase/route_tests.spec.js b/client/cypress/integration/InfoBase/route_tests.spec.js index b457498172..ce2ffa38da 100644 --- a/client/cypress/integration/InfoBase/route_tests.spec.js +++ b/client/cypress/integration/InfoBase/route_tests.spec.js @@ -322,7 +322,7 @@ const run_tests_from_config = ({ if (expect_error_boundary) { // To catch whatever error triggered this error boundary, otherwise this would fail even if it // results in the expected error boundary - cy.on("fail", (e, test) => { + cy.on("fail", (e) => { console.log( "This test was expected to fail. It did, with the following error", e diff --git a/client/cypress/plugins/index.js b/client/cypress/plugins/index.js index 6261b8715d..7e87c1fb6d 100644 --- a/client/cypress/plugins/index.js +++ b/client/cypress/plugins/index.js @@ -3,7 +3,7 @@ */ // eslint-disable-next-line import/no-commonjs -module.exports = (on, config) => { +module.exports = (on) => { on("task", { log(message) { console.log(message); diff --git a/client/package-lock.json b/client/package-lock.json index 7512419f9e..79fd171c28 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -103,8 +103,8 @@ "@types/react-router": "^5.1.14", "@types/react-router-dom": "^5.1.8", "@types/react-virtualized": "^9.21.11", - "@typescript-eslint/eslint-plugin": "^4.30", - "@typescript-eslint/parser": "^4.30", + "@typescript-eslint/eslint-plugin": "^5.8", + "@typescript-eslint/parser": "^5.8", "axe-core": "^4.3.1", "babel-loader": "^8.1.0", "bundle-stats-webpack-plugin": "^3.2.0", @@ -114,10 +114,10 @@ "css-modules-typescript-loader": "^4.0.1", "cypress": "^8.5.0", "cypress-axe": "^0.13", - "eslint": "^7.12.1", + "eslint": "^8.5.0", "eslint-import-resolver-typescript": "^2.4.0", "eslint-plugin-cypress": "^2.11.2", - "eslint-plugin-import": "^2.22.1", + "eslint-plugin-import": "^2.25.0", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-react": "^7.21.5", "eslint-plugin-react-hooks": "^4.2.0", @@ -141,7 +141,7 @@ "sass-loader": "^12.0.0", "script-loader": "^0.7.0", "style-loader": "^3.3.0", - "typescript": "^4.4", + "typescript": "^4.5", "webpack": "^5.9.0", "webpack-retry-chunk-load-plugin": "^2.2.0" }, @@ -2075,28 +2075,36 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.3", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, - "license": "MIT", "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/@eslint/eslintrc/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.11.0", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, - "license": "MIT", "dependencies": { "type-fest": "^0.20.2" }, @@ -2109,21 +2117,23 @@ }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", + "node_modules/@eslint/eslintrc/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" + "dependencies": { + "argparse": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/@formatjs/ecma402-abstract": { @@ -2192,11 +2202,12 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.5.0", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, - "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" }, @@ -2205,9 +2216,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.0", - "dev": true, - "license": "BSD-3-Clause" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -3732,8 +3744,9 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" @@ -3744,16 +3757,18 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -4440,29 +4455,30 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.8.0.tgz", + "integrity": "sha512-spu1UW7QuBn0nJ6+psnfCc3iVoQAifjKORgBngKOmC8U/1tbe2YJMzYQqDGYB4JCss7L8+RM2kKLb1B1Aw9BNA==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", + "@typescript-eslint/experimental-utils": "5.8.0", + "@typescript-eslint/scope-manager": "5.8.0", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", - "regexpp": "^3.1.0", + "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": { @@ -4485,47 +4501,49 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.8.0.tgz", + "integrity": "sha512-KN5FvNH71bhZ8fKtL+lhW7bjm7cxs1nt+hrDZWIqb6ViCffQcWyLunGrgvISgkRojIDcXIsH+xlFfI4RCDA0xA==", "dev": true, - "license": "MIT", "dependencies": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.8.0", + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/typescript-estree": "5.8.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.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": { - "eslint": "*" + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.8.0.tgz", + "integrity": "sha512-Gleacp/ZhRtJRYs5/T8KQR3pAQjQI89Dn/k+OzyCKOsLiZH2/Vh60cFBTnFsHNI6WAD+lNUo/xGZ4NeA5u0Ipw==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" + "@typescript-eslint/scope-manager": "5.8.0", + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/typescript-estree": "5.8.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": { @@ -4534,15 +4552,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.8.0.tgz", + "integrity": "sha512-x82CYJsLOjPCDuFFEbS6e7K1QEWj7u5Wk1alw8A+gnJiYwNnDJk0ib6PCegbaPMjrfBvFKa7SxE3EOnnIQz2Gg==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/visitor-keys": "5.8.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", @@ -4550,11 +4569,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.8.0.tgz", + "integrity": "sha512-LdCYOqeqZWqCMOmwFnum6YfW9F3nKuxJiR84CdIRN5nfHJ7gyvGpXWqL/AaW0k3Po0+wm93ARAsOdzlZDPCcXg==", "dev": true, - "license": "MIT", "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", @@ -4562,20 +4582,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.8.0.tgz", + "integrity": "sha512-srfeZ3URdEcUsSLbkOFqS7WoxOqn8JNil2NSLO9O+I2/Uyc85+UlfpEvQHIpj5dVts7KKOZnftoJD/Fdv0L7nQ==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/visitor-keys": "5.8.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", @@ -4589,8 +4610,9 @@ }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, - "license": "ISC", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4602,15 +4624,16 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.8.0.tgz", + "integrity": "sha512-+HDIGOEMnqbxdAHegxvnOqESUH6RWFRR2b8qxP1W9CZnnYh4Usz6MBL+2KMAgPk/P0o9c1HqnYtwzVH6GTIqug==", "dev": true, - "license": "MIT", "dependencies": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.8.0", + "eslint-visitor-keys": "^3.0.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", @@ -4835,8 +4858,9 @@ }, "node_modules/acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -5056,8 +5080,9 @@ }, "node_modules/array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -7326,8 +7351,9 @@ }, "node_modules/dir-glob": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, - "license": "MIT", "dependencies": { "path-type": "^4.0.0" }, @@ -7667,36 +7693,36 @@ } }, "node_modules/eslint": { - "version": "7.32.0", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.5.0.tgz", + "integrity": "sha512-tVGSkgNbOfiHyVte8bCM8OmX+xG9PzVG/B4UCF60zx7j61WIVY/AqJECDgpLD4DbbESD0e174gOg3ZlrX15GDg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "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.1", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -7704,11 +7730,10 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -7716,7 +7741,7 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -8026,8 +8051,9 @@ }, "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, - "license": "MIT", "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -8041,14 +8067,24 @@ "eslint": ">=5" } }, - "node_modules/eslint-visitor-keys": { + "node_modules/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, - "license": "Apache-2.0", "engines": { "node": ">=10" } }, + "node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/eslint-webpack-plugin": { "version": "2.5.4", "dev": true, @@ -8090,14 +8126,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/eslint/node_modules/@babel/code-frame": { - "version": "7.12.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "dev": true, @@ -8112,6 +8140,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/eslint/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "dev": true, @@ -8138,26 +8172,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-utils": { - "version": "2.1.0", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, - "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/eslint/node_modules/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "1.3.0", + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "Apache-2.0", + "dependencies": { + "is-glob": "^4.0.3" + }, "engines": { - "node": ">=4" + "node": ">=10.13.0" } }, "node_modules/eslint/node_modules/globals": { @@ -8190,6 +8227,18 @@ "node": ">= 4" } }, + "node_modules/eslint/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/eslint/node_modules/optionator": { "version": "0.9.1", "dev": true, @@ -8231,36 +8280,30 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/espree": { - "version": "7.3.1", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", "dev": true, - "license": "BSD-2-Clause", "dependencies": { - "acorn": "^7.4.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.1.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "1.3.0", + "node_modules/espree/node_modules/acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true, - "license": "Apache-2.0", + "bin": { + "acorn": "bin/acorn" + }, "engines": { - "node": ">=4" + "node": ">=0.4.0" } }, "node_modules/esprima": { @@ -8527,8 +8570,9 @@ }, "node_modules/fast-glob": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, - "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -8552,8 +8596,9 @@ }, "node_modules/fastq": { "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, - "license": "ISC", "dependencies": { "reusify": "^1.0.4" } @@ -9109,8 +9154,9 @@ }, "node_modules/globby": { "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, - "license": "MIT", "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -9468,9 +9514,10 @@ } }, "node_modules/ignore": { - "version": "5.1.8", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true, - "license": "MIT", "engines": { "node": ">= 4" } @@ -13290,11 +13337,6 @@ "version": "4.17.21", "license": "MIT" }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.debounce": { "version": "4.0.8", "license": "MIT" @@ -13343,11 +13385,6 @@ "version": "4.1.1", "license": "MIT" }, - "node_modules/lodash.truncate": { - "version": "4.4.2", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.uniq": { "version": "4.5.0", "dev": true, @@ -13564,8 +13601,9 @@ }, "node_modules/merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "license": "MIT", "engines": { "node": ">= 8" } @@ -15338,6 +15376,8 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { @@ -15352,8 +15392,7 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/raf": { "version": "3.4.1", @@ -15862,14 +15901,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/requires-port": { "version": "1.0.0", "dev": true, @@ -15951,8 +15982,9 @@ }, "node_modules/reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, - "license": "MIT", "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -15982,6 +16014,8 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { @@ -15997,7 +16031,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "dependencies": { "queue-microtask": "^1.2.2" } @@ -16488,8 +16521,9 @@ }, "node_modules/strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" }, @@ -16626,72 +16660,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "node_modules/table": { - "version": "6.7.2", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.6.3", - "dev": true, - "license": "MIT", - "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/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/table/node_modules/json-schema-traverse": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/table/node_modules/slice-ansi": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "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/tapable": { "version": "1.1.3", "dev": true, @@ -17030,8 +16998,9 @@ }, "node_modules/tsutils": { "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, - "license": "MIT", "dependencies": { "tslib": "^1.8.1" }, @@ -17044,8 +17013,9 @@ }, "node_modules/tsutils/node_modules/tslib": { "version": "1.14.1", - "dev": true, - "license": "0BSD" + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, "node_modules/tunnel-agent": { "version": "0.6.0", @@ -17083,6 +17053,18 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "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": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "dev": true, @@ -17092,9 +17074,10 @@ } }, "node_modules/typescript": { - "version": "4.4.4", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", "dev": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17386,17 +17369,6 @@ "node": ">=8" } }, - "node_modules/update-notifier/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/uri-js": { "version": "4.4.1", "dev": true, @@ -19185,22 +19157,32 @@ } }, "@eslint/eslintrc": { - "version": "0.4.3", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "globals": { - "version": "13.11.0", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -19208,11 +19190,18 @@ }, "ignore": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "type-fest": { - "version": "0.20.2", - "dev": true + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } } } }, @@ -19267,16 +19256,20 @@ "requires": {} }, "@humanwhocodes/config-array": { - "version": "0.5.0", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.4" } }, "@humanwhocodes/object-schema": { - "version": "1.2.0", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -20428,6 +20421,8 @@ }, "@nodelib/fs.scandir": { "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { "@nodelib/fs.stat": "2.0.5", @@ -20436,10 +20431,14 @@ }, "@nodelib/fs.stat": { "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, "@nodelib/fs.walk": { "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", @@ -20993,15 +20992,17 @@ "version": "0.8.3" }, "@typescript-eslint/eslint-plugin": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.8.0.tgz", + "integrity": "sha512-spu1UW7QuBn0nJ6+psnfCc3iVoQAifjKORgBngKOmC8U/1tbe2YJMzYQqDGYB4JCss7L8+RM2kKLb1B1Aw9BNA==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.33.0", - "@typescript-eslint/scope-manager": "4.33.0", - "debug": "^4.3.1", + "@typescript-eslint/experimental-utils": "5.8.0", + "@typescript-eslint/scope-manager": "5.8.0", + "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.3.5", "tsutils": "^3.21.0" }, @@ -21016,54 +21017,66 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.8.0.tgz", + "integrity": "sha512-KN5FvNH71bhZ8fKtL+lhW7bjm7cxs1nt+hrDZWIqb6ViCffQcWyLunGrgvISgkRojIDcXIsH+xlFfI4RCDA0xA==", "dev": true, "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.8.0", + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/typescript-estree": "5.8.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/parser": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.8.0.tgz", + "integrity": "sha512-Gleacp/ZhRtJRYs5/T8KQR3pAQjQI89Dn/k+OzyCKOsLiZH2/Vh60cFBTnFsHNI6WAD+lNUo/xGZ4NeA5u0Ipw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.33.0", - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/typescript-estree": "4.33.0", - "debug": "^4.3.1" + "@typescript-eslint/scope-manager": "5.8.0", + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/typescript-estree": "5.8.0", + "debug": "^4.3.2" } }, "@typescript-eslint/scope-manager": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.8.0.tgz", + "integrity": "sha512-x82CYJsLOjPCDuFFEbS6e7K1QEWj7u5Wk1alw8A+gnJiYwNnDJk0ib6PCegbaPMjrfBvFKa7SxE3EOnnIQz2Gg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0" + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/visitor-keys": "5.8.0" } }, "@typescript-eslint/types": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.8.0.tgz", + "integrity": "sha512-LdCYOqeqZWqCMOmwFnum6YfW9F3nKuxJiR84CdIRN5nfHJ7gyvGpXWqL/AaW0k3Po0+wm93ARAsOdzlZDPCcXg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.8.0.tgz", + "integrity": "sha512-srfeZ3URdEcUsSLbkOFqS7WoxOqn8JNil2NSLO9O+I2/Uyc85+UlfpEvQHIpj5dVts7KKOZnftoJD/Fdv0L7nQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "@typescript-eslint/visitor-keys": "4.33.0", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", + "@typescript-eslint/types": "5.8.0", + "@typescript-eslint/visitor-keys": "5.8.0", + "debug": "^4.3.2", + "globby": "^11.0.4", + "is-glob": "^4.0.3", "semver": "^7.3.5", "tsutils": "^3.21.0" }, "dependencies": { "semver": { "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" @@ -21072,11 +21085,13 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.33.0", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.8.0.tgz", + "integrity": "sha512-+HDIGOEMnqbxdAHegxvnOqESUH6RWFRR2b8qxP1W9CZnnYh4Usz6MBL+2KMAgPk/P0o9c1HqnYtwzVH6GTIqug==", "dev": true, "requires": { - "@typescript-eslint/types": "4.33.0", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "5.8.0", + "eslint-visitor-keys": "^3.0.0" } }, "@webassemblyjs/ast": { @@ -21256,6 +21271,8 @@ }, "acorn-jsx": { "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, @@ -21397,6 +21414,8 @@ }, "array-union": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, "array-uniq": { @@ -22963,6 +22982,8 @@ }, "dir-glob": { "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "requires": { "path-type": "^4.0.0" @@ -23196,35 +23217,36 @@ } }, "eslint": { - "version": "7.32.0", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.5.0.tgz", + "integrity": "sha512-tVGSkgNbOfiHyVte8bCM8OmX+xG9PzVG/B4UCF60zx7j61WIVY/AqJECDgpLD4DbbESD0e174gOg3ZlrX15GDg==", "dev": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "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.1", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -23232,22 +23254,14 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, "ansi-styles": { "version": "4.3.0", "dev": true, @@ -23255,6 +23269,12 @@ "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "chalk": { "version": "4.1.2", "dev": true, @@ -23267,17 +23287,23 @@ "version": "4.0.0", "dev": true }, - "eslint-utils": { - "version": "2.1.0", + "eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "dev": true - } + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" } }, "globals": { @@ -23295,6 +23321,15 @@ "version": "4.0.6", "dev": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "optionator": { "version": "0.9.1", "dev": true, @@ -23320,10 +23355,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.20.2", - "dev": true } } }, @@ -23548,13 +23579,25 @@ }, "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" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "2.1.0", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true }, "eslint-webpack-plugin": { @@ -23581,16 +23624,20 @@ } }, "espree": { - "version": "7.3.1", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", "dev": true, "requires": { - "acorn": "^7.4.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.1.0" }, "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", + "acorn": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true } } @@ -23771,6 +23818,8 @@ }, "fast-glob": { "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", @@ -23790,6 +23839,8 @@ }, "fastq": { "version": "1.13.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", + "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", "dev": true, "requires": { "reusify": "^1.0.4" @@ -24148,6 +24199,8 @@ }, "globby": { "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "dev": true, "requires": { "array-union": "^2.1.0", @@ -24384,7 +24437,9 @@ "requires": {} }, "ignore": { - "version": "5.1.8", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true }, "ignore-by-default": { @@ -27185,10 +27240,6 @@ "lodash-es": { "version": "4.17.21" }, - "lodash.clonedeep": { - "version": "4.5.0", - "dev": true - }, "lodash.debounce": { "version": "4.0.8" }, @@ -27228,10 +27279,6 @@ "lodash.throttle": { "version": "4.1.1" }, - "lodash.truncate": { - "version": "4.4.2", - "dev": true - }, "lodash.uniq": { "version": "4.5.0", "dev": true @@ -27369,6 +27416,8 @@ }, "merge2": { "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true }, "micromatch": { @@ -28512,6 +28561,8 @@ }, "queue-microtask": { "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, "raf": { @@ -28871,10 +28922,6 @@ "version": "2.1.1", "dev": true }, - "require-from-string": { - "version": "2.0.2", - "dev": true - }, "requires-port": { "version": "1.0.0", "dev": true @@ -28934,6 +28981,8 @@ }, "reusify": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, "rgbcolor": { @@ -28949,6 +28998,8 @@ }, "run-parallel": { "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "requires": { "queue-microtask": "^1.2.2" @@ -29280,6 +29331,8 @@ }, "strip-json-comments": { "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, "style-loader": { @@ -29371,50 +29424,6 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "table": { - "version": "6.7.2", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ajv": { - "version": "8.6.3", - "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" - } - }, - "ansi-styles": { - "version": "4.3.0", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "json-schema-traverse": { - "version": "1.0.0", - "dev": true - }, - "slice-ansi": { - "version": "4.0.0", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - } - } - } - }, "tapable": { "version": "1.1.3", "dev": true @@ -29638,6 +29647,8 @@ }, "tsutils": { "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -29645,6 +29656,8 @@ "dependencies": { "tslib": { "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } @@ -29673,6 +29686,12 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-fest": { + "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 + }, "typedarray-to-buffer": { "version": "3.1.5", "dev": true, @@ -29681,7 +29700,9 @@ } }, "typescript": { - "version": "4.4.4", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.4.tgz", + "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", "dev": true }, "uglify-js": { @@ -29860,10 +29881,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "type-fest": { - "version": "0.20.2", - "dev": true } } }, diff --git a/client/package.json b/client/package.json index 5359c6811d..f4640fcbec 100644 --- a/client/package.json +++ b/client/package.json @@ -115,8 +115,8 @@ "@types/react-router": "^5.1.14", "@types/react-router-dom": "^5.1.8", "@types/react-virtualized": "^9.21.11", - "@typescript-eslint/eslint-plugin": "^4.30", - "@typescript-eslint/parser": "^4.30", + "@typescript-eslint/eslint-plugin": "^5.8", + "@typescript-eslint/parser": "^5.8", "axe-core": "^4.3.1", "babel-loader": "^8.1.0", "bundle-stats-webpack-plugin": "^3.2.0", @@ -126,10 +126,10 @@ "css-modules-typescript-loader": "^4.0.1", "cypress": "^8.5.0", "cypress-axe": "^0.13", - "eslint": "^7.12.1", + "eslint": "^8.5.0", "eslint-import-resolver-typescript": "^2.4.0", "eslint-plugin-cypress": "^2.11.2", - "eslint-plugin-import": "^2.22.1", + "eslint-plugin-import": "^2.25.0", "eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-react": "^7.21.5", "eslint-plugin-react-hooks": "^4.2.0", @@ -153,7 +153,7 @@ "sass-loader": "^12.0.0", "script-loader": "^0.7.0", "style-loader": "^3.3.0", - "typescript": "^4.4", + "typescript": "^4.5", "webpack": "^5.9.0", "webpack-retry-chunk-load-plugin": "^2.2.0" }, diff --git a/client/src/EstimatesComparison/scheme.js b/client/src/EstimatesComparison/scheme.js index 16c9f0c6fa..5a68cf6aed 100644 --- a/client/src/EstimatesComparison/scheme.js +++ b/client/src/EstimatesComparison/scheme.js @@ -54,7 +54,7 @@ const central_vote_footnotes = [ [40, _.constant(biv_footnote)], ]; -function get_footnotes_for_votestat_item({ desc, org_id, votenum }) { +function get_footnotes_for_votestat_item({ org_id, votenum }) { if (+org_id === 326) { const central_vote_footnote = _.find( central_vote_footnotes, diff --git a/client/src/FormFrontend/FormFrontend.js b/client/src/FormFrontend/FormFrontend.js index a77377de22..55de6797af 100644 --- a/client/src/FormFrontend/FormFrontend.js +++ b/client/src/FormFrontend/FormFrontend.js @@ -182,7 +182,7 @@ class FormFrontend extends React.Component { const all_connected_user_fields_are_filled = _.chain(user_fields) .toPairs() .filter( - ([field_name, field_val]) => + ([_field_name, field_val]) => _.includes(_.keys(field_val), "connection") && _.includes(_.keys(completed_template), field_val.connection.name) && _.includes( @@ -191,7 +191,7 @@ class FormFrontend extends React.Component { ) ) .every( - ([field_name, field_val]) => !_.isEmpty(completed_template[field_name]) + ([field_name, _field_val]) => !_.isEmpty(completed_template[field_name]) ) .value(); diff --git a/client/src/FormFrontend/FormFrontend.stories.js b/client/src/FormFrontend/FormFrontend.stories.js deleted file mode 100644 index e66e7b72f0..0000000000 --- a/client/src/FormFrontend/FormFrontend.stories.js +++ /dev/null @@ -1,175 +0,0 @@ -import fetchMock from "fetch-mock"; -import React, { useEffect } from "react"; - -import { form_backend_url } from "./form_backend_utils"; - -import { FormFrontend } from "./FormFrontend"; - -export default { - title: "FormFrontend", - component: FormFrontend, -}; - -const FormFrontendTemplate = ({ - return_error_on_get, - return_error_on_post, - example_template, - props, -}) => { - // small leak here, both form_backend_utils and here know about the specific form backend endpoints - fetchMock.get( - `${form_backend_url}/form_template?template_name=${props.template_name}`, - () => { - if (return_error_on_get) { - throw new Error( - "Some sort of error occured (client side OR server side)" - ); - } else { - return example_template; - } - }, - { - overwriteRoutes: true, - } - ); - - fetchMock.post( - `${form_backend_url}/submit_form`, - () => { - if (return_error_on_post) { - throw new Error( - "Some sort of error occured (client side OR server side)" - ); - } else { - return { status: "200" }; - } - }, - { - overwriteRoutes: true, - } - ); - - useEffect(() => { - return () => fetchMock.reset(); - }); - - return ( - { - console.log("Submitted"); - }} - key={JSON.stringify(example_template)} // need to force component re-mount on template value changes for story controls to work - /> - ); -}; - -export const ExampleTemplate = FormFrontendTemplate.bind({}); -ExampleTemplate.args = { - return_error_on_get: false, - return_error_on_post: false, - example_template: { - meta: { - subject_template: "Example template", - }, - checkbox_enum: { - required: true, - value_type: "enums", - enum_values: { - a: { - en: "a", - fr: "a (fr)", - }, - b: { - en: "b", - fr: "b (fr)", - }, - c: { - en: "c", - fr: "c (fr)", - }, - }, - form_type: "checkbox", - form_label: { - en: "Checkbox enum example, required:", - fr: "Checkbox enum example, required (fr):", - }, - }, - radio_enum: { - required: false, - value_type: "enums", - enum_values: { - a: { - en: "a", - fr: "a (fr)", - }, - b: { - en: "b", - fr: "b (fr)", - }, - c: { - en: "c", - fr: "c (fr)", - }, - }, - form_type: "radio", - form_label: { - en: "Radio enum example, optional:", - fr: "Radio enum example, optional (fr):", - }, - }, - - text: { - required: false, - value_type: "string", - form_type: "textarea", - form_label: { - en: "Standalone text example, optional:", - fr: "Standalone text example, optional (fr):", - }, - }, - - radio_enum_with_connected_text: { - required: false, - value_type: "enums", - enum_values: { - yes: { - en: "Yes, requires below text", - fr: "Yes, requires below text (fr)", - }, - no: { - en: "No, disables below text", - fr: "No, disables below text (fr)", - }, - }, - form_type: "radio", - form_label: { - en: "Radio with connected text example, optional:", - fr: "Radio with connected text example, optional (fr):", - }, - }, - connected_text: { - required: false, - value_type: "string", - form_type: "textarea", - form_label: { - en: "If yes, required text input. If no, disabled:", - fr: "If yes, required text input. If no, disabled (fr):", - }, - connection: { - name: "radio_enum_with_connected_text", - enable: "yes", - }, - }, - - optional_automatic: { - required: false, - value_type: "string", - form_type: false, - }, - }, - props: { - include_privacy: true, - template_name: "example_template", - }, -}; diff --git a/client/src/IgocExplorer/explorer_view.js b/client/src/IgocExplorer/explorer_view.js index cc33a240e5..97afee3c37 100644 --- a/client/src/IgocExplorer/explorer_view.js +++ b/client/src/IgocExplorer/explorer_view.js @@ -32,7 +32,7 @@ function get_org_count(node) { } } -const SubjectFields = ({ subject, grouping }) => ( +const SubjectFields = ({ subject }) => (
{subject.applied_title && ( diff --git a/client/src/InfoBase/root.js b/client/src/InfoBase/root.js index 267273b41a..5b9b6943c1 100644 --- a/client/src/InfoBase/root.js +++ b/client/src/InfoBase/root.js @@ -27,6 +27,6 @@ Promise.all([ import("./core_polyfills.side-effects"), import("./dynamic_polyfills"), ]) - .then(([_, { dynamic_polyfills }]) => dynamic_polyfills()) + .then(([_x, { dynamic_polyfills }]) => dynamic_polyfills()) .then(() => Promise.all([import("./bootstrapper"), import("./App")])) .then(([{ bootstrapper }, { App }]) => bootstrapper(App, stop_spinner)); diff --git a/client/src/TreeMap/TreeMapViz.js b/client/src/TreeMap/TreeMapViz.js index ae93cac4bf..c7e70cc185 100644 --- a/client/src/TreeMap/TreeMapViz.js +++ b/client/src/TreeMap/TreeMapViz.js @@ -36,7 +36,7 @@ export class TreeMap extends React.Component { this.setState({ org_route: [...this.props.org_route] }); this._update(); } - shouldComponentUpdate(nextProps, nextState) { + shouldComponentUpdate(nextProps) { if ( this.props.perspective !== nextProps.perspective || this.props.year !== nextProps.year || @@ -291,7 +291,7 @@ export class TreeMap extends React.Component { ) ) .attr("tabindex", "0") - .on("mouseenter focus", function (d) { + .on("mouseenter focus", function () { select(this).selectAll(".TM_TooltipContainer").remove(); setTimeout(() => { selectAll(".TM_TooltipContainer").remove(); @@ -303,7 +303,7 @@ export class TreeMap extends React.Component { tool.call(tooltip_render, year); }, 300); }) - .on("mouseleave", function (d) { + .on("mouseleave", function () { select(this).selectAll(".TM_TooltipContainer").remove(); }) .call(treemap_node_content_container); diff --git a/client/src/charts/canada/CanadaD3Component.js b/client/src/charts/canada/CanadaD3Component.js index d9d4f2e54f..3e7355cb10 100644 --- a/client/src/charts/canada/CanadaD3Component.js +++ b/client/src/charts/canada/CanadaD3Component.js @@ -224,7 +224,7 @@ export class CanadaD3Component { svg .selectAll(".province") - .each(function (d) { + .each(function (_d) { var that = select(this); var prov_key = that.attr("id").split("-")[1]; select(this).datum(prov_key); @@ -266,7 +266,7 @@ export class CanadaD3Component { .on("focus", dispatch_mouseEnter) .on("mouseleave", dispatch_mouseLeave) .on("blur", dispatch_mouseLeave) - .each(function (prov_key, i) { + .each(function (prov_key) { const label = svg.selectAll("g.label").filter(function () { return select(this).attr("id") === `ca-${prov_key}--label`; }); @@ -297,7 +297,7 @@ export class CanadaD3Component { .attr("class", "label-value") .style("margin-bottom", "0px"); }); - html.selectAll("p.label-value").each(function (prov_key, i) { + html.selectAll("p.label-value").each(function (prov_key) { select(this).html(formatter(selected_year_data[prov_key] || 0)); }); diff --git a/client/src/charts/canada/canada.js b/client/src/charts/canada/canada.js index 19c327c06b..7f795c72d0 100644 --- a/client/src/charts/canada/canada.js +++ b/client/src/charts/canada/canada.js @@ -66,7 +66,7 @@ class CanadaGraphBarLegend extends React.Component { {`${d.data.year}: ${formatter(d.formattedValue)}`} )} - colors={(d) => get_graph_color(0.5)} + colors={(_d) => get_graph_color(0.5)} margin={{ top: 40, right: 30, diff --git a/client/src/charts/legends/LegendList.tsx b/client/src/charts/legends/LegendList.tsx index 63b4aa0844..0282e78e02 100644 --- a/client/src/charts/legends/LegendList.tsx +++ b/client/src/charts/legends/LegendList.tsx @@ -6,7 +6,7 @@ import { CheckBox } from "src/components/CheckBox/CheckBox"; import { is_a11y_mode } from "src/core/injected_build_constants"; -import { ComponentProps } from "src/types/util_types.d"; +import type { ComponentProps } from "src/types/util_types.d"; import type { LegendItemType } from "./LegendItemType"; diff --git a/client/src/charts/legends/StandardLegend.tsx b/client/src/charts/legends/StandardLegend.tsx index 30766a094a..0b01692b27 100644 --- a/client/src/charts/legends/StandardLegend.tsx +++ b/client/src/charts/legends/StandardLegend.tsx @@ -2,7 +2,8 @@ import React from "react"; import { LegendContainer } from "./LegendContainer"; -import { LegendList, LegendListProps } from "./LegendList"; +import type { LegendListProps } from "./LegendList"; +import { LegendList } from "./LegendList"; import "./StandardLegend.scss"; diff --git a/client/src/charts/legends/TabularLegend.tsx b/client/src/charts/legends/TabularLegend.tsx index 3c0be30bf1..e3cab89189 100644 --- a/client/src/charts/legends/TabularLegend.tsx +++ b/client/src/charts/legends/TabularLegend.tsx @@ -3,7 +3,7 @@ import React from "react"; import { CheckBox } from "src/components/index"; -import { StaticLegendItemType } from "./LegendItemType"; +import type { StaticLegendItemType } from "./LegendItemType"; import "./TabularLegend.scss"; interface TabularLegendProps { diff --git a/client/src/charts/wrapped_nivo/NivoLineBarToggle/NivoLineBarToggle.stories.js b/client/src/charts/wrapped_nivo/NivoLineBarToggle/NivoLineBarToggle.stories.js deleted file mode 100644 index ef63b80943..0000000000 --- a/client/src/charts/wrapped_nivo/NivoLineBarToggle/NivoLineBarToggle.stories.js +++ /dev/null @@ -1,53 +0,0 @@ -import { scaleOrdinal } from "d3-scale"; -import React from "react"; - -import { newIBCategoryColors } from "src/core/color_schemes"; - -import { infobase_colors_smart } from "src/charts/wrapped_nivo/wrapped_nivo_common"; - -import { NivoLineBarToggle } from "./NivoLineBarToggle"; - -export default { - title: "charts/NivoLineBarToggle", - component: NivoLineBarToggle, -}; - -const Template = (args) => ; - -export const Basic = Template.bind({}); -Basic.args = { - legend_title: "Legend Title", - bar: true, - graph_options: { - ticks: ["Year 1", "Year 2", "Year 3", "Year 4", "Year 5"], - y_axis: "y-axis", - }, - get_colors: () => - infobase_colors_smart(scaleOrdinal().range(newIBCategoryColors)), - initial_graph_mode: "bar_grouped", - data: [ - { - active: true, - data: [1001, 2003, 1998, 347, 800], - label: "Group 1", - }, - { - active: true, - data: [609, 343, 888, 2456, 2232], - label: "Group 2", - }, - { - active: true, - data: [2000, 3000, 3333, 778, 1500], - label: "Group 3", - }, - { - active: true, - data: [900, 877, 2009, 2700, 777], - label: "Group 4", - }, - ], - disable_toggle: false, - legend_col_full_size: 4, - graph_col_full_size: 8, -}; diff --git a/client/src/charts/wrapped_nivo/WrappedNivoBar/WrappedNivoBar.stories.js b/client/src/charts/wrapped_nivo/WrappedNivoBar/WrappedNivoBar.stories.js deleted file mode 100644 index 34704cc7c0..0000000000 --- a/client/src/charts/wrapped_nivo/WrappedNivoBar/WrappedNivoBar.stories.js +++ /dev/null @@ -1,59 +0,0 @@ -import _ from "lodash"; -import React from "react"; - -import { newIBCategoryColors } from "src/core/color_schemes"; - -import { - WrappedNivoBar, - WrappedNivoHBar, -} from "src/charts/wrapped_nivo/WrappedNivoBar/wrapped_nivo_bar"; - -export default { - title: "charts/WrappedNivoBar", - component: WrappedNivoBar, -}; - -const Template = (args) => ; -const HTemplate = (args) => ; - -const graph_data = [ - { - "Group 1": 1997, - "Group 2": 3407, - index_key: "Year 1", - }, - { - "Group 1": 1098, - "Group 2": 4004, - index_key: "Year 2", - }, - { - "Group 1": 3677, - "Group 2": 2050, - index_key: "Year 3", - }, -]; - -const graph_keys = _.chain(graph_data).first().omit("index_key").keys().value(); - -const [blue, teal] = newIBCategoryColors; - -const common_args = { - data: graph_data, - keys: graph_keys, - indexBy: "index_key", - colors: [blue, teal], - is_money: false, - remove_left_axis: false, - remove_bottom_axis: false, - enableLabel: false, - enableGridX: true, - enableGridY: true, - disable_table_view: false, -}; - -export const NivoBar = Template.bind({}); -NivoBar.args = common_args; - -export const NivoHBar = HTemplate.bind({}); -NivoHBar.args = common_args; diff --git a/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.js b/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.js index 22fd0b9c2f..b66fc34c17 100644 --- a/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.js +++ b/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.js @@ -120,7 +120,7 @@ export class WrappedNivoLine extends React.Component { const lines_with_dashed_overlaps = ({ lineGenerator, xScale, yScale }) => _.map( line_segments, - ({ id, data, total_overlaps, z_index, overlaps_below }, index) => { + ({ id, data, total_overlaps, overlaps_below }, index) => { const gap_between_points = xScale(data[1].x) - xScale(data[0].x); const dash_size = gap_between_points / (total_overlaps + 1) / 2; return ( diff --git a/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.stories.js b/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.stories.js deleted file mode 100644 index 38713a4c69..0000000000 --- a/client/src/charts/wrapped_nivo/WrappedNivoLine/WrappedNivoLine.stories.js +++ /dev/null @@ -1,94 +0,0 @@ -import { scaleOrdinal } from "d3-scale"; -import _ from "lodash"; -import React from "react"; - -import { newIBCategoryColors } from "src/core/color_schemes"; - -import { WrappedNivoLine } from "./WrappedNivoLine"; - -export default { - title: "charts/WrappedNivoLine", - component: WrappedNivoLine, -}; - -const Template = (args) => ; - -const graph_data_basic = [ - { - id: "Group 1", - data: [ - { x: "Year 1", y: 3247 }, - { x: "Year 2", y: 2008 }, - { x: "Year 3", y: 2278 }, - ], - }, - { - id: "Group 2", - data: [ - { x: "Year 1", y: 1487 }, - { x: "Year 2", y: 2856 }, - { x: "Year 3", y: 2728 }, - { x: "Year 4", y: 3878 }, - { x: "Year 5", y: 2769 }, - { x: "Year 6", y: 1111 }, - ], - }, -]; - -const graph_data_overlap = [ - { - id: "Group 1", - data: [ - { x: "Year 1", y: 2008 }, - { x: "Year 2", y: 1278 }, - { x: "Year 3", y: 909 }, - { x: "Year 4", y: 925 }, - ], - }, - { - id: "Group 2", - data: [ - { x: "Year 1", y: 3248 }, - { x: "Year 2", y: 1278 }, - { x: "Year 3", y: 909 }, - { x: "Year 4", y: 2998 }, - { x: "Year 5", y: 1367 }, - { x: "Year 6", y: 3432 }, - ], - }, -]; - -const raw_graph_data = (graph_data) => { - return _.chain(graph_data) - .map((row) => _.map(row.data, (point) => point.y)) - .flatten() - .value(); -}; - -const colors = scaleOrdinal().range(newIBCategoryColors); - -const common_args = { - colors: (d) => colors(d.id), - is_money: false, - remove_left_axis: false, - remove_bottom_axis: false, - enableLabel: false, - enableGridX: true, - enableGridY: true, - disable_table_view: false, -}; - -export const Basic = Template.bind({}); -export const Overlap = Template.bind({}); - -Basic.args = { - ...common_args, - data: graph_data_basic, - raw_data: raw_graph_data(graph_data_basic), -}; - -Overlap.args = { - ...common_args, - data: graph_data_overlap, - raw_data: raw_graph_data(graph_data_overlap), -}; diff --git a/client/src/charts/wrapped_nivo/WrappedNivoPie/WrappedNivoPie.stories.js b/client/src/charts/wrapped_nivo/WrappedNivoPie/WrappedNivoPie.stories.js deleted file mode 100644 index b2a9d58dbd..0000000000 --- a/client/src/charts/wrapped_nivo/WrappedNivoPie/WrappedNivoPie.stories.js +++ /dev/null @@ -1,55 +0,0 @@ -import React from "react"; - -import { newIBCategoryColors } from "src/core/color_schemes"; - -import { WrappedNivoPie } from "./WrappedNivoPie"; - -export default { - title: "charts/WrappedNivoPie", - component: WrappedNivoPie, -}; - -const graph_data = [ - { - id: "Group 1", - label: "Group 1", - value: 32432084, - }, - { - id: "Group 2", - label: "Group 2", - value: 934234, - }, - { - id: "Group 3", - label: "Group 3", - value: 5573653, - }, - { - id: "Group 4", - label: "Group 4", - value: 7436534, - }, - { - id: "Group 5", - label: "Group 5", - value: 2348634, - }, -]; - -const [blue, teal, orange, purple, light_green] = newIBCategoryColors; - -const Template = (args) => ; - -export const Basic = Template.bind({}); -Basic.args = { - data: graph_data, - colors: [blue, teal, orange, purple, light_green], - disable_table_view: false, - display_horizontal: true, - show_legend: true, - sort_legend: false, - include_percent: true, - is_money: false, - reverse_layout: false, -}; diff --git a/client/src/charts/wrapped_nivo/WrappedNivoTreemap/WrappedNivoTreemap.stories.js b/client/src/charts/wrapped_nivo/WrappedNivoTreemap/WrappedNivoTreemap.stories.js deleted file mode 100644 index a42d812cf5..0000000000 --- a/client/src/charts/wrapped_nivo/WrappedNivoTreemap/WrappedNivoTreemap.stories.js +++ /dev/null @@ -1,97 +0,0 @@ -import { scaleOrdinal } from "d3-scale"; -import _ from "lodash"; -import React from "react"; - -import { newIBLightCategoryColors } from "src/core/color_schemes"; -import { formats } from "src/core/format"; - -import { WrappedNivoTreemap } from "./WrappedNivoTreemap"; - -export default { - title: "charts/WrappedNivoTreemap", - component: WrappedNivoTreemap, -}; - -const graph_data_values = [ - 32432432, 8324234, 9456354, 5795646, 23746845, 8723476, 23435435, 324323, -]; - -const graph_data_total_amt = _.sum(graph_data_values); - -const graph_data = { - children: [ - { - desc: "Description 1", - id: 0, - total: graph_data_total_amt, - value: graph_data_values[0], - }, - { - desc: "Description 2", - id: 1, - total: graph_data_total_amt, - value: graph_data_values[1], - }, - { - desc: "Description 3", - id: 2, - total: graph_data_total_amt, - value: graph_data_values[2], - }, - { - desc: "Description 4", - id: 3, - total: graph_data_total_amt, - value: graph_data_values[3], - }, - { - desc: "Description 5", - id: 4, - total: graph_data_total_amt, - value: graph_data_values[4], - }, - { - desc: "Description 6", - id: 5, - total: graph_data_total_amt, - value: graph_data_values[5], - }, - { - desc: "Description 7", - id: 6, - total: graph_data_total_amt, - value: graph_data_values[6], - }, - { - desc: "Description 8", - id: 7, - total: graph_data_total_amt, - value: graph_data_values[7], - }, - ], - color: "white", - name: "root", -}; - -const sorted_children = _.chain(graph_data.children) - .sortBy(graph_data.children, (child) => child.value) - .reverse() - .value(); - -const domain = _.map(sorted_children, (child) => child.value); - -const scale = scaleOrdinal().domain(domain).range(newIBLightCategoryColors); - -const color_scale = (data) => { - return scale(data.value); -}; - -const Template = (args) => ; - -export const Basic = Template.bind({}); -Basic.args = { - data: graph_data, - colorScale: color_scale, - formatter: formats.compact1, - label_id: "desc", -}; diff --git a/client/src/components/AutoHeightVirtualList.tsx b/client/src/components/AutoHeightVirtualList.tsx index 39b5214f8f..c5c9f6cd08 100644 --- a/client/src/components/AutoHeightVirtualList.tsx +++ b/client/src/components/AutoHeightVirtualList.tsx @@ -2,7 +2,7 @@ import React from "react"; import { List } from "react-virtualized"; import type { ListProps } from "react-virtualized"; -import { SafeOmit } from "src/types/util_types.d"; +import type { SafeOmit } from "src/types/util_types.d"; interface AutoHeightVirtualListProps extends SafeOmit { /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ diff --git a/client/src/components/DisplayTable/DisplayTable.tsx b/client/src/components/DisplayTable/DisplayTable.tsx index 6d880757e7..de15742afb 100644 --- a/client/src/components/DisplayTable/DisplayTable.tsx +++ b/client/src/components/DisplayTable/DisplayTable.tsx @@ -11,7 +11,7 @@ import { } from "src/components/misc_util_components"; import { SortDirections } from "src/components/SortDirection/SortDirection"; -import { FormatKey } from "src/core/format"; +import type { FormatKey } from "src/core/format"; import { LegendList } from "src/charts/legends/LegendList"; @@ -96,8 +96,8 @@ const get_column_config_defaults = (index: number) => ({ plain_b: CellValue, descending: boolean, // available for any special cases that need access to the actual cell value, not the "plain" version usually used be sorting - cell_value_a: CellValue, // eslint-disable-line @typescript-eslint/no-unused-vars-experimental - cell_value_b: CellValue // eslint-disable-line @typescript-eslint/no-unused-vars-experimental + _cell_value_a: CellValue, + _cell_value_b: CellValue ): 1 | 0 | -1 => smart_sort_func(plain_a, plain_b, descending), }); type ColumnConfig = Partial> & { diff --git a/client/src/components/DropdownMenu/DropdownMenu.tsx b/client/src/components/DropdownMenu/DropdownMenu.tsx index ce2394fce9..dd4045648a 100644 --- a/client/src/components/DropdownMenu/DropdownMenu.tsx +++ b/client/src/components/DropdownMenu/DropdownMenu.tsx @@ -1,6 +1,7 @@ import classNames from "classnames"; import _ from "lodash"; -import React, { BaseSyntheticEvent } from "react"; +import type { BaseSyntheticEvent } from "react"; +import React from "react"; import { trivial_text_maker } from "src/models/text"; diff --git a/client/src/components/PageDetails.tsx b/client/src/components/PageDetails.tsx index 23593fbfea..a0ae7b0798 100644 --- a/client/src/components/PageDetails.tsx +++ b/client/src/components/PageDetails.tsx @@ -1,6 +1,7 @@ import _ from "lodash"; import React from "react"; -import { withRouter, RouteComponentProps } from "react-router"; +import type { RouteComponentProps } from "react-router"; +import { withRouter } from "react-router"; import { create_text_maker } from "src/models/text"; diff --git a/client/src/components/PinnedFAQ/PinnedFAQ.js b/client/src/components/PinnedFAQ/PinnedFAQ.js index c9b8ac909a..ab5a2729a0 100644 --- a/client/src/components/PinnedFAQ/PinnedFAQ.js +++ b/client/src/components/PinnedFAQ/PinnedFAQ.js @@ -31,38 +31,36 @@ export class PinnedFAQ extends React.Component { return ( - {(matches) => ( - -
- - +
+ + +
-
- [ - , - , - ] - )} - /> -
- - -
- - )} + [ + , + , + ] + )} + /> +
+
+
+
+
); } diff --git a/client/src/components/ShareButton/ShareButton.tsx b/client/src/components/ShareButton/ShareButton.tsx index 219f1814bd..f57430c529 100644 --- a/client/src/components/ShareButton/ShareButton.tsx +++ b/client/src/components/ShareButton/ShareButton.tsx @@ -1,4 +1,3 @@ -import _ from "lodash"; import React, { Fragment } from "react"; import { StatelessModal } from "src/components/modals_and_popovers/index"; diff --git a/client/src/components/TabLoadingWrapper/TabContent.js b/client/src/components/TabLoadingWrapper/TabContent.js deleted file mode 100644 index 6d5bbe032c..0000000000 --- a/client/src/components/TabLoadingWrapper/TabContent.js +++ /dev/null @@ -1,7 +0,0 @@ -import React from "react"; - -const TabContent = ({ args, data }) => { - return
{data}
; -}; - -export { TabContent }; diff --git a/client/src/components/Typeahead/Typeahead.tsx b/client/src/components/Typeahead/Typeahead.tsx index ce9ebb8b29..dcf2a50f72 100644 --- a/client/src/components/Typeahead/Typeahead.tsx +++ b/client/src/components/Typeahead/Typeahead.tsx @@ -1,19 +1,11 @@ import classNames from "classnames"; import _ from "lodash"; -import React, { - ChangeEvent, - KeyboardEvent, - Fragment, - ReactElement, -} from "react"; +import type { ChangeEvent, KeyboardEvent, ReactElement } from "react"; +import React, { Fragment } from "react"; import ReactResizeDetector from "react-resize-detector/build/withPolyfill"; -import { - AutoSizer, - CellMeasurer, - CellMeasurerCache, - List, -} from "react-virtualized"; +import type { List } from "react-virtualized"; +import { AutoSizer, CellMeasurer, CellMeasurerCache } from "react-virtualized"; import { AutoHeightVirtualList } from "src/components/AutoHeightVirtualList"; import { LeafSpinner } from "src/components/LeafSpinner/LeafSpinner"; diff --git a/client/src/components/Typeahead/TypeaheadA11yStatus.tsx b/client/src/components/Typeahead/TypeaheadA11yStatus.tsx index 80c407d127..bfa223839c 100644 --- a/client/src/components/Typeahead/TypeaheadA11yStatus.tsx +++ b/client/src/components/Typeahead/TypeaheadA11yStatus.tsx @@ -1,9 +1,10 @@ import _ from "lodash"; -import React, { ReactNode } from "react"; +import type { ReactNode } from "react"; +import React from "react"; import { create_text_maker } from "src/models/text"; -import { ResultProps } from "./Typeahead"; +import type { ResultProps } from "./Typeahead"; import text from "./Typeahead.yaml"; diff --git a/client/src/components/modals_and_popovers/ModalButton.tsx b/client/src/components/modals_and_popovers/ModalButton.tsx index 16326b9167..b067353bc3 100644 --- a/client/src/components/modals_and_popovers/ModalButton.tsx +++ b/client/src/components/modals_and_popovers/ModalButton.tsx @@ -1,6 +1,7 @@ import React, { Fragment } from "react"; -import { withRouter, RouteComponentProps } from "react-router-dom"; +import type { RouteComponentProps } from "react-router-dom"; +import { withRouter } from "react-router-dom"; import { SafeJSURL } from "src/general_utils"; diff --git a/client/src/core/NavComponents.js b/client/src/core/NavComponents.js index 7dcf08ba40..0f73328f8c 100644 --- a/client/src/core/NavComponents.js +++ b/client/src/core/NavComponents.js @@ -150,7 +150,7 @@ const HeaderBanner = withRouter( ); const TemporaryPublicAccountsBanner = () => { - const route_filter = (match, history) => + const route_filter = (match, _history) => /^\/(start|tag-explorer|treemap|rpb)/.test(match.path); const late_orgs = diff --git a/client/src/core/TableClass.js b/client/src/core/TableClass.js index 8c40856958..197d02e164 100644 --- a/client/src/core/TableClass.js +++ b/client/src/core/TableClass.js @@ -587,7 +587,7 @@ export class Table { row_obj[key] = 0; } }); - _.toPairs(row_obj).forEach(([key, val]) => { + _.toPairs(row_obj).forEach(([key, _val]) => { const col = this.col_from_nick(key); if (col.formula && _.isUndefined(col.formula.default)) { row_obj[key] = col.formula(row_obj); diff --git a/client/src/core/reactAdapter.ts b/client/src/core/reactAdapter.ts index 94c5352fd6..1389e260a7 100644 --- a/client/src/core/reactAdapter.ts +++ b/client/src/core/reactAdapter.ts @@ -1,5 +1,5 @@ import _ from "lodash"; -import React from "react"; +import type React from "react"; import ReactDOM from "react-dom"; class ReactContentRenderer { diff --git a/client/src/core/tables/queries.js b/client/src/core/tables/queries.js index f37e887085..328f9cc936 100644 --- a/client/src/core/tables/queries.js +++ b/client/src/core/tables/queries.js @@ -177,7 +177,7 @@ class Queries { return x + y; }) .value() + 1; - _.each(vals[gross_percentage], function (val, i, list) { + _.each(vals[gross_percentage], function (val, i, _list) { vals[gp_colname][i] = val / sum; }); } @@ -222,28 +222,18 @@ class Queries { return all_vals; } - get_row(criteria, options = {}) { - // - // * `col` : either a string or an array of strings for several columns - // * `val` : - // * `options` : - // + get_row(criteria) { var each_mapped_obj = (obj) => _.every( - _.toPairs(criteria).map(([key, val]) => obj[key] === criteria[key]) + _.toPairs(criteria).map(([key, _val]) => obj[key] === criteria[key]) ); return _.find(this.data, each_mapped_obj); } - get_rows(criteria, options) { - // - // * `col` : either a string or an array of strings for several columns - // * `val` : - // * `options` : - // + get_rows(criteria) { var each_mapped_obj = (obj) => _.every( - _.toPairs(criteria).map(([key, val]) => { + _.toPairs(criteria).map(([key, _val]) => { if (_.isArray(criteria[key])) { return _.includes(criteria[key], obj[key]); } else { diff --git a/client/src/explorer_common/abstract_explorer_scheme.js b/client/src/explorer_common/abstract_explorer_scheme.js index dea4306bf0..b8e5ac0b5c 100644 --- a/client/src/explorer_common/abstract_explorer_scheme.js +++ b/client/src/explorer_common/abstract_explorer_scheme.js @@ -140,7 +140,7 @@ export class AbstractExplorerScheme { if (this.scheme_reducer) { return this.scheme_reducer; } - return (state = {}, action) => state; + return (state = {}, _action) => state; } get_initial_scheme_state() { //shorthand for subclasses @@ -315,7 +315,7 @@ export class AbstractExplorerScheme { get_sort_func_selector() { // override to filter based on scheme state // unlike functions passed to _.sortBy, this function takes a list and must return a new sorted list - return (state) => { + return (_state) => { return (nodes) => nodes; }; } diff --git a/client/src/explorer_common/explorer_components.js b/client/src/explorer_common/explorer_components.js index 6e3554dcfc..1f0779fc0e 100644 --- a/client/src/explorer_common/explorer_components.js +++ b/client/src/explorer_common/explorer_components.js @@ -38,7 +38,7 @@ export const ExplorerHeader = ({ return (
- {_.map(column_defs, ({ id, style, header_display }, ix) => ( + {_.map(column_defs, ({ id, header_display }, ix) => (
{ diff --git a/client/src/glossary/TooltipActivator.js b/client/src/glossary/TooltipActivator.js index 70c5c069d1..6d68e4b9ee 100644 --- a/client/src/glossary/TooltipActivator.js +++ b/client/src/glossary/TooltipActivator.js @@ -33,7 +33,7 @@ const TooltipActivator = _.isUndefined(MutationObserver) this.tooltip_instances = []; this.debounced_mutation_callback = _.debounce( - (mutationList, observer) => { + (_mutationList, _observer) => { const previous_tooltip_nodes = _.map( this.tooltip_instances, (tooltip_instance) => tooltip_instance.node diff --git a/client/src/glossary/glossary.js b/client/src/glossary/glossary.js index 54d5f5793f..4ba55c7a6b 100644 --- a/client/src/glossary/glossary.js +++ b/client/src/glossary/glossary.js @@ -73,7 +73,7 @@ const table_links_by_tag = _.chain(tables) .value(); //id tag is there for legacy styles -const Glossary_ = ({ active_key, items_by_letter }) => ( +const Glossary_ = ({ items_by_letter }) => (
{!is_a11y_mode && ( diff --git a/client/src/graphql_utils/graphql_utils.js b/client/src/graphql_utils/graphql_utils.js index 4dbdb1d6d5..d9507986f7 100644 --- a/client/src/graphql_utils/graphql_utils.js +++ b/client/src/graphql_utils/graphql_utils.js @@ -38,11 +38,11 @@ const get_api_url = _.memoize(async () => { { signal: controller.signal }, "dev_connection_test" ) - .then((response) => { + .then((_response) => { clearTimeout(id_for_test_timeout); return local_dev_api_url; }) - .catch((error) => { + .catch((_error) => { clearTimeout(id_for_test_timeout); return "http://127.0.0.1:1337/graphql"; }); diff --git a/client/src/handlebars/register_helpers.side-effects.js b/client/src/handlebars/register_helpers.side-effects.js index 067b4156e8..dff548af7e 100644 --- a/client/src/handlebars/register_helpers.side-effects.js +++ b/client/src/handlebars/register_helpers.side-effects.js @@ -204,64 +204,64 @@ const fr_master_change = function ( }; HandlebarsWithPrototypeAccess.registerHelper( "changed_to", - function (val, formatter, context) { + function (val, formatter) { return en_master_change(val, formatter, "to", "past"); } ); HandlebarsWithPrototypeAccess.registerHelper( "changed_by", - function (val, formatter, context) { + function (val, formatter) { return en_master_change(val, formatter, "by", "past"); } ); // Dom code: HandlebarsWithPrototypeAccess.registerHelper( "changing_by", - function (val, formatter, context) { + function (val, formatter) { return en_master_change(val, formatter, "ing", "past"); } ); HandlebarsWithPrototypeAccess.registerHelper( "will_change_to", - function (val, formatter, context) { + function (val, formatter) { return en_master_change(val, formatter, "to", "future"); } ); HandlebarsWithPrototypeAccess.registerHelper( "will_change_by", - function (val, formatter, context) { + function (val, formatter) { return en_master_change(val, formatter, "by", "future"); } ); HandlebarsWithPrototypeAccess.registerHelper( "fr_changed_to", - function (val, genre, nombre, formatter, context) { + function (val, genre, nombre, formatter) { return fr_master_change(val, formatter, "to", "past", genre, nombre); } ); HandlebarsWithPrototypeAccess.registerHelper( "fr_changed_by", - function (val, genre, nombre, formatter, context) { + function (val, genre, nombre, formatter) { return fr_master_change(val, formatter, "by", "past", genre, nombre); } ); // Dom code: HandlebarsWithPrototypeAccess.registerHelper( "fr_changing_by", - function (val, genre, nombre, formatter, context) { + function (val, genre, nombre, formatter) { return fr_master_change(val, formatter, "ing", "past", genre, nombre); } ); HandlebarsWithPrototypeAccess.registerHelper( "fr_will_change_by", - function (val, genre, nombre, formatter, context) { + function (val, genre, nombre, formatter) { return fr_master_change(val, formatter, "by", "future", genre, nombre); } ); HandlebarsWithPrototypeAccess.registerHelper( "fr_will_change_to", - function (val, genre, nombre, formatter, context) { + function (val, genre, nombre, formatter) { return fr_master_change(val, formatter, "to", "future", genre, nombre); } ); @@ -373,13 +373,13 @@ const fr_master_two_value_change = function ( }; HandlebarsWithPrototypeAccess.registerHelper( "two_value_changed_to", - function (val1, val2, formatter, context) { + function (val1, val2, formatter) { return en_master_two_value_change(val1, val2, formatter, "to", "past"); } ); HandlebarsWithPrototypeAccess.registerHelper( "fr_two_value_changed_to", - function (val1, val2, genre, nombre, formatter, context) { + function (val1, val2, genre, nombre, formatter) { return fr_master_two_value_change( val1, val2, @@ -395,7 +395,7 @@ HandlebarsWithPrototypeAccess.registerHelper( // Helper to expand positive negative values to "[+/-]abs(value)" HandlebarsWithPrototypeAccess.registerHelper( "plus_or_minus_val", - function (val, formatter, context) { + function (val, formatter) { return ( (val >= 0 ? "+" : "-") + HandlebarsWithPrototypeAccess.helpers[formatter](Math.abs(val)) @@ -579,15 +579,12 @@ HandlebarsWithPrototypeAccess.registerHelper("le_dept_abbr", (context) => // fr : "som`eurl" // } // ``` -HandlebarsWithPrototypeAccess.registerHelper( - "encodeURI", - function (context, options) { - if (_.has(context, "en") && _.has(context, "fr")) { - context = context[lang]; - } - return encodeURI(context); +HandlebarsWithPrototypeAccess.registerHelper("encodeURI", function (context) { + if (_.has(context, "en") && _.has(context, "fr")) { + context = context[lang]; } -); + return encodeURI(context); +}); HandlebarsWithPrototypeAccess.registerHelper("debug", function (optionalValue) { // eslint-disable no-console diff --git a/client/src/home/CardImage/CardImage.stories.js b/client/src/home/CardImage/CardImage.stories.js deleted file mode 100644 index 515e2f530f..0000000000 --- a/client/src/home/CardImage/CardImage.stories.js +++ /dev/null @@ -1,44 +0,0 @@ -import React from "react"; - -import { trivial_text_maker } from "src/models/text"; - -import { CardImage } from "./CardImage"; - -export default { - title: "CardImage", - component: CardImage, -}; - -const Template = (args) => { - return ; -}; - -const svg = ( - console.log("Clicked!")} - > - - - -); - -export const Basic = Template.bind({}); -Basic.args = { - svg, - link_href: "#", - link_open_in_new_tab: true, - tmf: trivial_text_maker, - text_args: {}, - - // keys - title_key: "new", - text_key: "survey", -}; diff --git a/client/src/home/CardImage/CardImage.tsx b/client/src/home/CardImage/CardImage.tsx index cdb893cc67..48bd1cd37f 100644 --- a/client/src/home/CardImage/CardImage.tsx +++ b/client/src/home/CardImage/CardImage.tsx @@ -1,6 +1,7 @@ import React from "react"; -import { TM, TMProps } from "src/components/TextMaker"; +import type { TMProps } from "src/components/TextMaker"; +import { TM } from "src/components/TextMaker"; import "./CardImage.scss"; diff --git a/client/src/infographic/infographic_href_template.ts b/client/src/infographic/infographic_href_template.ts index d0312b7062..2fa0e0084c 100644 --- a/client/src/infographic/infographic_href_template.ts +++ b/client/src/infographic/infographic_href_template.ts @@ -1,6 +1,6 @@ import _ from "lodash"; -import { SubjectLike } from "src/models/subjects"; +import type { SubjectLike } from "src/models/subjects"; import { SafeJSURL } from "src/general_utils"; diff --git a/client/src/models/covid/yearsWithCovidDataStore.ts b/client/src/models/covid/yearsWithCovidDataStore.ts index a481a3d467..ab59d74f05 100644 --- a/client/src/models/covid/yearsWithCovidDataStore.ts +++ b/client/src/models/covid/yearsWithCovidDataStore.ts @@ -1,5 +1,3 @@ -import _ from "lodash"; - import { make_store } from "src/models/utils/make_store"; type YearsWithCovidDataDef = { diff --git a/client/src/models/faq/populate_faq.ts b/client/src/models/faq/populate_faq.ts index 1154b8d774..451d19f1f0 100644 --- a/client/src/models/faq/populate_faq.ts +++ b/client/src/models/faq/populate_faq.ts @@ -1,9 +1,7 @@ import _ from "lodash"; -import { - ParsedCsvWithUndefineds, - enforced_required_fields, -} from "src/models/utils/populate_utils"; +import type { ParsedCsvWithUndefineds } from "src/models/utils/populate_utils"; +import { enforced_required_fields } from "src/models/utils/populate_utils"; import { lang } from "src/core/injected_build_constants"; diff --git a/client/src/models/footnotes/dynamic_footnotes.ts b/client/src/models/footnotes/dynamic_footnotes.ts index 37ed5b5158..47033e0ef8 100644 --- a/client/src/models/footnotes/dynamic_footnotes.ts +++ b/client/src/models/footnotes/dynamic_footnotes.ts @@ -8,7 +8,7 @@ import { fiscal_year_to_year, } from "src/models/years"; -import { FootNoteDef } from "./footnotes"; +import type { FootNoteDef } from "./footnotes"; import text from "./dynamic_footnotes.yaml"; diff --git a/client/src/models/footnotes/footnotes.ts b/client/src/models/footnotes/footnotes.ts index a2b8bbe5b8..eed9609803 100644 --- a/client/src/models/footnotes/footnotes.ts +++ b/client/src/models/footnotes/footnotes.ts @@ -1,9 +1,9 @@ import _ from "lodash"; +import type { ClassSubjectType } from "src/models/subjects"; import { is_subject_instance, get_subject_class_by_type, - ClassSubjectType, } from "src/models/subjects"; import { make_store } from "src/models/utils/make_store"; diff --git a/client/src/models/footnotes/populate_footnotes.ts b/client/src/models/footnotes/populate_footnotes.ts index b1882038ca..a6cf826e02 100644 --- a/client/src/models/footnotes/populate_footnotes.ts +++ b/client/src/models/footnotes/populate_footnotes.ts @@ -1,13 +1,13 @@ import { csvParse } from "d3-dsv"; import _ from "lodash"; +import type { SubjectClassInstance } from "src/models/subjects"; import { Dept, CRSO, Program, class_subject_types, is_class_subject_types, - SubjectClassInstance, } from "src/models/subjects"; import { run_template } from "src/models/text"; import { fiscal_year_to_year } from "src/models/years"; diff --git a/client/src/models/glossary/populate_glossary.ts b/client/src/models/glossary/populate_glossary.ts index af00de5d42..84f646c08b 100644 --- a/client/src/models/glossary/populate_glossary.ts +++ b/client/src/models/glossary/populate_glossary.ts @@ -1,9 +1,7 @@ import _ from "lodash"; -import { - ParsedCsvWithUndefineds, - enforced_required_fields, -} from "src/models/utils/populate_utils"; +import type { ParsedCsvWithUndefineds } from "src/models/utils/populate_utils"; +import { enforced_required_fields } from "src/models/utils/populate_utils"; import { lang } from "src/core/injected_build_constants"; diff --git a/client/src/models/subjects/BaseSubjectFactory.ts b/client/src/models/subjects/BaseSubjectFactory.ts index 91950144a2..04acaeebba 100644 --- a/client/src/models/subjects/BaseSubjectFactory.ts +++ b/client/src/models/subjects/BaseSubjectFactory.ts @@ -1,6 +1,6 @@ import _ from "lodash"; -import { Store } from "src/models/utils/make_store"; +import type { Store } from "src/models/utils/make_store"; export const BaseSubjectFactory = < SubjectDef extends { id: string }, diff --git a/client/src/models/subjects/Gov.ts b/client/src/models/subjects/Gov.ts index 5f1ce65508..616b6761f7 100644 --- a/client/src/models/subjects/Gov.ts +++ b/client/src/models/subjects/Gov.ts @@ -1,5 +1,3 @@ -import _ from "lodash"; - import { trivial_text_maker } from "src/models/text"; import { make_store } from "src/models/utils/make_store"; diff --git a/client/src/models/subjects/populate_subjects.ts b/client/src/models/subjects/populate_subjects.ts index c40369093a..eff8edc471 100644 --- a/client/src/models/subjects/populate_subjects.ts +++ b/client/src/models/subjects/populate_subjects.ts @@ -1,9 +1,7 @@ import _ from "lodash"; -import { - ParsedCsvWithUndefineds, - enforced_required_fields, -} from "src/models/utils/populate_utils"; +import type { ParsedCsvWithUndefineds } from "src/models/utils/populate_utils"; +import { enforced_required_fields } from "src/models/utils/populate_utils"; import { lang } from "src/core/injected_build_constants"; diff --git a/client/src/panels/get_panels_for_subject/get_gov_panels.js b/client/src/panels/get_panels_for_subject/get_gov_panels.js index e84c1aa189..1b895171ee 100644 --- a/client/src/panels/get_panels_for_subject/get_gov_panels.js +++ b/client/src/panels/get_panels_for_subject/get_gov_panels.js @@ -48,7 +48,7 @@ import { import { services_feature_flag } from "src/core/injected_build_constants"; -export const get_gov_panels = (subject) => ({ +export const get_gov_panels = () => ({ intro: [declare_simplographic_panel()], financial: [ declare_financial_key_concepts_panel(), diff --git a/client/src/panels/get_panels_for_subject/get_tag_panels.js b/client/src/panels/get_panels_for_subject/get_tag_panels.js index 598163671c..0ee3b62b0d 100644 --- a/client/src/panels/get_panels_for_subject/get_tag_panels.js +++ b/client/src/panels/get_panels_for_subject/get_tag_panels.js @@ -10,7 +10,7 @@ import { declare_resource_structure_panel, } from "src/panels/panel_declarations/index"; -export const get_tag_panels = (subject) => ({ +export const get_tag_panels = () => ({ intro: [ declare_tagging_key_concepts_panel(), declare_description_panel(), diff --git a/client/src/panels/panel_declarations/InfographicPanel.js b/client/src/panels/panel_declarations/InfographicPanel.js index 60d105d835..23065f1298 100644 --- a/client/src/panels/panel_declarations/InfographicPanel.js +++ b/client/src/panels/panel_declarations/InfographicPanel.js @@ -151,7 +151,8 @@ export const TextPanel = (props) => { */ //Dummy component that will be remapped to flexboxgrid columns -const Col = ({ children, size }) => null; +// TS TODO, Col should take props { children, size } +const Col = () => null; Col.propTypes = { size: PropTypes.number.isRequired, isText: PropTypes.bool, diff --git a/client/src/panels/panel_declarations/covid/covid_estimates.js b/client/src/panels/panel_declarations/covid/covid_estimates.js index 6fe8272fa8..7bcaf5198c 100644 --- a/client/src/panels/panel_declarations/covid/covid_estimates.js +++ b/client/src/panels/panel_declarations/covid/covid_estimates.js @@ -169,7 +169,7 @@ const ByDepartmentTab = wrap_with_vote_stat_controls( _.reduce(data, (memo, { vote, stat }) => memo + vote + stat, 0) ) .toPairs() - .sortBy(([org_id, total]) => total) + .sortBy(([_org_id, total]) => total) .last() .value(); @@ -609,14 +609,14 @@ export const declare_covid_estimates_panel = () => declare_panel({ panel_key, subject_types: ["gov", "dept"], - panel_config_func: (subject_type_name, panel_key) => ({ + panel_config_func: () => ({ requires_years_with_covid_data: true, requires_covid_measures: true, title: text_maker("covid_measure_spending_auth"), footnotes: ["COVID", "COVID_AUTH", "COVID_MEASURE"], depends_on: [], source: () => get_source_links(["COVID"]), - calculate: function (subject, options) { + calculate: function (subject) { const years_with_estimates = yearsWithCovidDataStore.has(subject.id) && yearsWithCovidDataStore.lookup(subject.id).years_with_estimates; diff --git a/client/src/panels/panel_declarations/covid/covid_estimates_tooltips.js b/client/src/panels/panel_declarations/covid/covid_estimates_tooltips.js index fb7e60bb2a..cb14eb54c9 100644 --- a/client/src/panels/panel_declarations/covid/covid_estimates_tooltips.js +++ b/client/src/panels/panel_declarations/covid/covid_estimates_tooltips.js @@ -114,7 +114,7 @@ export const get_tooltip = (topic, selected_year, panel_subject_id, topic_id) => _.chain(tooltips_by_topic) .get(topic) .filter( - ({ fiscal_years, subject_ids, measure_ids, topic_ids }) => + ({ fiscal_years, subject_ids, topic_ids }) => _.some(fiscal_years, (tooltip_fiscal_year) => _.includes(["*", selected_year], tooltip_fiscal_year) ) && diff --git a/client/src/panels/panel_declarations/covid/covid_expenditures.js b/client/src/panels/panel_declarations/covid/covid_expenditures.js index ea12033fcc..e389cc1d9c 100644 --- a/client/src/panels/panel_declarations/covid/covid_expenditures.js +++ b/client/src/panels/panel_declarations/covid/covid_expenditures.js @@ -415,13 +415,13 @@ export const declare_covid_expenditures_panel = () => declare_panel({ panel_key, subject_types: ["gov", "dept"], - panel_config_func: (subject_type_name, panel_key) => ({ + panel_config_func: () => ({ requires_years_with_covid_data: true, requires_covid_measures: true, title: text_maker("covid_expenditures_estimated_exp"), footnotes: ["COVID", "COVID_EXP", "COVID_MEASURE"], source: () => get_source_links(["COVID"]), - calculate: (subject, options) => { + calculate: (subject) => { const years_with_expenditures = yearsWithCovidDataStore.lookup( subject.id )?.years_with_expenditures; diff --git a/client/src/panels/panel_declarations/covid/covid_intro.js b/client/src/panels/panel_declarations/covid/covid_intro.js index 8357fc33e4..c79bb34b5f 100644 --- a/client/src/panels/panel_declarations/covid/covid_intro.js +++ b/client/src/panels/panel_declarations/covid/covid_intro.js @@ -124,7 +124,7 @@ export const declare_covid_intro_panel = () => declare_panel({ panel_key: "covid_intro", subject_types: ["gov", "dept"], - panel_config_func: (subject_type_name, panel_key) => ({ + panel_config_func: () => ({ requires_years_with_covid_data: true, footnotes: ["COVID"], title: text_maker("covid_intro_panel_title"), diff --git a/client/src/panels/panel_declarations/covid/covid_key_concepts.js b/client/src/panels/panel_declarations/covid/covid_key_concepts.js index beae1aa6e8..19f5342e47 100644 --- a/client/src/panels/panel_declarations/covid/covid_key_concepts.js +++ b/client/src/panels/panel_declarations/covid/covid_key_concepts.js @@ -24,7 +24,7 @@ export const declare_covid_key_concepts_panel = () => declare_panel({ panel_key, subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ is_static: true, footnotes: false, source: false, diff --git a/client/src/panels/panel_declarations/finances/auth_exp_planned_spending/auth_exp_planned_spending.js b/client/src/panels/panel_declarations/finances/auth_exp_planned_spending/auth_exp_planned_spending.js index 4afc307207..4bce1b4354 100644 --- a/client/src/panels/panel_declarations/finances/auth_exp_planned_spending/auth_exp_planned_spending.js +++ b/client/src/panels/panel_declarations/finances/auth_exp_planned_spending/auth_exp_planned_spending.js @@ -529,7 +529,7 @@ const render = function ({ calculations, footnotes, sources, glossary_keys }) { ); }; -const calculate = function (subject, options) { +const calculate = function (subject) { const { orgVoteStatPa, programSpending, orgVoteStatEstimates } = this.tables; const query_subject = subject.subject_type === "gov" ? undefined : subject; @@ -592,7 +592,7 @@ const calculate = function (subject, options) { series.untrimmed_year_templates ) .zip(series.untrimmed_values) - .dropWhile(([year_template, value]) => !value) + .dropWhile(([_year_template, value]) => !value) .unzip() .value(); @@ -736,7 +736,7 @@ export const declare_auth_exp_planned_spending_panel = () => declare_panel({ panel_key: "auth_exp_planned_spending", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgVoteStatPa", "programSpending", "orgVoteStatEstimates"], glossary_keys: ["BUD_EXP", "NB_EXP"], title: (subject) => diff --git a/client/src/panels/panel_declarations/finances/detailed_program_spending_split/detailed_program_spending_split.js b/client/src/panels/panel_declarations/finances/detailed_program_spending_split/detailed_program_spending_split.js index cc3f03fb87..400c8d7e95 100644 --- a/client/src/panels/panel_declarations/finances/detailed_program_spending_split/detailed_program_spending_split.js +++ b/client/src/panels/panel_declarations/finances/detailed_program_spending_split/detailed_program_spending_split.js @@ -436,11 +436,11 @@ export const declare_detailed_program_spending_split_panel = () => declare_panel({ panel_key: "detailed_program_spending_split", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["programSobjs", "programSpending"], title: text_maker("detailed_program_spending_split_title"), footnotes: footnote_topics, - calculate(subject, options) { + calculate(subject) { const { programSobjs, programSpending } = this.tables; const table_data = programSobjs.q(subject).data; diff --git a/client/src/panels/panel_declarations/finances/drr_dp_resources/crso_by_prog.js b/client/src/panels/panel_declarations/finances/drr_dp_resources/crso_by_prog.js index b58ac666db..adfd2490cc 100644 --- a/client/src/panels/panel_declarations/finances/drr_dp_resources/crso_by_prog.js +++ b/client/src/panels/panel_declarations/finances/drr_dp_resources/crso_by_prog.js @@ -381,7 +381,7 @@ export const declare_crso_by_prog_fte_panel = () => declare_panel({ panel_key: "crso_by_prog_fte", subject_types: ["crso"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: ["PLANNED_FTE", "FTE"], depends_on: ["programSpending", "programFtes"], title: text_maker("crso_by_prog_fte_title"), @@ -393,7 +393,7 @@ export const declare_crso_by_prog_exp_panel = () => declare_panel({ panel_key: "crso_by_prog_exp", subject_types: ["crso"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: ["PLANNED_EXP", "EXP"], depends_on: ["programSpending", "programFtes"], title: text_maker("crso_by_prog_exp_title"), diff --git a/client/src/panels/panel_declarations/finances/drr_dp_resources/dp_rev_split.js b/client/src/panels/panel_declarations/finances/drr_dp_resources/dp_rev_split.js index 64d390489a..32b8368c00 100644 --- a/client/src/panels/panel_declarations/finances/drr_dp_resources/dp_rev_split.js +++ b/client/src/panels/panel_declarations/finances/drr_dp_resources/dp_rev_split.js @@ -37,7 +37,7 @@ const spending_formatter = (value) => ( /> ); -const revenue_formatter = (value, custom_color = null) => ( +const revenue_formatter = (value) => ( declare_panel({ panel_key: "dp_rev_split", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["programSpending"], title: text_maker("dp_rev_split_title"), machinery_footnotes: false, footnotes: ["PLANNED_GROSS", "PLANNED_EXP", "PLANNED_FTE"], glossary_keys: ["SPA"], - source: (subject) => get_source_links(["DP"]), + source: () => get_source_links(["DP"]), calculate(subject) { const { programSpending } = this.tables; const q = programSpending.q(subject); diff --git a/client/src/panels/panel_declarations/finances/drr_dp_resources/spending_in_perspective.js b/client/src/panels/panel_declarations/finances/drr_dp_resources/spending_in_perspective.js index c75d2ba7e1..94a19ae9c9 100644 --- a/client/src/panels/panel_declarations/finances/drr_dp_resources/spending_in_perspective.js +++ b/client/src/panels/panel_declarations/finances/drr_dp_resources/spending_in_perspective.js @@ -108,10 +108,10 @@ export const declare_spending_in_tag_perspective_panel = () => declare_panel({ panel_key: "spending_in_tag_perspective", subject_types: ["program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("program_spending_in_tag_perspective_title"), depends_on: ["programSpending"], - calculate(subject, options) { + calculate(subject) { if (is_a11y_mode) { //turn off this panel in a11y mode return false; diff --git a/client/src/panels/panel_declarations/finances/goco/goco.js b/client/src/panels/panel_declarations/finances/goco/goco.js index 865693a5b2..18db600d2c 100644 --- a/client/src/panels/panel_declarations/finances/goco/goco.js +++ b/client/src/panels/panel_declarations/finances/goco/goco.js @@ -406,7 +406,7 @@ class Goco extends React.Component { onMouseLeave={(child_node, e) => handleHover(child_node, e.target, node.data.children) } - onClick={(child_node, e) => + onClick={(child_node) => window.open(tick_map[child_node.indexValue], "_blank") } graph_height="500px" @@ -528,7 +528,7 @@ export const declare_gocographic_panel = () => declare_panel({ panel_key: "gocographic", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["programSpending", "programFtes"], title: text_maker("gocographic_title"), footnotes: ["GOCO"], diff --git a/client/src/panels/panel_declarations/finances/planned_actual_comparison/planned_actual_comparison.js b/client/src/panels/panel_declarations/finances/planned_actual_comparison/planned_actual_comparison.js index 3feddb447d..7727c99367 100644 --- a/client/src/panels/panel_declarations/finances/planned_actual_comparison/planned_actual_comparison.js +++ b/client/src/panels/panel_declarations/finances/planned_actual_comparison/planned_actual_comparison.js @@ -21,10 +21,10 @@ export const declare_planned_actual_comparison_panel = () => declare_panel({ panel_key: "planned_actual_comparison", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["programSpending", "programFtes"], title: text_maker("planned_actual_title"), - source: (subject) => get_source_links(["DP", "DRR", "PA"]), + source: () => get_source_links(["DP", "DRR", "PA"]), calculate(subject) { if (subject.subject_type === "dept") { if ( diff --git a/client/src/panels/panel_declarations/finances/sobj/personel_spend.js b/client/src/panels/panel_declarations/finances/sobj/personel_spend.js index 8f0359d5ac..d91cac984d 100644 --- a/client/src/panels/panel_declarations/finances/sobj/personel_spend.js +++ b/client/src/panels/panel_declarations/finances/sobj/personel_spend.js @@ -21,10 +21,10 @@ export const declare_personnel_spend_panel = () => declare_panel({ panel_key: "personnel_spend", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgSobjs"], title: text_maker("personnel_spend_title"), - calculate(subject, data) { + calculate(subject) { const { orgSobjs } = this.tables; const year_value_pairs = _.map(std_years, (year) => [ run_template(year), diff --git a/client/src/panels/panel_declarations/finances/sobj/spend_by_so_hist.js b/client/src/panels/panel_declarations/finances/sobj/spend_by_so_hist.js index 0103bc84de..ff2423d3c6 100644 --- a/client/src/panels/panel_declarations/finances/sobj/spend_by_so_hist.js +++ b/client/src/panels/panel_declarations/finances/sobj/spend_by_so_hist.js @@ -198,7 +198,7 @@ export const declare_spend_by_so_hist_panel = () => declare_panel({ panel_key: "spend_by_so_hist", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgSobjs"], title: text_maker("dept_fin_spend_by_so_hist_title"), footnotes: ["SOBJ", "EXP"], diff --git a/client/src/panels/panel_declarations/finances/sobj/spend_rev_split.js b/client/src/panels/panel_declarations/finances/sobj/spend_rev_split.js index cbd7020d29..bb82bf7c12 100644 --- a/client/src/panels/panel_declarations/finances/sobj/spend_rev_split.js +++ b/client/src/panels/panel_declarations/finances/sobj/spend_rev_split.js @@ -93,14 +93,14 @@ export const declare_spend_rev_split_panel = () => declare_panel({ panel_key: "spend_rev_split", subject_types: ["dept", "program"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "dept": return { ...common_panel_config, depends_on: ["orgSobjs"], footnotes: ["SOBJ_REV"], - calculate(subject, options) { + calculate(subject) { const { orgSobjs } = this.tables; const last_year_spend = orgSobjs.sum_cols_by_grouped_data( "{{pa_last_year}}", @@ -136,7 +136,7 @@ export const declare_spend_rev_split_panel = () => return { ...common_panel_config, depends_on: ["programSobjs"], - calculate(subject, options) { + calculate(subject) { const { programSobjs } = this.tables; const prog_rows = programSobjs.programs.get(subject); const rev_split = rows_to_rev_split(prog_rows); diff --git a/client/src/panels/panel_declarations/finances/sobj/top_spending_areas.js b/client/src/panels/panel_declarations/finances/sobj/top_spending_areas.js index 376e684524..7c6220b03b 100644 --- a/client/src/panels/panel_declarations/finances/sobj/top_spending_areas.js +++ b/client/src/panels/panel_declarations/finances/sobj/top_spending_areas.js @@ -70,11 +70,11 @@ export const declare_top_spending_areas_panel = () => declare_panel({ panel_key: "top_spending_areas", subject_types: ["program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["programSobjs"], footnotes: ["SOBJ"], title: text_maker("top_spending_areas_title"), - calculate(subject, options) { + calculate(subject) { if (_.isEmpty(this.tables.programSobjs.programs.get(subject))) { return false; } diff --git a/client/src/panels/panel_declarations/finances/transfer_payments/historical_g_and_c.js b/client/src/panels/panel_declarations/finances/transfer_payments/historical_g_and_c.js index 988464d9ef..9ef5009705 100644 --- a/client/src/panels/panel_declarations/finances/transfer_payments/historical_g_and_c.js +++ b/client/src/panels/panel_declarations/finances/transfer_payments/historical_g_and_c.js @@ -361,13 +361,13 @@ export const declare_historical_g_and_c_panel = () => declare_panel({ panel_key: "historical_g_and_c", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "gov": return { ...common_panel_config, - calculate(subject) { + calculate() { const { orgTransferPayments } = this.tables; const payments = orgTransferPayments.sum_cols_by_grouped_data( diff --git a/client/src/panels/panel_declarations/finances/transfer_payments/last_year_g_and_c_perspective.js b/client/src/panels/panel_declarations/finances/transfer_payments/last_year_g_and_c_perspective.js index 0a1af5c303..6082bd402a 100644 --- a/client/src/panels/panel_declarations/finances/transfer_payments/last_year_g_and_c_perspective.js +++ b/client/src/panels/panel_declarations/finances/transfer_payments/last_year_g_and_c_perspective.js @@ -14,11 +14,11 @@ export const declare_last_year_g_and_c_perspective_panel = () => declare_panel({ panel_key: "last_year_g_and_c_perspective", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgTransferPayments", "programSpending"], footnotes: ["SOBJ10"], title: text_maker("last_year_g_and_c_perspective_title"), - calculate(subject, options) { + calculate(subject) { const { orgTransferPayments, programSpending } = this.tables; const exp_pa_last_year = "{{pa_last_year}}exp"; diff --git a/client/src/panels/panel_declarations/finances/transfer_payments/tp_by_region.js b/client/src/panels/panel_declarations/finances/transfer_payments/tp_by_region.js index 434e6f35f3..8582cf9d76 100644 --- a/client/src/panels/panel_declarations/finances/transfer_payments/tp_by_region.js +++ b/client/src/panels/panel_declarations/finances/transfer_payments/tp_by_region.js @@ -68,7 +68,7 @@ const get_text_args = (subject, transfer_payment_data, per_capita_data) => { const [largest_total_prov_code, largest_total_value] = _.chain(last_year_data) .toPairs() - .sortBy(([prov_code, value]) => value) + .sortBy(([_prov_code, value]) => value) .last() .value(); const largest_total_prov = provinces[largest_total_prov_code].text; @@ -81,7 +81,7 @@ const get_text_args = (subject, transfer_payment_data, per_capita_data) => { show_per_capita_data ? _.chain(last_year_data_per_capita) .toPairs() - .sortBy(([prov_code, value]) => value) + .sortBy(([_prov_code, value]) => value) .last() .value() : [false, false]; @@ -313,7 +313,7 @@ export const declare_tp_by_region_panel = () => declare_panel({ panel_key: "tp_by_region", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgTransferPaymentsRegion"], title: text_maker("tp_by_region_title"), calculate: function (subject) { diff --git a/client/src/panels/panel_declarations/finances/vote_stat/estimates_in_perspective.js b/client/src/panels/panel_declarations/finances/vote_stat/estimates_in_perspective.js index cbd0bae0a7..84e26bb30e 100644 --- a/client/src/panels/panel_declarations/finances/vote_stat/estimates_in_perspective.js +++ b/client/src/panels/panel_declarations/finances/vote_stat/estimates_in_perspective.js @@ -20,11 +20,11 @@ export const declare_estimates_in_perspective_panel = () => declare_panel({ panel_key: "estimates_in_perspective", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("estimates_perspective_title"), depends_on: ["orgVoteStatEstimates"], machinery_footnotes: false, - calculate(subject, options) { + calculate(subject) { const { orgVoteStatEstimates } = this.tables; const gov_q = orgVoteStatEstimates.q(Gov.instance); const dept_q = orgVoteStatEstimates.q(subject); diff --git a/client/src/panels/panel_declarations/finances/vote_stat/in_year_estimates_split.js b/client/src/panels/panel_declarations/finances/vote_stat/in_year_estimates_split.js index 3d88d677d6..7445526d56 100644 --- a/client/src/panels/panel_declarations/finances/vote_stat/in_year_estimates_split.js +++ b/client/src/panels/panel_declarations/finances/vote_stat/in_year_estimates_split.js @@ -128,7 +128,7 @@ export const declare_in_year_estimates_split_panel = () => declare_panel({ panel_key: "in_year_estimates_split", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "gov": return { diff --git a/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_breakdown.js b/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_breakdown.js index 6ea74f1cc0..3463e7bd26 100644 --- a/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_breakdown.js +++ b/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_breakdown.js @@ -214,7 +214,7 @@ const declare_in_year_voted_breakdown_panel = () => declare_panel({ panel_key: "in_year_voted_breakdown", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgVoteStatEstimates"], title: text_maker("in_year_voted_breakdown_title"), calculate: planned_vote_or_stat_calculate("voted"), @@ -225,7 +225,7 @@ const declare_in_year_stat_breakdown_panel = () => declare_panel({ panel_key: "in_year_stat_breakdown", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgVoteStatEstimates"], title: text_maker("in_year_stat_breakdown_title"), calculate: planned_vote_or_stat_calculate("stat"), diff --git a/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_split.js b/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_split.js index a4c2bde0d7..5a8915522b 100644 --- a/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_split.js +++ b/client/src/panels/panel_declarations/finances/vote_stat/in_year_vote_stat_split.js @@ -80,7 +80,7 @@ export const declare_in_year_voted_stat_split_panel = () => declare_panel({ panel_key: "in_year_voted_stat_split", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "gov": return { diff --git a/client/src/panels/panel_declarations/finances/vote_stat/last_year_vote_stat_split.js b/client/src/panels/panel_declarations/finances/vote_stat/last_year_vote_stat_split.js index 03936d1a84..84a33faaa9 100644 --- a/client/src/panels/panel_declarations/finances/vote_stat/last_year_vote_stat_split.js +++ b/client/src/panels/panel_declarations/finances/vote_stat/last_year_vote_stat_split.js @@ -43,12 +43,12 @@ export const declare_vote_stat_split_panel = () => declare_panel({ panel_key: "vote_stat_split", subject_types: ["program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["programVoteStat"], footnotes: ["VOTED", "STAT"], glossary_keys: ["AUTH"], title: text_maker("vote_stat_split_title"), - calculate(subject, options) { + calculate(subject) { const { programVoteStat } = this.tables; const vote_stat = _.map( diff --git a/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat.js b/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat.js index a508891d42..45eb1a9e74 100644 --- a/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat.js +++ b/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat.js @@ -94,7 +94,7 @@ const Pane = ({ size, children, is_header, noPadding }) => ( const HeaderPane = (props) => ; -const PaneItem = ({ hide_a11y, children, textSize, hide_lg }) => ( +const PaneItem = ({ children, textSize, hide_lg }) => (
declare_panel({ panel_key: "welcome_mat", subject_types: ["gov", "dept", "program", "crso"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "gov": return { diff --git a/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat_fte.js b/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat_fte.js index 17df4db1d4..9753f4ed4b 100644 --- a/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat_fte.js +++ b/client/src/panels/panel_declarations/finances/welcome_mat/welcome_mat_fte.js @@ -67,7 +67,7 @@ export const format_and_get_fte = (type, subject) => { const graph_data = _.chain(series_labels) .zip([historical_graph_data, planned_graph_data]) - .filter(([id, formatted_data_array]) => formatted_data_array.length > 0) + .filter(([_id, formatted_data_array]) => formatted_data_array.length > 0) .map(([id, data]) => ({ id, data })) .value(); diff --git a/client/src/panels/panel_declarations/intro/profile_panels.js b/client/src/panels/panel_declarations/intro/profile_panels.js index d09c61e5fb..c88c3c0e5e 100644 --- a/client/src/panels/panel_declarations/intro/profile_panels.js +++ b/client/src/panels/panel_declarations/intro/profile_panels.js @@ -21,7 +21,7 @@ export const declare_profile_panel = () => declare_panel({ panel_key: "profile", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ title: text_maker(`profile`), calculate: (subject) => { switch (subject_type) { @@ -130,7 +130,7 @@ export const declare_profile_panel = () => return [label, item]; }) - .filter(([label, item]) => item) + .filter(([_label, item]) => item) .value(); return ( @@ -146,7 +146,7 @@ export const declare_description_panel = () => declare_panel({ panel_key: "description", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: (subject) => !_.isEmpty(subject.description), title: text_maker("tag_desc_title"), diff --git a/client/src/panels/panel_declarations/intro/simplographic/simplographic.js b/client/src/panels/panel_declarations/intro/simplographic/simplographic.js index 473b26edf1..55cfefdf89 100644 --- a/client/src/panels/panel_declarations/intro/simplographic/simplographic.js +++ b/client/src/panels/panel_declarations/intro/simplographic/simplographic.js @@ -29,13 +29,13 @@ export const declare_simplographic_panel = () => declare_panel({ panel_key: "simplographic", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, requires_result_counts: true, depends_on: ["orgVoteStatPa", "orgEmployeeRegion"], title: text_maker("simplographic_title"), - calculate(dept) { + calculate() { const { orgVoteStatPa, orgEmployeeRegion } = this.tables; const gov_exp_pa_last_year = orgVoteStatPa .q() diff --git a/client/src/panels/panel_declarations/misc/gov_related.js b/client/src/panels/panel_declarations/misc/gov_related.js index 4ad7c3dca5..7c7d10e57d 100644 --- a/client/src/panels/panel_declarations/misc/gov_related.js +++ b/client/src/panels/panel_declarations/misc/gov_related.js @@ -17,7 +17,7 @@ export const declare_gov_related_info_panel = () => panel_key: "gov_related_info", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: _.constant(true), title: text_maker("gov_related_info_title"), diff --git a/client/src/panels/panel_declarations/misc/hierarchy_component.js b/client/src/panels/panel_declarations/misc/hierarchy_component.js index f770460694..9a25e4607a 100644 --- a/client/src/panels/panel_declarations/misc/hierarchy_component.js +++ b/client/src/panels/panel_declarations/misc/hierarchy_component.js @@ -166,7 +166,7 @@ export const org_external_hierarchy = ({ subject, href_generator }) => { .filter((node) => !node.is_dead || is_subject(node)) .groupBy("inst_form.name") .toPairs() - .sortBy(([type, group]) => _.includes(group, subject)) + .sortBy(([_type, group]) => _.includes(group, subject)) .reverse() .map(([type, orgs]) => ({ name: type, @@ -339,14 +339,7 @@ export const tag_hierarchy = ({ }; }; -export const crso_hierarchy = ({ - subject, - href_generator, - show_siblings, - show_uncles, - show_cousins, - show_dead_sos, -}) => { +export const crso_hierarchy = ({ subject, href_generator }) => { //From Gov to programs under CRSO const is_subject = (subj) => subj === subject; diff --git a/client/src/panels/panel_declarations/misc/hierarchy_panels.js b/client/src/panels/panel_declarations/misc/hierarchy_panels.js index 276163ff39..3e43e69fae 100644 --- a/client/src/panels/panel_declarations/misc/hierarchy_panels.js +++ b/client/src/panels/panel_declarations/misc/hierarchy_panels.js @@ -29,7 +29,7 @@ export const declare_portfolio_structure_intro_panel = () => panel_key: "portfolio_structure_intro", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, title: text_maker("portfolio_structure_intro_title"), calculate(subject) { @@ -60,7 +60,7 @@ export const declare_portfolio_structure_related_panel = () => panel_key: "portfolio_structure_related", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, title: text_maker("portfolio_structure_related_title"), calculate(subject) { @@ -90,7 +90,7 @@ export const declare_program_fed_structure_panel = () => panel_key: "program_fed_structure", subject_types: ["program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: _.constant(true), title: text_maker("program_fed_structure_title"), @@ -122,7 +122,7 @@ export const declare_related_program_structure_panel = () => panel_key: "related_program_structure", subject_types: ["program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: _.constant(true), title: text_maker("related_program_structure_title"), @@ -154,7 +154,7 @@ export const declare_tag_fed_structure_panel = () => panel_key: "tag_fed_structure", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: _.constant(true), title: text_maker("tag_fed_structure_title"), @@ -184,7 +184,7 @@ export const declare_sibling_tags_panel = () => panel_key: "sibling_tags", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: _.constant(true), title: text_maker("sibling_tags_title"), @@ -214,7 +214,7 @@ export const declare_crso_in_gov_panel = () => panel_key: "crso_in_gov", subject_types: ["crso"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, title: text_maker("crso_in_gov_title"), calculate: _.constant(true), @@ -241,7 +241,7 @@ export const declare_crso_links_to_other_crso_panel = () => panel_key: "crso_links_to_other_crso", subject_types: ["crso"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, calculate: _.constant(true), title: text_maker("crso_links_to_other_crso_title"), diff --git a/client/src/panels/panel_declarations/misc/key_concept_panels/key_concept_panels.js b/client/src/panels/panel_declarations/misc/key_concept_panels/key_concept_panels.js index 81dfe61b7d..c450ad414b 100644 --- a/client/src/panels/panel_declarations/misc/key_concept_panels/key_concept_panels.js +++ b/client/src/panels/panel_declarations/misc/key_concept_panels/key_concept_panels.js @@ -47,7 +47,7 @@ export const declare_financial_key_concepts_panel = () => declare_panel({ panel_key: "financial_key_concepts", subject_types: ["gov", "dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ ...common_panel_config, render: curried_render({ q_a_key_pairs: [ @@ -74,7 +74,7 @@ export const declare_results_key_concepts_panel = () => declare_panel({ panel_key: "results_key_concepts", subject_types: ["gov", "dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ ...common_panel_config, render: curried_render({ q_a_key_pairs: [ @@ -96,7 +96,7 @@ export const declare_people_key_concepts_panel = () => declare_panel({ panel_key: "people_key_concepts", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ ...common_panel_config, render: curried_render({ q_a_key_pairs: [ @@ -117,7 +117,7 @@ export const declare_tagging_key_concepts_panel = () => declare_panel({ panel_key: "tagging_key_concepts", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ ...common_panel_config, render: curried_render({ q_a_key_pairs: [ diff --git a/client/src/panels/panel_declarations/misc/resource_structure/resource_structure.js b/client/src/panels/panel_declarations/misc/resource_structure/resource_structure.js index f5a5872078..55e9f833c6 100644 --- a/client/src/panels/panel_declarations/misc/resource_structure/resource_structure.js +++ b/client/src/panels/panel_declarations/misc/resource_structure/resource_structure.js @@ -13,7 +13,7 @@ export const declare_resource_structure_panel = () => panel_key: "resource_structure", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, title: text_maker("resource_structure_title"), depends_on: ["programSpending", "programFtes"], diff --git a/client/src/panels/panel_declarations/misc/resource_structure/rooted_resource_scheme.js b/client/src/panels/panel_declarations/misc/resource_structure/rooted_resource_scheme.js index d77480754b..088d37da5c 100644 --- a/client/src/panels/panel_declarations/misc/resource_structure/rooted_resource_scheme.js +++ b/client/src/panels/panel_declarations/misc/resource_structure/rooted_resource_scheme.js @@ -154,7 +154,7 @@ function create_rooted_resource_hierarchy({ year, root_subject }) { export class SingleTagResourceExplorer extends AbstractExplorerScheme { Component = SingleTagResourceExplorerComponent; - constructor(subject, has_planning_data, has_actual_data) { + constructor(subject, has_planning_data) { super(); this.subject = subject; this.initial_scheme_state = { diff --git a/client/src/panels/panel_declarations/misc/rpb_links.js b/client/src/panels/panel_declarations/misc/rpb_links.js index 24c16a0f50..f7bbdfde39 100644 --- a/client/src/panels/panel_declarations/misc/rpb_links.js +++ b/client/src/panels/panel_declarations/misc/rpb_links.js @@ -39,7 +39,7 @@ export const declare_links_to_rpb_panel = () => panel_key: "links_to_rpb", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "gov": return { diff --git a/client/src/panels/panel_declarations/misc/tags_related_to_subject_panels.js b/client/src/panels/panel_declarations/misc/tags_related_to_subject_panels.js index 60a3693cdd..e7cff44248 100644 --- a/client/src/panels/panel_declarations/misc/tags_related_to_subject_panels.js +++ b/client/src/panels/panel_declarations/misc/tags_related_to_subject_panels.js @@ -84,7 +84,7 @@ export const declare_tags_of_interest_panel = () => declare_panel({ panel_key: "tags_of_interest", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ footnotes: false, title: text_maker(title_by_subject_type[subject_type]), calculate(subject) { @@ -115,7 +115,7 @@ export const declare_tag_progs_by_dept_panel = () => declare_panel({ panel_key: "tag_progs_by_dept", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, title: text_maker("tag_progs_by_dept_title"), calculate: _.constant(true), @@ -171,7 +171,7 @@ export const declare_related_tags_panel = () => panel_key: "related_tags", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ footnotes: false, title: text_maker("related_tags_title"), calculate(subject) { diff --git a/client/src/panels/panel_declarations/misc/warning_panels.js b/client/src/panels/panel_declarations/misc/warning_panels.js index 5edf385e42..d7d01ebe0c 100644 --- a/client/src/panels/panel_declarations/misc/warning_panels.js +++ b/client/src/panels/panel_declarations/misc/warning_panels.js @@ -55,7 +55,7 @@ export const declare_dead_program_warning_panel = () => declare_panel({ panel_key: "dead_program_warning", subject_types: ["program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ ...dead_panel_config, render() { @@ -72,7 +72,7 @@ export const declare_dead_crso_warning_panel = () => declare_panel({ panel_key: "dead_crso_warning", subject_types: ["crso"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ ...dead_panel_config, render() { @@ -89,7 +89,7 @@ export const declare_m2m_tag_warning_panel = () => declare_panel({ panel_key: "m2m_warning", subject_types: ["tag"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ ...common_panel_config, calculate(subject) { @@ -125,7 +125,7 @@ export const declare_late_results_warning_panel = () => declare_panel({ panel_key: "late_results_warning", subject_types: ["gov", "dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { const docs_with_late_orgs = _.chain(result_docs_in_tabling_order) .reverse() .filter(({ late_results_orgs }) => late_results_orgs.length > 0) @@ -215,7 +215,7 @@ const get_declare_late_resources_panel = (planned_or_actual, late_orgs) => () => declare_panel({ panel_key: `late_${planned_or_actual}_resources_warning`, subject_types: ["gov", "dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => { + panel_config_func: (subject_type) => { switch (subject_type) { case "gov": return { diff --git a/client/src/panels/panel_declarations/people/employee_age.js b/client/src/panels/panel_declarations/people/employee_age.js index 0892502d85..707414f00f 100644 --- a/client/src/panels/panel_declarations/people/employee_age.js +++ b/client/src/panels/panel_declarations/people/employee_age.js @@ -33,7 +33,7 @@ const { people_years } = year_templates; const { age_groups } = businessConstants; const calculate_funcs_by_subject_type = { - gov: function (gov) { + gov: function () { const { orgEmployeeAgeGroup } = this.tables; const { orgEmployeeAvgAge } = this.tables; @@ -113,7 +113,7 @@ export const declare_employee_age_panel = () => declare_panel({ panel_key: "employee_age", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeAgeGroup", "orgEmployeeAvgAge"], calculate: calculate_funcs_by_subject_type[subject_type], title: text_maker("employee_age_title"), diff --git a/client/src/panels/panel_declarations/people/employee_executive_level.js b/client/src/panels/panel_declarations/people/employee_executive_level.js index 18fe971079..e9e0ce1a7b 100644 --- a/client/src/panels/panel_declarations/people/employee_executive_level.js +++ b/client/src/panels/panel_declarations/people/employee_executive_level.js @@ -25,7 +25,7 @@ const { people_years } = year_templates; const { ex_levels } = businessConstants; const calculate_funcs_by_subject_type = { - gov: (orgEmployeeExLvl, gov) => { + gov: (orgEmployeeExLvl) => { const gov_five_year_total_head_count = _.chain( orgEmployeeExLvl.q().gov_grouping() ) @@ -89,7 +89,7 @@ export const declare_employee_executive_level_panel = () => declare_panel({ panel_key: "employee_executive_level", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeExLvl"], title: text_maker("employee_executive_level_title"), calculate: function (subject) { diff --git a/client/src/panels/panel_declarations/people/employee_fol.js b/client/src/panels/panel_declarations/people/employee_fol.js index 757fee93a2..d776a58eee 100644 --- a/client/src/panels/panel_declarations/people/employee_fol.js +++ b/client/src/panels/panel_declarations/people/employee_fol.js @@ -25,7 +25,7 @@ const { people_years } = year_templates; const { fol } = businessConstants; const calculate_funcs_by_subject_type = { - gov: function (gov) { + gov: function () { const { orgEmployeeFol } = this.tables; const gov_five_year_total_head_count = _.chain( @@ -75,7 +75,7 @@ export const declare_employee_fol_panel = () => declare_panel({ panel_key: "employee_fol", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeFol"], calculate: calculate_funcs_by_subject_type[subject_type], title: text_maker("employee_fol_title"), diff --git a/client/src/panels/panel_declarations/people/employee_gender.js b/client/src/panels/panel_declarations/people/employee_gender.js index bf0cc9cde8..1bb4422466 100644 --- a/client/src/panels/panel_declarations/people/employee_gender.js +++ b/client/src/panels/panel_declarations/people/employee_gender.js @@ -25,7 +25,7 @@ const { people_years } = year_templates; const { gender } = businessConstants; const calculate_funcs_by_subject_type = { - gov: function (gov) { + gov: function () { const { orgEmployeeGender } = this.tables; const gov_five_year_total_head_count = _.chain( @@ -77,7 +77,7 @@ export const declare_employee_gender_panel = () => declare_panel({ panel_key: "employee_gender", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeGender"], calculate: calculate_funcs_by_subject_type[subject_type], title: text_maker("employee_gender_title"), diff --git a/client/src/panels/panel_declarations/people/employee_last_year_totals.js b/client/src/panels/panel_declarations/people/employee_last_year_totals.js index c048f1ffa6..ff3e5518b8 100644 --- a/client/src/panels/panel_declarations/people/employee_last_year_totals.js +++ b/client/src/panels/panel_declarations/people/employee_last_year_totals.js @@ -22,7 +22,7 @@ export const declare_employee_last_year_totals_panel = () => declare_panel({ panel_key: "employee_last_year_totals", subject_types: ["dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ depends_on: ["orgEmployeeType"], title: text_maker("dept_employee_last_year_totals_title"), calculate(subject) { diff --git a/client/src/panels/panel_declarations/people/employee_prov.js b/client/src/panels/panel_declarations/people/employee_prov.js index 3559d46c35..f1a37f3d28 100644 --- a/client/src/panels/panel_declarations/people/employee_prov.js +++ b/client/src/panels/panel_declarations/people/employee_prov.js @@ -205,7 +205,7 @@ export const declare_employee_prov_panel = () => declare_panel({ panel_key: "employee_prov", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeRegion"], calculate: calculate_funcs_by_subject_type[subject_type], title: text_maker("employee_prov_title"), diff --git a/client/src/panels/panel_declarations/people/employee_totals.js b/client/src/panels/panel_declarations/people/employee_totals.js index 5c8acd355d..9430618fc7 100644 --- a/client/src/panels/panel_declarations/people/employee_totals.js +++ b/client/src/panels/panel_declarations/people/employee_totals.js @@ -31,7 +31,7 @@ export const declare_employee_totals_panel = () => declare_panel({ panel_key: "employee_totals", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeType"], title: text_maker(subject_type + "_employee_totals_title"), calculate(subject) { diff --git a/client/src/panels/panel_declarations/people/employee_type.js b/client/src/panels/panel_declarations/people/employee_type.js index e4f04c5e0b..241a40f7c3 100644 --- a/client/src/panels/panel_declarations/people/employee_type.js +++ b/client/src/panels/panel_declarations/people/employee_type.js @@ -25,7 +25,7 @@ const { people_years } = year_templates; const { tenure } = businessConstants; const calculate_funcs_by_subject_type = { - gov: function (gov) { + gov: function () { const { orgEmployeeType } = this.tables; return _.chain(tenure) .values() @@ -70,7 +70,7 @@ export const declare_employee_type_panel = () => declare_panel({ panel_key: "employee_type", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ depends_on: ["orgEmployeeType"], title: text_maker("employee_type_title"), glossary_keys: [ diff --git a/client/src/panels/panel_declarations/results/drr_summary.js b/client/src/panels/panel_declarations/results/drr_summary.js index 997220c05a..ed2a1012ce 100644 --- a/client/src/panels/panel_declarations/results/drr_summary.js +++ b/client/src/panels/panel_declarations/results/drr_summary.js @@ -102,9 +102,9 @@ const StatusGrid = (props) => { const is_single_indicator = _.some(props, (value) => value === total); const data = _.chain(props) - .pickBy((val, key) => val > 0 || is_single_indicator) + .pickBy((val) => val > 0 || is_single_indicator) .toPairs() - .groupBy(([key, val]) => key) + .groupBy(([key, _val]) => key) .map((amounts, status_key) => { const key_total = _.sumBy(amounts, 1); return { @@ -167,7 +167,7 @@ const StatusGrid = (props) => { {_.chain(viz_data) .groupBy("status_key") .map((group, status_key) => [group, status_key]) - .sortBy(([group, status_key]) => icon_order[status_key]) + .sortBy(([_group, status_key]) => icon_order[status_key]) .map(([group, status_key]) => ( declare_panel({ panel_key: "drr_summary", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ requires_result_counts: subject_type === "dept", requires_granular_result_counts: subject_type !== "dept", footnotes: ["RESULTS", "DRR"], - source: (subject) => get_source_links(["DRR"]), + source: () => get_source_links(["DRR"]), title: text_maker("drr_summary_title", { year: current_drr_year }), calculate(subject) { const verbose_counts = (() => { diff --git a/client/src/panels/panel_declarations/results/gov_dp.js b/client/src/panels/panel_declarations/results/gov_dp.js index d1c7bfcb93..23248d2d28 100644 --- a/client/src/panels/panel_declarations/results/gov_dp.js +++ b/client/src/panels/panel_declarations/results/gov_dp.js @@ -72,7 +72,7 @@ export const declare_gov_dp_panel = () => declare_panel({ panel_key: "gov_dp", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ requires_result_counts: true, title: text_maker("gov_dp_summary_title", { year: current_dp_year, @@ -133,7 +133,7 @@ export const declare_gov_dp_panel = () => }; }, footnotes: ["RESULTS", "DP"], - source: (subject) => get_source_links(["DP"]), + source: () => get_source_links(["DP"]), render({ title, calculations, sources, footnotes }) { const { panel_args: { diff --git a/client/src/panels/panel_declarations/results/gov_drr.js b/client/src/panels/panel_declarations/results/gov_drr.js index 6e552d75df..c5c579906a 100644 --- a/client/src/panels/panel_declarations/results/gov_drr.js +++ b/client/src/panels/panel_declarations/results/gov_drr.js @@ -70,13 +70,13 @@ export const declare_gov_drr_panel = () => declare_panel({ panel_key: "gov_drr", subject_types: ["gov"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ requires_result_counts: true, footnotes: ["RESULTS", "DRR"], title: text_maker("gov_drr_summary_title", { year: result_docs[current_drr_key].year, }), - source: (subject) => get_source_links(["DRR"]), + source: () => get_source_links(["DRR"]), calculate() { const verbose_gov_counts = ResultCounts.get_gov_counts(); diff --git a/client/src/panels/panel_declarations/results/result_components.js b/client/src/panels/panel_declarations/results/result_components.js index 47fd70802b..f19c5f54a8 100644 --- a/client/src/panels/panel_declarations/results/result_components.js +++ b/client/src/panels/panel_declarations/results/result_components.js @@ -242,7 +242,7 @@ const IndicatorList = ({ indicators }) => ( const QuadrantDefList = ({ defs }) => (
- {defs.map(({ key, val }, ix) => ( + {defs.map(({ key, val }) => (
{key}
@@ -318,12 +318,7 @@ const make_status_icons = (width) => { const large_status_icons = make_status_icons("41px"); const status_icons = make_status_icons("25px"); -const StatusIconTable = ({ - icon_counts, - onIconClick, - onClearClick, - active_list, -}) => ( +const StatusIconTable = ({ icon_counts, onIconClick, active_list }) => (
({ diff --git a/client/src/panels/panel_declarations/results/result_drilldown/result_displays.js b/client/src/panels/panel_declarations/results/result_drilldown/result_displays.js index 1d8dee7075..0dc07ab63e 100644 --- a/client/src/panels/panel_declarations/results/result_drilldown/result_displays.js +++ b/client/src/panels/panel_declarations/results/result_drilldown/result_displays.js @@ -117,10 +117,9 @@ export const fte_header = createSelector( export const ResultNodeContent = ({ node: { - data: { result, contributing_programs, result_subject, indicators }, + data: { contributing_programs }, children: indicator_nodes, }, - doc, }) => (
diff --git a/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown.js b/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown.js index 9136b66249..41a9e6ec7c 100644 --- a/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown.js +++ b/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown.js @@ -122,10 +122,10 @@ export const declare_explore_results_panel = () => declare_panel({ panel_key: "explore_results", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ footnotes: ["RESULTS", "DRR", "DP"], depends_on: ["programSpending", "programFtes"], - source: (subject) => get_source_links(["DP", "DRR"]), + source: () => get_source_links(["DP", "DRR"]), requires_result_counts: subject_type === "dept", requires_granular_result_counts: subject_type !== "dept", calculate(subject) { diff --git a/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown_display.js b/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown_display.js index 8d7c5c7445..b4d6cbd7ea 100644 --- a/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown_display.js +++ b/client/src/panels/panel_declarations/results/result_drilldown/result_drilldown_display.js @@ -121,7 +121,7 @@ const get_children_grouper = createSelector(_.identity, () => { return _.chain(children) .groupBy("data.type") .toPairs() - .sortBy(([type_key, group]) => !_.includes(["dr", "result"], type_key)) //make results show up first + .sortBy(([type_key, _group]) => !_.includes(["dr", "result"], type_key)) //make results show up first .map(([type_key, node_group]) => ({ display: get_type_name(type_key), node_group, diff --git a/client/src/panels/panel_declarations/results/result_drilldown/result_hierarchies.js b/client/src/panels/panel_declarations/results/result_drilldown/result_hierarchies.js index ce97b44025..31f73d1613 100644 --- a/client/src/panels/panel_declarations/results/result_drilldown/result_hierarchies.js +++ b/client/src/panels/panel_declarations/results/result_drilldown/result_hierarchies.js @@ -15,7 +15,7 @@ const { Result } = Results; const indicator_date_sorter = (ind) => ind.target_year ? ind.target_year + ind.target_month / 12 : Infinity; -function result_to_node(result, parent_id, doc) { +function result_to_node(result, parent_id) { return { data: { type: result.is_dr ? "dr" : "result", @@ -27,11 +27,7 @@ function result_to_node(result, parent_id, doc) { }; } -export function create_full_results_hierarchy({ - subject_guid, - doc, - allow_no_result_branches, -}) { +export function create_full_results_hierarchy({ subject_guid, doc }) { const get_resources = (subject) => results_resource_fragment(subject, doc); const root_subject = get_subject_instance_by_guid(subject_guid); diff --git a/client/src/panels/panel_declarations/results/result_drilldown/results_scheme.js b/client/src/panels/panel_declarations/results/result_drilldown/results_scheme.js index a41f62f6c7..2059a91102 100644 --- a/client/src/panels/panel_declarations/results/result_drilldown/results_scheme.js +++ b/client/src/panels/panel_declarations/results/result_drilldown/results_scheme.js @@ -143,7 +143,7 @@ export default class ResultsExplorer extends AbstractExplorerScheme { return _.chain(Indicator.get_flat_indicators(subject)) .filter({ doc: doc }) .groupBy("status_key") - .mapValues((group, status_key) => group.length) + .mapValues((group) => group.length) .value(); } ); diff --git a/client/src/panels/panel_declarations/results/result_flat_table.js b/client/src/panels/panel_declarations/results/result_flat_table.js index 1abf23b00a..ecfccc64b8 100644 --- a/client/src/panels/panel_declarations/results/result_flat_table.js +++ b/client/src/panels/panel_declarations/results/result_flat_table.js @@ -317,10 +317,10 @@ export const declare_results_table_panel = () => declare_panel({ panel_key: "results_flat_table", subject_types: ["dept", "crso", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ footnotes: ["RESULTS", "DRR"], depends_on: ["programSpending", "programFtes"], - source: (subject) => get_source_links(["DRR"]), + source: () => get_source_links(["DRR"]), requires_result_counts: subject_type === "dept", requires_granular_result_counts: subject_type !== "dept", title: text_maker("result_flat_table_title", { diff --git a/client/src/panels/panel_declarations/results/results_intro.js b/client/src/panels/panel_declarations/results/results_intro.js index c602744a4c..d4c0b3b2f0 100644 --- a/client/src/panels/panel_declarations/results/results_intro.js +++ b/client/src/panels/panel_declarations/results/results_intro.js @@ -94,11 +94,11 @@ export const declare_results_intro_panel = () => declare_panel({ panel_key: "results_intro", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ requires_result_counts: subject_type === "gov", requires_granular_result_counts: subject_type !== "gov", footnotes: ["RESULTS", "DRR", "DP"], - source: (subject) => get_source_links(["DP", "DRR"]), + source: () => get_source_links(["DP", "DRR"]), title: text_maker("results_intro_title"), calculate: (subject) => { const is_gov = subject.subject_type == "gov"; diff --git a/client/src/panels/panel_declarations/services/application_channels_by_services.js b/client/src/panels/panel_declarations/services/application_channels_by_services.js index 177d68c97b..47747f342b 100644 --- a/client/src/panels/panel_declarations/services/application_channels_by_services.js +++ b/client/src/panels/panel_declarations/services/application_channels_by_services.js @@ -286,7 +286,7 @@ export const declare_application_channels_by_services_panel = () => declare_panel({ panel_key: "application_channels_by_services", subject_types: ["dept", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("customizable_service_graph"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/provided_services_list.js b/client/src/panels/panel_declarations/services/provided_services_list.js index cbef98c9c3..e133b2e753 100644 --- a/client/src/panels/panel_declarations/services/provided_services_list.js +++ b/client/src/panels/panel_declarations/services/provided_services_list.js @@ -139,7 +139,7 @@ export const declare_provided_services_list_panel = () => declare_panel({ panel_key: "provided_services_list", subject_types: ["dept", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("list_of_provided_services_title"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/services_channels.js b/client/src/panels/panel_declarations/services/services_channels.js index c6f9ed15c5..06393f22c5 100644 --- a/client/src/panels/panel_declarations/services/services_channels.js +++ b/client/src/panels/panel_declarations/services/services_channels.js @@ -255,7 +255,7 @@ export const declare_services_channels_panel = () => declare_panel({ panel_key: "services_channels", subject_types: ["gov", "dept", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("services_channels_title"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/services_digital_status.js b/client/src/panels/panel_declarations/services/services_digital_status.js index 59930834ad..cca54ab96a 100644 --- a/client/src/panels/panel_declarations/services/services_digital_status.js +++ b/client/src/panels/panel_declarations/services/services_digital_status.js @@ -202,7 +202,7 @@ export const declare_services_digital_status_panel = () => declare_panel({ panel_key: "services_digital_status", subject_types: ["gov", "dept", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("services_digital_status"), calculate: (subject) => { return { diff --git a/client/src/panels/panel_declarations/services/services_intro.js b/client/src/panels/panel_declarations/services/services_intro.js index 7277abb07c..b93b9477d3 100644 --- a/client/src/panels/panel_declarations/services/services_intro.js +++ b/client/src/panels/panel_declarations/services/services_intro.js @@ -132,7 +132,7 @@ export const declare_services_intro_panel = () => declare_panel({ panel_key: "services_intro", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("services_intro_title"), calculate: (subject) => { return { diff --git a/client/src/panels/panel_declarations/services/services_standards.js b/client/src/panels/panel_declarations/services/services_standards.js index 8bb29e1302..878b8376e5 100644 --- a/client/src/panels/panel_declarations/services/services_standards.js +++ b/client/src/panels/panel_declarations/services/services_standards.js @@ -163,7 +163,7 @@ export const declare_services_standards_panel = () => declare_panel({ panel_key: "services_standards", subject_types: ["gov", "dept", "program"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("service_standards_title"), calculate: (subject) => { return { diff --git a/client/src/panels/panel_declarations/services/single_service_panels/service_channels.js b/client/src/panels/panel_declarations/services/single_service_panels/service_channels.js index ae71558cc7..655ed6df10 100644 --- a/client/src/panels/panel_declarations/services/single_service_panels/service_channels.js +++ b/client/src/panels/panel_declarations/services/single_service_panels/service_channels.js @@ -114,7 +114,7 @@ export const declare_single_service_channels_panel = () => declare_panel({ panel_key: "single_service_channels", subject_types: ["service"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("single_service_channels_title"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/single_service_panels/service_digital_status.js b/client/src/panels/panel_declarations/services/single_service_panels/service_digital_status.js index f7666a1dfa..5812e2dedb 100644 --- a/client/src/panels/panel_declarations/services/single_service_panels/service_digital_status.js +++ b/client/src/panels/panel_declarations/services/single_service_panels/service_digital_status.js @@ -85,7 +85,7 @@ export const declare_single_service_digital_status_panel = () => declare_panel({ panel_key: "single_service_digital_status", subject_types: ["service"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("digital_status"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/single_service_panels/service_overview.js b/client/src/panels/panel_declarations/services/single_service_panels/service_overview.js index 65cd40e85b..7bb14175ae 100644 --- a/client/src/panels/panel_declarations/services/single_service_panels/service_overview.js +++ b/client/src/panels/panel_declarations/services/single_service_panels/service_overview.js @@ -176,7 +176,7 @@ export const declare_single_service_overview_panel = () => declare_panel({ panel_key: "single_service_overview", subject_types: ["service"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("service_overview_title"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/single_service_panels/service_standards.js b/client/src/panels/panel_declarations/services/single_service_panels/service_standards.js index f17a01d6bf..51fe5fed0c 100644 --- a/client/src/panels/panel_declarations/services/single_service_panels/service_standards.js +++ b/client/src/panels/panel_declarations/services/single_service_panels/service_standards.js @@ -239,7 +239,7 @@ export const declare_single_service_standards_panel = () => declare_panel({ panel_key: "single_service_standards", subject_types: ["service"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: () => ({ title: text_maker("service_standards_title"), footnotes: false, source: () => get_source_links(["SERVICES"]), diff --git a/client/src/panels/panel_declarations/services/subject_offering_services.js b/client/src/panels/panel_declarations/services/subject_offering_services.js index 655db377bb..be16295b8a 100644 --- a/client/src/panels/panel_declarations/services/subject_offering_services.js +++ b/client/src/panels/panel_declarations/services/subject_offering_services.js @@ -109,7 +109,7 @@ export const declare_subject_offering_services_panel = () => declare_panel({ panel_key: "subject_offering_services", subject_types: ["gov", "dept"], - panel_config_func: (subject_type, panel_key) => ({ + panel_config_func: (subject_type) => ({ title: subject_type === "gov" ? text_maker("subject_offering_services_title") diff --git a/client/src/rpb/TablePicker.js b/client/src/rpb/TablePicker.js index 3d87f4be1b..c1b507b065 100644 --- a/client/src/rpb/TablePicker.js +++ b/client/src/rpb/TablePicker.js @@ -208,7 +208,7 @@ class TaggedItemCloud extends React.Component { noItemsMessage, } = this.props; - const flat_items = _.map(items, ({ display, id, description }) => ( + const flat_items = _.map(items, ({ display, id }) => (
{display}
@@ -261,7 +261,7 @@ class TaggedItemCloud extends React.Component { const item_column_count = 3; const items_split = _.chain(flat_items) .map((item, ix) => ({ item, ix })) - .groupBy(({ item, ix }) => ix % item_column_count) + .groupBy(({ ix }) => ix % item_column_count) .map((group) => _.map(group, "item")) // placeholder groups containing empty divs added so that exiting groups' columns will transition out .thru((item_split) => diff --git a/client/src/rpb/index.js b/client/src/rpb/index.js index 24329125e8..97b24a5000 100644 --- a/client/src/rpb/index.js +++ b/client/src/rpb/index.js @@ -121,7 +121,7 @@ class RPB extends React.Component { }, on_switch_table: (table_id) => { - this.setState((prevState, props) => { + this.setState((prevState) => { return { ...prevState, ...get_default_state_for_new_table(table_id), diff --git a/client/src/rpb/shared.js b/client/src/rpb/shared.js index 53144bcc1a..459267d6ca 100644 --- a/client/src/rpb/shared.js +++ b/client/src/rpb/shared.js @@ -17,18 +17,7 @@ import { secondaryColor } from "src/style_constants/index"; import { TextMaker } from "./rpb_text_provider"; -const ReportDetails = ({ - table, - dimension, - filter, - preferDeptBreakout, - mode, - subject, - columns, - preferTable, - def_ready_columns, - footnotes, -}) => { +const ReportDetails = ({ table, def_ready_columns, footnotes }) => { const { title: table_title, description: table_description } = table; return ( @@ -77,7 +66,7 @@ const ReportDetails = ({ ); }; -const ReportDatasets = ({ table, subject }) => { +const ReportDatasets = ({ table }) => { const dataset_spans = table.link[lang] && [ diff --git a/client/src/search/search_configs.js b/client/src/search/search_configs.js index fe41e84d45..09b37d603e 100644 --- a/client/src/search/search_configs.js +++ b/client/src/search/search_configs.js @@ -33,7 +33,7 @@ const get_re_matcher = (accessors, search_phrase) => (obj) => { .value(); }; -function create_re_matcher(search_phrase, accessors, config_name) { +function create_re_matcher(search_phrase, accessors) { const re_matcher = get_re_matcher(accessors, search_phrase); const nonce = _.random(0.1, 1.1); diff --git a/client/src/search/search_utils.tsx b/client/src/search/search_utils.tsx index bed4a49bb8..5361f32d1b 100644 --- a/client/src/search/search_utils.tsx +++ b/client/src/search/search_utils.tsx @@ -70,7 +70,7 @@ const SearchHighlighter = ({ ); }; -const format_data = ( +const format_data = ( name_function: (data: Data) => string, menu_content_function: | undefined diff --git a/client/src/tables/orgEmployeeAgeGroup.js b/client/src/tables/orgEmployeeAgeGroup.js index 60f856f894..9cf6c75f7b 100644 --- a/client/src/tables/orgEmployeeAgeGroup.js +++ b/client/src/tables/orgEmployeeAgeGroup.js @@ -101,7 +101,7 @@ export default { }, }, - sort: function (mapped_rows, lang) { + sort: function (mapped_rows) { return _.sortBy(mapped_rows, function (row) { var split = row.age.replace(/>| { + _.each(std_years, (header) => { this.add_col({ type: "dollar", nick: header, @@ -73,7 +73,7 @@ export default { }); }, - sort: function (rows, lang) { + sort: function (rows) { return _.sortBy(rows, function (row) { return row.so_num; }); diff --git a/client/src/tables/orgTransferPayments.js b/client/src/tables/orgTransferPayments.js index c90df93f44..3a34e0af47 100644 --- a/client/src/tables/orgTransferPayments.js +++ b/client/src/tables/orgTransferPayments.js @@ -84,7 +84,7 @@ export default { }, }, ]); - _.each(std_years, (header, i) => { + _.each(std_years, (header) => { this.add_col(header).add_child([ { type: "big_int", @@ -120,7 +120,7 @@ export default { }, }, - sort: function (mapped_rows, lang) { + sort: function (mapped_rows) { return _.sortBy(mapped_rows, function (row) { return [row.type, row.tp]; }); diff --git a/client/src/tables/orgTransferPaymentsRegion.js b/client/src/tables/orgTransferPaymentsRegion.js index 69996e6ab4..98a89fa7ea 100644 --- a/client/src/tables/orgTransferPaymentsRegion.js +++ b/client/src/tables/orgTransferPaymentsRegion.js @@ -57,7 +57,7 @@ export default { }, can_group_by: true, }); - _.each(tp_by_region_years, (header, ix) => { + _.each(tp_by_region_years, (header) => { this.add_col({ type: "big_int", nick: header, @@ -76,7 +76,7 @@ export default { return [org_id, prov_code, prov_text, ...values]; }, - sort: (mapped_rows, lang) => + sort: (mapped_rows) => _.sortBy(mapped_rows, (row) => { if (row.region === provinces.abroad.text) { return "Z"; diff --git a/client/src/tables/orgVoteStatEstimates.js b/client/src/tables/orgVoteStatEstimates.js index 2090a0a2eb..5567e6b1c5 100644 --- a/client/src/tables/orgVoteStatEstimates.js +++ b/client/src/tables/orgVoteStatEstimates.js @@ -116,7 +116,7 @@ export default { }, can_group_by: true, }); - _.each(estimates_years, (yr, ix) => { + _.each(estimates_years, (yr) => { this.add_col({ type: "dollar", nick: yr + "_estimates", @@ -206,7 +206,7 @@ export default { }, }, - sort: function (mapped_rows, lang) { + sort: function (mapped_rows) { var grps = _.groupBy(mapped_rows, function (row) { return _.isNumber(row.votenum); }); diff --git a/client/src/tables/orgVoteStatPa.js b/client/src/tables/orgVoteStatPa.js index 95eac28a0c..f4f1ec9c6b 100644 --- a/client/src/tables/orgVoteStatPa.js +++ b/client/src/tables/orgVoteStatPa.js @@ -116,7 +116,7 @@ export default { }, }, ]); - _.each(std_years, (header, i) => { + _.each(std_years, (header) => { this.add_col(header).add_child([ { type: "big_int", @@ -167,7 +167,7 @@ export default { }, }, - sort: function (mapped_rows, lang) { + sort: function (mapped_rows) { var grps = _.groupBy(mapped_rows, function (row) { return _.isNumber(row.votenum); }); diff --git a/client/src/tables/programFtes.js b/client/src/tables/programFtes.js index 50e98b3b63..4d2aec9b21 100644 --- a/client/src/tables/programFtes.js +++ b/client/src/tables/programFtes.js @@ -71,7 +71,7 @@ export default { }, can_group_by: true, }); - _.each(std_years, (header, ix) => { + _.each(std_years, (header) => { this.add_col({ type: "decimal2", nick: header, @@ -118,7 +118,7 @@ export default { }); }, - sort: function (mapped_rows, lang) { + sort: function (mapped_rows) { return _.sortBy(mapped_rows, function (row) { return [row.goco_gov, row.goco]; }); diff --git a/client/src/tables/programSobjs.js b/client/src/tables/programSobjs.js index 4c95f07b62..6bec74257c 100644 --- a/client/src/tables/programSobjs.js +++ b/client/src/tables/programSobjs.js @@ -83,7 +83,7 @@ export default { }); }); }, - sort(rows, lang) { + sort(rows) { return _.sortBy(rows, (row) => row.so_num); }, mapper(row) { diff --git a/client/src/tables/programSpending.js b/client/src/tables/programSpending.js index d1ff62b91e..95a25d8f6d 100644 --- a/client/src/tables/programSpending.js +++ b/client/src/tables/programSpending.js @@ -72,7 +72,7 @@ export default { can_group_by: true, }, ]); - _.each(std_years, (header, ix) => { + _.each(std_years, (header) => { //TODO: the col definitions here are copied from orgVoteStatPa, either change them or make it DRY this.add_col(header).add_child([ { @@ -137,7 +137,7 @@ export default { }); }, - sort: function (mapped_rows, lang) { + sort: function (mapped_rows) { return _.sortBy(mapped_rows, function (row) { return row.prgm; }); diff --git a/client/src/tables/programVoteStat.js b/client/src/tables/programVoteStat.js index 86a650a37f..e602fcf090 100644 --- a/client/src/tables/programVoteStat.js +++ b/client/src/tables/programVoteStat.js @@ -77,7 +77,7 @@ export default { }); }); }, - sort: function (rows, lang) { + sort: function (rows) { return _.sortBy(rows, function (row) { return row.so_num; }); diff --git a/client/src/types/global.d.ts b/client/src/types/global.d.ts index 583ea9f313..7d1f37ca66 100644 --- a/client/src/types/global.d.ts +++ b/client/src/types/global.d.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-unused-vars */ +/* eslint-disable @typescript-eslint/no-unused-vars */ // Global types: type LangType = "en" | "fr"; diff --git a/form_backend/.eslintignore b/form_backend/.eslintignore deleted file mode 100644 index f9b9c1f764..0000000000 --- a/form_backend/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -coverage/* -transpiled_build/* \ No newline at end of file diff --git a/form_backend/scripts/extract_data/generate_csv.integration-test.js b/form_backend/scripts/extract_data/generate_csv.integration-test.js index 1c3aa5b6fc..0d861a8aa0 100644 --- a/form_backend/scripts/extract_data/generate_csv.integration-test.js +++ b/form_backend/scripts/extract_data/generate_csv.integration-test.js @@ -5,7 +5,7 @@ import { connect_db } from "../../src/db_utils/connect_db.js"; import { make_mongoose_model_from_original_template } from "../../src/db_utils/write_to_db.js"; import { get_templates } from "../../src/template_utils/index.js"; -import { get_csv_strings } from "./generate_csv"; +import { get_csv_strings } from "./generate_csv.js"; //Make sure there is test data to work with const test_template_name = "test_template.test"; diff --git a/form_backend/scripts/extract_data/generate_csv.js b/form_backend/scripts/extract_data/generate_csv.js index fbf9dcb30e..a543082928 100644 --- a/form_backend/scripts/extract_data/generate_csv.js +++ b/form_backend/scripts/extract_data/generate_csv.js @@ -1,6 +1,6 @@ import fs from "fs"; -import { Parser } from "json2csv"; +import { Parser } from "json2csv"; // eslint-disable-line node/no-unpublished-import import _ from "lodash"; import mongoose from "mongoose"; @@ -33,7 +33,7 @@ async function extractor() { if (collection.length > 0) { const template_name = _.keys(templates)[index]; - const flattened_form_logs = _.map(collection, function (sub, ind) { + const flattened_form_logs = _.map(collection, function (sub) { return _.chain( _.reduce( sub._doc, diff --git a/form_backend/src/throttle_requests_by_client.unit-test.js b/form_backend/src/throttle_requests_by_client.unit-test.js index b0b4793a35..a564b11789 100644 --- a/form_backend/src/throttle_requests_by_client.unit-test.js +++ b/form_backend/src/throttle_requests_by_client.unit-test.js @@ -1,7 +1,7 @@ import { throttle_requests_by_client } from "./throttle_requests_by_client.js"; const promise_timeout = (time) => { - return new Promise((resolve, reject) => { + return new Promise((resolve, _reject) => { setTimeout(() => resolve(time), time); }); }; diff --git a/package-lock.json b/package-lock.json index a8d7d58a13..b30e7f4e55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,14 +8,14 @@ "license": "MIT", "devDependencies": { "@babel/eslint-parser": "^7.14.2", - "eslint": "^7.12.1", - "eslint-plugin-import": "^2.22.1", + "eslint": "^8.5.0", + "eslint-plugin-import": "^2.25.1", "eslint-plugin-jest": "^25.2.4", "eslint-plugin-lodash": "^7.1.0", "eslint-plugin-node": "^11.0.0", "husky": "^6.0.0", "jest-test-gen": "^0.0.6", - "prettier": "^2.3.0" + "prettier": "^2.5" } }, "node_modules/@babel/code-frame": { @@ -325,6 +325,7 @@ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", "dev": true, + "peer": true, "engines": { "node": ">=6.9.0" } @@ -359,6 +360,7 @@ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, + "peer": true, "dependencies": { "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", @@ -432,29 +434,29 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz", - "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", - "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -466,6 +468,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -648,9 +670,9 @@ } }, "node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -660,9 +682,9 @@ } }, "node_modules/acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -707,6 +729,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "peer": true, "dependencies": { "color-convert": "^1.9.0" }, @@ -715,25 +738,22 @@ } }, "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", + "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", + "es-abstract": "^1.19.1", "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" + "is-string": "^1.0.7" }, "engines": { "node": ">= 0.4" @@ -752,14 +772,14 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", + "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "es-abstract": "^1.19.0" }, "engines": { "node": ">= 0.4" @@ -768,15 +788,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "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/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -867,6 +878,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "peer": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -881,6 +893,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "peer": true, "dependencies": { "color-name": "1.1.3" } @@ -889,7 +902,8 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "dev": true, + "peer": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -996,12 +1010,6 @@ "dev": true, "peer": true }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -1014,32 +1022,27 @@ "node": ">=8.6" } }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, "node_modules/es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -1085,41 +1088,42 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true, + "peer": true, "engines": { "node": ">=0.8.0" } }, "node_modules/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.5.0.tgz", + "integrity": "sha512-tVGSkgNbOfiHyVte8bCM8OmX+xG9PzVG/B4UCF60zx7j61WIVY/AqJECDgpLD4DbbESD0e174gOg3ZlrX15GDg==", "dev": true, "dependencies": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.2", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "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.1", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -1127,11 +1131,10 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -1139,44 +1142,39 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "dependencies": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, - "node_modules/eslint-import-resolver-node/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/eslint-module-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", - "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", + "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", "dev": true, "dependencies": { "debug": "^3.2.7", + "find-up": "^2.1.0", "pkg-dir": "^2.0.0" }, "engines": { @@ -1212,32 +1210,30 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.23.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz", - "integrity": "sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", + "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", "dev": true, "dependencies": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", + "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.4", - "eslint-module-utils": "^2.6.1", - "find-up": "^2.0.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.1", "has": "^1.0.3", - "is-core-module": "^2.4.0", + "is-core-module": "^2.8.0", + "is-glob": "^4.0.3", "minimatch": "^3.0.4", - "object.values": "^1.1.3", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", + "object.values": "^1.1.5", "resolve": "^1.20.0", - "tsconfig-paths": "^3.9.0" + "tsconfig-paths": "^3.11.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, "node_modules/eslint-plugin-import/node_modules/debug": { @@ -1381,15 +1377,6 @@ "node": ">=4" } }, - "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/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1451,7 +1438,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/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": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint/node_modules/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==", @@ -1460,6 +1478,36 @@ "node": ">=10" } }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/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/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/eslint/node_modules/globals": { "version": "13.9.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", @@ -1497,30 +1545,26 @@ } }, "node_modules/espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", "dev": true, "dependencies": { - "acorn": "^7.4.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.1.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/esquery": { @@ -1723,6 +1767,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", @@ -1794,12 +1854,6 @@ "node": ">= 4" } }, - "node_modules/graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -1826,6 +1880,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true, + "peer": true, "engines": { "node": ">=4" } @@ -1842,11 +1897,20 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/husky": { "version": "6.0.0", @@ -1910,28 +1974,40 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } }, "node_modules/is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -1941,9 +2017,9 @@ } }, "node_modules/is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true, "engines": { "node": ">= 0.4" @@ -1953,9 +2029,9 @@ } }, "node_modules/is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -1965,10 +2041,13 @@ } }, "node_modules/is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -1985,15 +2064,6 @@ "node": ">=0.10.0" } }, - "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/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -2007,9 +2077,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" @@ -2028,10 +2098,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2040,13 +2113,13 @@ } }, "node_modules/is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -2055,11 +2128,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2082,6 +2167,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2109,16 +2206,16 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "peer": true }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -2137,12 +2234,6 @@ "node": ">=4" } }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -2180,30 +2271,6 @@ "node": ">= 0.8.0" } }, - "node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/load-json-file/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -2223,24 +2290,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "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/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -2312,31 +2367,10 @@ "dev": true, "peer": true }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/object-inspect": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", - "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2370,14 +2404,14 @@ } }, "node_modules/object.values": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", - "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" + "es-abstract": "^1.19.1" }, "engines": { "node": ">= 0.4" @@ -2457,23 +2491,10 @@ "node": ">=6" } }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true, "engines": { "node": ">=4" @@ -2503,27 +2524,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-type/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -2555,18 +2555,6 @@ "node": ">=4" } }, - "node_modules/pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "dependencies": { - "find-up": "^2.1.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -2577,9 +2565,9 @@ } }, "node_modules/prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", - "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", + "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -2626,33 +2614,6 @@ } ] }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", @@ -2665,15 +2626,6 @@ "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -2787,6 +2739,20 @@ "node": ">=8" } }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -2806,58 +2772,6 @@ "node": ">=0.10.0" } }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -2922,6 +2836,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "peer": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -2929,95 +2844,6 @@ "node": ">=4" } }, - "node_modules/table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "dependencies": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/table/node_modules/ajv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.0.tgz", - "integrity": "sha512-cnUG4NSBiM4YFBxgZIj/In3/6KX+rQ2l2YPRVcvAMQGWEPKuXoPIhxzwqh31jA3IPbI4qEOp/5ILI4ynioXsGQ==", - "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/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/table/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/table/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "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/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/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -3047,9 +2873,9 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", + "integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", @@ -3146,16 +2972,6 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3445,7 +3261,8 @@ "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true + "dev": true, + "peer": true }, "@babel/helper-validator-option": { "version": "7.14.5", @@ -3471,6 +3288,7 @@ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, + "peer": true, "requires": { "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", @@ -3526,26 +3344,26 @@ } }, "@eslint/eslintrc": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz", - "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz", + "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", + "debug": "^4.3.2", + "espree": "^9.2.0", "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" }, "dependencies": { "globals": { - "version": "13.9.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", - "integrity": "sha512-74/FduwI/JaIrr1H8e71UbDE+5x7pIPs1C2rrwC52SszOo043CsWOZEMW7o2Y58xwm9b+0RBKDxY5n2sUpEFxA==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -3553,6 +3371,23 @@ } } }, + "@humanwhocodes/config-array": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", + "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -3672,15 +3507,15 @@ } }, "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==", "dev": true }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "requires": {} }, @@ -3713,30 +3548,28 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "peer": true, "requires": { "color-convert": "^1.9.0" } }, "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", + "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", + "es-abstract": "^1.19.1", "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" + "is-string": "^1.0.7" } }, "array-union": { @@ -3746,22 +3579,16 @@ "dev": true }, "array.prototype.flat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", + "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "es-abstract": "^1.19.0" } }, - "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 - }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -3829,6 +3656,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "peer": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -3840,6 +3668,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "peer": true, "requires": { "color-name": "1.1.3" } @@ -3848,7 +3677,8 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "dev": true, + "peer": true }, "concat-map": { "version": "0.0.1", @@ -3934,12 +3764,6 @@ "dev": true, "peer": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -3949,32 +3773,27 @@ "ansi-colors": "^4.1.1" } }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, "es-abstract": { - "version": "1.18.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz", - "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", "dev": true, "requires": { "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", "has": "^1.0.3", "has-symbols": "^1.0.2", - "is-callable": "^1.2.3", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.10.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", "object.assign": "^4.1.2", "string.prototype.trimend": "^1.0.4", @@ -4004,39 +3823,40 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "dev": true, + "peer": true }, "eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-UMfH0VSjP0G4p3EWirscJEQ/cHqnT/iuH6oNZOB94nBjWbMnhGEPxsZm1eyIW0C/9jLI0Fow4W5DXLjEI7mn1g==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.5.0.tgz", + "integrity": "sha512-tVGSkgNbOfiHyVte8bCM8OmX+xG9PzVG/B4UCF60zx7j61WIVY/AqJECDgpLD4DbbESD0e174gOg3ZlrX15GDg==", "dev": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.2", + "@eslint/eslintrc": "^1.0.5", + "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "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.1", + "eslint-scope": "^7.1.0", + "eslint-utils": "^3.0.0", + "eslint-visitor-keys": "^3.1.0", + "espree": "^9.2.0", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", + "glob-parent": "^6.0.1", "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", @@ -4044,24 +3864,14 @@ "natural-compare": "^1.4.0", "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^3.1.0", + "regexpp": "^3.2.0", "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, "dependencies": { - "@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" - } - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -4102,12 +3912,54 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, + "eslint-scope": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz", + "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "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" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true + } + } + }, "eslint-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==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "globals": { "version": "13.9.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.9.0.tgz", @@ -4135,39 +3987,34 @@ } }, "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "eslint-module-utils": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz", - "integrity": "sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz", + "integrity": "sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ==", "dev": true, "requires": { "debug": "^3.2.7", + "find-up": "^2.1.0", "pkg-dir": "^2.0.0" }, "dependencies": { @@ -4193,26 +4040,24 @@ } }, "eslint-plugin-import": { - "version": "2.23.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz", - "integrity": "sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ==", + "version": "2.25.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz", + "integrity": "sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==", "dev": true, "requires": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", + "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.4", - "eslint-module-utils": "^2.6.1", - "find-up": "^2.0.0", + "eslint-import-resolver-node": "^0.3.6", + "eslint-module-utils": "^2.7.1", "has": "^1.0.3", - "is-core-module": "^2.4.0", + "is-core-module": "^2.8.0", + "is-glob": "^4.0.3", "minimatch": "^3.0.4", - "object.values": "^1.1.3", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", + "object.values": "^1.1.5", "resolve": "^1.20.0", - "tsconfig-paths": "^3.9.0" + "tsconfig-paths": "^3.11.0" }, "dependencies": { "debug": { @@ -4313,22 +4158,24 @@ "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.2.0.tgz", + "integrity": "sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg==", "dev": true, "requires": { - "acorn": "^7.4.0", + "acorn": "^8.6.0", "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "eslint-visitor-keys": "^3.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz", + "integrity": "sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA==", + "dev": true + } } }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, "esquery": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", @@ -4494,6 +4341,16 @@ "has-symbols": "^1.0.1" } }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", @@ -4546,12 +4403,6 @@ } } }, - "graceful-fs": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", - "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", - "dev": true - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4571,7 +4422,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "dev": true, + "peer": true }, "has-symbols": { "version": "1.0.2", @@ -4579,11 +4431,14 @@ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", "dev": true }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } }, "husky": { "version": "6.0.0", @@ -4629,47 +4484,59 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } }, "is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", - "dev": true + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } }, "is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "requires": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, "is-callable": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, "is-core-module": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", - "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz", + "integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==", "dev": true, "requires": { "has": "^1.0.3" } }, "is-date-object": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", - "dev": true + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-extglob": { "version": "2.1.1", @@ -4677,12 +4544,6 @@ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", "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", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -4693,9 +4554,9 @@ } }, "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, "is-number": { @@ -4705,27 +4566,39 @@ "dev": true }, "is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-regex": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", - "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "requires": { "call-bind": "^1.0.2", - "has-symbols": "^1.0.2" + "has-tostringtag": "^1.0.0" } }, - "is-string": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", "dev": true }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", @@ -4735,6 +4608,15 @@ "has-symbols": "^1.0.2" } }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -4756,16 +4638,16 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "peer": true }, "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" } }, "jsesc": { @@ -4775,12 +4657,6 @@ "dev": true, "peer": true }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4812,26 +4688,6 @@ "type-check": "~0.4.0" } }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -4848,24 +4704,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "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 - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4925,30 +4769,10 @@ "dev": true, "peer": true }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, "object-inspect": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", - "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", "dev": true }, "object-keys": { @@ -4970,14 +4794,14 @@ } }, "object.values": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", - "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", + "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" + "es-abstract": "^1.19.1" } }, "once": { @@ -5036,16 +4860,6 @@ "callsites": "^3.0.0" } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -5070,23 +4884,6 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, "picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -5109,15 +4906,6 @@ "find-up": "^2.1.0" } }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } - }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -5125,9 +4913,9 @@ "dev": true }, "prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.1.tgz", - "integrity": "sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", + "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", "dev": true }, "progress": { @@ -5148,39 +4936,12 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -5252,6 +5013,17 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -5265,55 +5037,6 @@ "dev": true, "peer": true }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz", - "integrity": "sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, "string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -5360,79 +5083,11 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "peer": true, "requires": { "has-flag": "^3.0.0" } }, - "table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.0.tgz", - "integrity": "sha512-cnUG4NSBiM4YFBxgZIj/In3/6KX+rQ2l2YPRVcvAMQGWEPKuXoPIhxzwqh31jA3IPbI4qEOp/5ILI4ynioXsGQ==", - "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" - } - }, - "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" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "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 - }, - "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" - } - } - } - }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5456,9 +5111,9 @@ } }, "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", + "integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==", "dev": true, "requires": { "@types/json5": "^0.0.29", @@ -5530,16 +5185,6 @@ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 2bf4e1c863..b45716d859 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,11 @@ "name": "infobase-monorepo", "description": "", "scripts": { - "prettier_write": "prettier --write", - "prettier_check": "prettier --check", + "prettier": "prettier --check .", + "prettier:write": "prettier --write --loglevel warn .", + "eslint": "eslint --max-warnings 0 --cache .", + "eslint:fix": "eslint --fix .", + "posteslint:fix": "npm run prettier:write", "prod_deploy": "sh scripts/prod_scripts/prod_deploy.sh", "prod_rollback": "sh scripts/prod_scripts/prod_rollback.sh", "infobase_tmux_init": "npm run tmux_env", @@ -19,13 +22,13 @@ "license": "MIT", "devDependencies": { "@babel/eslint-parser": "^7.14.2", - "eslint": "^7.12.1", - "eslint-plugin-import": "^2.22.1", + "eslint": "^8.5.0", + "eslint-plugin-import": "^2.25.1", "eslint-plugin-jest": "^25.2.4", "eslint-plugin-lodash": "^7.1.0", "eslint-plugin-node": "^11.0.0", "husky": "^6.0.0", "jest-test-gen": "^0.0.6", - "prettier": "^2.3.0" + "prettier": "^2.5" } } diff --git a/prettier.config.cjs b/prettier.config.cjs index b7b612cdf0..e1aa8c1e81 100644 --- a/prettier.config.cjs +++ b/prettier.config.cjs @@ -6,7 +6,6 @@ module.exports = { quoteProps: "as-needed", trailingComma: "es5", bracketSpacing: true, - jsxBracketSameLine: false, arrowParens: "always", proseWrap: "never", endOfLine: "auto", diff --git a/scripts/.eslintrc.json b/scripts/.eslintrc.json new file mode 100644 index 0000000000..bfa7661cb3 --- /dev/null +++ b/scripts/.eslintrc.json @@ -0,0 +1,25 @@ +{ + "plugins": ["node"], + "extends": ["../.eslintrc.json", "plugin:node/recommended"], + "parserOptions": { + "requireConfigFile": false, + "ecmaFeatures": { + "experimentalDecorators": true + }, + "sourceType": "module", + "allowImportExportEverywhere": true + }, + "env": { + "node": true + }, + "rules": { + "node/no-unsupported-features/es-syntax": [ + "error", + { "ignores": ["modules"] } + ], + "no-console": 0 + }, + "globals": { + "process": true + } +} diff --git a/scripts/ci_scripts/cleanup_dev_dbs.js b/scripts/ci_scripts/cleanup_dev_dbs.js index 804d50d908..03ff0c0c59 100644 --- a/scripts/ci_scripts/cleanup_dev_dbs.js +++ b/scripts/ci_scripts/cleanup_dev_dbs.js @@ -1,4 +1,4 @@ -const active_db_names = active_branches +const active_db_names = active_branches // eslint-disable-line no-undef .replace(/^[ ]*origin\//g, "") .replace(/\n[ ]*origin\//g, ",") .split(","); @@ -6,26 +6,27 @@ const meta_db_names = ["admin", "local"]; const dbs_to_retain = active_db_names.concat(meta_db_names); +// eslint-disable-next-line no-undef const all_dev_db_names = db.adminCommand({ listDatabases: 1, nameOnly: true, }).databases; let nothing_to_drop = true; -for (i = 0; i < all_dev_db_names.length; i++) { +for (let i = 0; i < all_dev_db_names.length; i++) { const db_name = all_dev_db_names[i].name; // Double underscore branch names are exempt from automatic clean up if ( !dbs_to_retain.includes(db_name) && !/(^__)|(^archived__)/.test(db_name) ) { - print(`Droping stale dev DB "${db_name}"`); - db.getSiblingDB(db_name).dropDatabase(); + print(`Droping stale dev DB "${db_name}"`); // eslint-disable-line no-undef + db.getSiblingDB(db_name).dropDatabase(); // eslint-disable-line no-undef nothing_to_drop = false; } } if (nothing_to_drop) { - print("No stale dev DBs to drop"); + print("No stale dev DBs to drop"); // eslint-disable-line no-undef } diff --git a/scripts/prod_scripts/mongo_post_deploy_cleanup.js b/scripts/prod_scripts/mongo_post_deploy_cleanup.js index 2563d7e75f..32f52f9953 100644 --- a/scripts/prod_scripts/mongo_post_deploy_cleanup.js +++ b/scripts/prod_scripts/mongo_post_deploy_cleanup.js @@ -1,6 +1,6 @@ // Update prod db metadata after a deploy, delete outgoing rollback db -const metadata_db = db.getSiblingDB("metadata"); +const metadata_db = db.getSiblingDB("metadata"); // eslint-disable-line no-undef const previous_metadata_collection = metadata_db.metadata; @@ -11,9 +11,9 @@ previous_metadata_collection.drop(); // Create and populate the new metadata collection metadata_db.metadata.insertOne({ - prod: new_prod_db_name, + prod: new_prod_db_name, // eslint-disable-line no-undef rollback: previous_metadata.prod, }); // Drop the previous rollback db -db.getSiblingDB(previous_metadata.rollback).dropDatabase(); +db.getSiblingDB(previous_metadata.rollback).dropDatabase(); // eslint-disable-line no-undef diff --git a/scripts/prod_scripts/mongo_post_rollback_cleanup.js b/scripts/prod_scripts/mongo_post_rollback_cleanup.js index 34e3c2560c..864e1f20d2 100644 --- a/scripts/prod_scripts/mongo_post_rollback_cleanup.js +++ b/scripts/prod_scripts/mongo_post_rollback_cleanup.js @@ -1,6 +1,6 @@ // Update metadata following a rollback -const metadata_db = db.getSiblingDB("metadata"); +const metadata_db = db.getSiblingDB("metadata"); // eslint-disable-line no-undef const current_metadata_collection = metadata_db.metadata; diff --git a/server/.eslintignore b/server/.eslintignore deleted file mode 100644 index fa48aa2570..0000000000 --- a/server/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -transpiled_build/* \ No newline at end of file diff --git a/server/src/app.js b/server/src/app.js index 84fddbc1d9..c829da3c1c 100644 --- a/server/src/app.js +++ b/server/src/app.js @@ -70,7 +70,7 @@ app.use((req, res, next) => { next(); }); -app.use(function (err, req, res, next) { +app.use(function (err, req, res, _next) { console.error(err.stack); res.status(500).send("Internal server error"); }); diff --git a/server/src/models/core_subject/models.js b/server/src/models/core_subject/models.js index c1facecccb..1f32e6524c 100644 --- a/server/src/models/core_subject/models.js +++ b/server/src/models/core_subject/models.js @@ -12,6 +12,29 @@ import { parent_fkey_type, } from "../model_utils.js"; +const create_searcher = (model) => async (query, lang) => { + const records = await model.find( + { + $text: { + $search: query, + $language: lang === "en" ? "english" : "french", + $caseSensitive: false, + $diacriticSensitive: false, + }, + }, + { score: { $meta: "textScore" } } + ); + + return _.chain(records) + .map((row) => ({ + record: row, + score: row._doc.score, + })) + .sortBy("score") + .reverse() + .value(); +}; + export default function define_core_subjects(model_singleton) { const OrgSchema = new mongoose.Schema({ org_id: pkey_type(), @@ -178,26 +201,3 @@ export default function define_core_subjects(model_singleton) { model_singleton.define_service("search_crsos", search_crsos); model_singleton.define_service("search_subjects", search_subjects); } - -const create_searcher = (model) => async (query, lang) => { - const records = await model.find( - { - $text: { - $search: query, - $language: lang === "en" ? "english" : "french", - $caseSensitive: false, - $diacriticSensitive: false, - }, - }, - { score: { $meta: "textScore" } } - ); - - return _.chain(records) - .map((row) => ({ - record: row, - score: row._doc.score, - })) - .sortBy("score") - .reverse() - .value(); -}; diff --git a/server/src/models/finances/schema.js b/server/src/models/finances/schema.js index 56693ac634..0aa92e4fd3 100644 --- a/server/src/models/finances/schema.js +++ b/server/src/models/finances/schema.js @@ -113,7 +113,7 @@ const schema = ` } `; -export default function ({ models, loaders }) { +export default function ({ loaders }) { const { orgVoteStatPa_loader, orgVoteStatEstimates_loader, diff --git a/server/src/models/people/schema.js b/server/src/models/people/schema.js index 211f229af2..d7a269e5f5 100644 --- a/server/src/models/people/schema.js +++ b/server/src/models/people/schema.js @@ -46,7 +46,7 @@ const schema = ` } `; -export default function ({ models, loaders }) { +export default function ({ loaders }) { const { org_people_data_loader, gov_people_summary_loader } = loaders; const resolvers = { Org: { diff --git a/server/src/models/results/populate.js b/server/src/models/results/populate.js index d5d19cab37..de1d60b9ae 100644 --- a/server/src/models/results/populate.js +++ b/server/src/models/results/populate.js @@ -11,6 +11,76 @@ import { const doc_keys = [...drr_docs, ...dp_docs]; const valid_doc_filter = ({ doc }) => _.includes(doc_keys, doc); +const counts_from_indicators = (indicators) => + _.chain(indicators) + .map(({ doc, result_id, status_key }) => ({ + [`${doc}_results`]: result_id, + [`${doc}_indicators${status_key === "dp" ? "" : `_${status_key}`}`]: 1, + })) + .thru((indicator_count_fragments) => { + const count_keys = _.chain(indicator_count_fragments) + .flatMap(_.keys) + .uniq() + .value(); + + return _.chain(indicator_count_fragments) + .reduce( + (memo, count_fragment) => { + _.each(count_fragment, (value, key) => + _.isArray(memo[key]) ? memo[key].push(value) : memo[key]++ + ); + return memo; + }, + _.chain(count_keys) + .map((key) => (_.endsWith(key, "_results") ? [key, []] : [key, 0])) + .fromPairs() + .value() + ) + .mapValues((value) => (_.isArray(value) ? _.uniq(value).length : value)) + .value(); + }) + .value(); + +const get_result_count_records = (results, indicators) => { + const indicators_by_result_id = _.groupBy(indicators, "result_id"); + + const gov_row = { + subject_id: "total", + level: "all", + ...counts_from_indicators(indicators), + }; + + const igoc_rows = get_standard_csv_file_rows("igoc.csv"); + const dept_rows = _.chain(results) + .groupBy(({ subject_id }) => _.split(subject_id, "-")[0]) + .mapValues((results) => + _.flatMap(results, ({ result_id }) => indicators_by_result_id[result_id]) + ) + .map((indicators, dept_code) => ({ + subject_id: _.find( + igoc_rows, + (igoc_row) => igoc_row.dept_code === dept_code + ).org_id, + level: "dept", + ...counts_from_indicators(indicators), + })) + .value(); + + const crso_or_prog_rows = _.chain(results) + .groupBy("subject_id") + .mapValues((results) => + _.flatMap(results, ({ result_id }) => indicators_by_result_id[result_id]) + ) + .map((indicators, subject_id) => ({ + subject_id, + level: "crso_or_program", + ...counts_from_indicators(indicators), + })) + .value(); + + return [gov_row, ...dept_rows, ...crso_or_prog_rows]; +}; + export default async function ({ models }) { const { Result, ResultCount, Indicator, PIDRLink } = models; @@ -116,73 +186,3 @@ export default async function ({ models }) { await Indicator.insertMany(indicator_records); return await PIDRLink.insertMany(pi_dr_links); } - -const get_result_count_records = (results, indicators) => { - const indicators_by_result_id = _.groupBy(indicators, "result_id"); - - const gov_row = { - subject_id: "total", - level: "all", - ...counts_from_indicators(indicators), - }; - - const igoc_rows = get_standard_csv_file_rows("igoc.csv"); - const dept_rows = _.chain(results) - .groupBy(({ subject_id }) => _.split(subject_id, "-")[0]) - .mapValues((results) => - _.flatMap(results, ({ result_id }) => indicators_by_result_id[result_id]) - ) - .map((indicators, dept_code) => ({ - subject_id: _.find( - igoc_rows, - (igoc_row) => igoc_row.dept_code === dept_code - ).org_id, - level: "dept", - ...counts_from_indicators(indicators), - })) - .value(); - - const crso_or_prog_rows = _.chain(results) - .groupBy("subject_id") - .mapValues((results) => - _.flatMap(results, ({ result_id }) => indicators_by_result_id[result_id]) - ) - .map((indicators, subject_id) => ({ - subject_id, - level: "crso_or_program", - ...counts_from_indicators(indicators), - })) - .value(); - - return [gov_row, ...dept_rows, ...crso_or_prog_rows]; -}; - -const counts_from_indicators = (indicators) => - _.chain(indicators) - .map(({ doc, result_id, status_key }) => ({ - [`${doc}_results`]: result_id, - [`${doc}_indicators${status_key === "dp" ? "" : `_${status_key}`}`]: 1, - })) - .thru((indicator_count_fragments) => { - const count_keys = _.chain(indicator_count_fragments) - .flatMap(_.keys) - .uniq() - .value(); - - return _.chain(indicator_count_fragments) - .reduce( - (memo, count_fragment) => { - _.each(count_fragment, (value, key) => - _.isArray(memo[key]) ? memo[key].push(value) : memo[key]++ - ); - return memo; - }, - _.chain(count_keys) - .map((key) => (_.endsWith(key, "_results") ? [key, []] : [key, 0])) - .fromPairs() - .value() - ) - .mapValues((value) => (_.isArray(value) ? _.uniq(value).length : value)) - .value(); - }) - .value(); diff --git a/server/src/models/results/schema.js b/server/src/models/results/schema.js index a1f4832eef..1fe8f36ce3 100644 --- a/server/src/models/results/schema.js +++ b/server/src/models/results/schema.js @@ -6,7 +6,7 @@ import { bilingual_field } from "../schema_utils.js"; import { drr_docs, dp_docs } from "./results_common.js"; const schema = ` - extend type Root { + extend type Root { indicator(id: String): Indicator } @@ -131,8 +131,7 @@ ${_.reduce( `; export default function ({ models, loaders }) { - const { Org, Crso, Program, Result, ResultCount, Indicator, PIDRLink } = - models; + const { Org, Crso, Program, ResultCount } = models; const { prog_dept_code_loader, @@ -145,38 +144,6 @@ export default function ({ models, loaders }) { indicator_id_loader, } = loaders; - async function get_all_target_counts(levels) { - return await ResultCount.find({ level: { $in: levels } }); - } - - async function get_gov_target_counts(doc) { - const orgs = await Org.find({}); - - return await get_org_target_counts(orgs, doc); - } - - //this should take 6 DB queries, but the first 2 can be done in paralel - async function get_org_target_counts(orgs, doc) { - const dept_codes = _.chain(orgs).map("dept_code").compact().value(); - - if (_.isEmpty(dept_codes)) { - return null; - } - - const [crsos, progs] = await Promise.all([ - crso_from_deptcode_loader.loadMany(dept_codes), - prog_dept_code_loader.loadMany(dept_codes), - ]); - - return await get_target_counts( - _.uniq([ - ..._.chain(crsos).flatten().map("crso_id").filter().value(), - ..._.chain(progs).flatten().map("program_id").filter().value(), - ]), - doc - ); - } - async function get_target_counts(cr_or_program_ids, doc) { // turns [ [ { [attr]: val, ... }, undef ... ], undef ... ] into [ val, ... ] w/out undefs const flatmap_to_attr = (list_of_lists, attr) => @@ -233,6 +200,38 @@ export default function ({ models, loaders }) { return records; } + async function get_all_target_counts(levels) { + return await ResultCount.find({ level: { $in: levels } }); + } + + //this should take 6 DB queries, but the first 2 can be done in paralel + async function get_org_target_counts(orgs, doc) { + const dept_codes = _.chain(orgs).map("dept_code").compact().value(); + + if (_.isEmpty(dept_codes)) { + return null; + } + + const [crsos, progs] = await Promise.all([ + crso_from_deptcode_loader.loadMany(dept_codes), + prog_dept_code_loader.loadMany(dept_codes), + ]); + + return await get_target_counts( + _.uniq([ + ..._.chain(crsos).flatten().map("crso_id").filter().value(), + ..._.chain(progs).flatten().map("program_id").filter().value(), + ]), + doc + ); + } + + async function get_gov_target_counts(doc) { + const orgs = await Org.find({}); + + return await get_org_target_counts(orgs, doc); + } + const subject_has_results = async (subject_id) => { const has_result = await ResultCount.findOne({ subject_id: subject_id }); return !_.isNull(has_result); diff --git a/server/src/models/vote_stat/schema.js b/server/src/models/vote_stat/schema.js index 20004c1b57..5d3f6d6d1c 100644 --- a/server/src/models/vote_stat/schema.js +++ b/server/src/models/vote_stat/schema.js @@ -92,19 +92,19 @@ const schema = ` export default function ({ models }) { const { PAVoteStat, EstimatesVoteStat, ProgramVoteStat } = models; - function get_pa_vs_data_for_org(org, { year }) { + function get_pa_vs_data_for_org(org) { let flat_records = PAVoteStat.get_flat_dept_records(org.dept_code); return { org, flat_records }; } - function get_estimates_data_for_org(org, { year }) { + function get_estimates_data_for_org(org) { let flat_records = EstimatesVoteStat.get_flat_dept_records(org.dept_code); return { org, flat_records }; } - function get_dept_pa_info({ org, flat_records }) { + function get_dept_pa_info({ flat_records }) { const yearly_totals = _.chain(flat_records) .groupBy("year") .map((group, year) => ({ @@ -119,7 +119,7 @@ export default function ({ models }) { }; } - function get_dept_estimates_info({ org, flat_records }) { + function get_dept_estimates_info({ flat_records }) { const yearly_totals = _.chain(flat_records) .groupBy("year") .map((group, year) => ({ @@ -140,7 +140,7 @@ export default function ({ models }) { }, PAVoteStat: { - data: ({ org, flat_records }, { year }) => + data: ({ flat_records }, { year }) => year ? _.chain(flat_records) .filter({ year }) @@ -151,7 +151,7 @@ export default function ({ models }) { }, PaVoteStatRecord: { name: en_fr("name_en", "name_fr") }, EstimatesVoteStat: { - data: ({ org, flat_records }, { year }) => + data: ({ flat_records }, { year }) => year ? _.chain(flat_records).filter({ year }).filter("amount").value() : flat_records,