From 1912b19716428c5b87d9a6919cb5b792ef953c03 Mon Sep 17 00:00:00 2001 From: Sanjeev Lakhwani Date: Mon, 26 Aug 2024 11:18:32 -0400 Subject: [PATCH 1/4] moved eslint-plugin-react-hooks to dev dependencies --- package-lock.json | 88 ++++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 02c71497..7a379914 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "bento-auth-js": "^5.1.1", "bento-charts": "^2.6.8", "dotenv": "^16.3.1", - "eslint-plugin-react-hooks": "^4.6.2", "i18next": "^23.7.7", "i18next-browser-languagedetector": "^8.0.0", "i18next-http-backend": "^2.4.2", @@ -47,6 +46,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.1", "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.2", "file-loader": "^6.2.0", "html-loader": "^5.0.0", "html-webpack-plugin": "^5.5.3", @@ -180,6 +180,7 @@ "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, "license": "MIT", "dependencies": { "eslint-visitor-keys": "^3.3.0" @@ -195,6 +196,7 @@ "version": "4.11.0", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -204,6 +206,7 @@ "version": "2.1.4", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, "license": "MIT", "dependencies": { "ajv": "^6.12.4", @@ -227,6 +230,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -237,6 +241,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -249,6 +254,7 @@ "version": "8.57.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, "license": "MIT", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -259,6 +265,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "deprecated": "Use @eslint/config-array instead", + "dev": true, "license": "Apache-2.0", "dependencies": { "@humanwhocodes/object-schema": "^2.0.2", @@ -273,6 +280,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -283,6 +291,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -295,6 +304,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, "license": "Apache-2.0", "engines": { "node": ">=12.22" @@ -309,6 +319,7 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", "deprecated": "Use @eslint/object-schema instead", + "dev": true, "license": "BSD-3-Clause" }, "node_modules/@isaacs/cliui": { @@ -546,6 +557,7 @@ "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", @@ -559,6 +571,7 @@ "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" @@ -568,6 +581,7 @@ "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", @@ -1338,6 +1352,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, "license": "ISC" }, "node_modules/@webassemblyjs/ast": { @@ -1580,6 +1595,7 @@ "version": "8.12.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -1602,6 +1618,7 @@ "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" @@ -1611,6 +1628,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -1794,6 +1812,7 @@ "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, "license": "Python-2.0" }, "node_modules/array-buffer-byte-length": { @@ -2274,6 +2293,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -2726,6 +2746,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -3006,6 +3027,7 @@ "version": "4.3.5", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, "license": "MIT", "dependencies": { "ms": "2.1.2" @@ -3029,6 +3051,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, "license": "MIT" }, "node_modules/default-browser": { @@ -3199,6 +3222,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "license": "Apache-2.0", "dependencies": { "esutils": "^2.0.2" @@ -3648,6 +3672,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -3660,6 +3685,7 @@ "version": "8.57.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -3793,6 +3819,7 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" @@ -3852,6 +3879,7 @@ "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -3868,6 +3896,7 @@ "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3880,6 +3909,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -3890,6 +3920,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -3902,6 +3933,7 @@ "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "acorn": "^8.9.0", @@ -3919,6 +3951,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" @@ -3931,6 +3964,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -3943,6 +3977,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -3952,6 +3987,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" @@ -4071,6 +4107,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, "license": "MIT" }, "node_modules/fast-diff": { @@ -4123,12 +4160,14 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, "license": "MIT" }, "node_modules/fast-uri": { @@ -4152,6 +4191,7 @@ "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -4174,6 +4214,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, "license": "MIT", "dependencies": { "flat-cache": "^3.0.4" @@ -4275,6 +4316,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, "license": "MIT", "dependencies": { "locate-path": "^6.0.0", @@ -4301,6 +4343,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", @@ -4315,6 +4358,7 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, "license": "ISC" }, "node_modules/follow-redirects": { @@ -4570,6 +4614,7 @@ "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": "ISC", "dependencies": { "is-glob": "^4.0.3" @@ -4611,6 +4656,7 @@ "version": "13.24.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, "license": "MIT", "dependencies": { "type-fest": "^0.20.2" @@ -4683,6 +4729,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, "license": "MIT" }, "node_modules/handle-thing": { @@ -5247,6 +5294,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "license": "MIT", "dependencies": { "parent-module": "^1.0.0", @@ -5283,6 +5331,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.19" @@ -5515,6 +5564,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -5562,6 +5612,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -5658,6 +5709,7 @@ "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -5872,6 +5924,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, "license": "ISC" }, "node_modules/isobject": { @@ -5964,6 +6017,7 @@ "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", "dependencies": { "argparse": "^2.0.1" @@ -5976,6 +6030,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, "license": "MIT" }, "node_modules/json-parse-even-better-errors": { @@ -5989,12 +6044,14 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, "license": "MIT" }, "node_modules/json2mq": { @@ -6048,6 +6105,7 @@ "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, "license": "MIT", "dependencies": { "json-buffer": "3.0.1" @@ -6137,6 +6195,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", @@ -6175,6 +6234,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, "license": "MIT", "dependencies": { "p-locate": "^5.0.0" @@ -6196,6 +6256,7 @@ "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, "license": "MIT" }, "node_modules/loose-envify": { @@ -6410,6 +6471,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, "license": "MIT" }, "node_modules/multicast-dns": { @@ -6449,6 +6511,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, "license": "MIT" }, "node_modules/needle": { @@ -6859,6 +6922,7 @@ "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, "license": "MIT", "dependencies": { "deep-is": "^0.1.3", @@ -6876,6 +6940,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" @@ -6891,6 +6956,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "license": "MIT", "dependencies": { "p-limit": "^3.0.2" @@ -6952,6 +7018,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "license": "MIT", "dependencies": { "callsites": "^3.0.0" @@ -7007,6 +7074,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7025,6 +7093,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7297,6 +7366,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, "license": "MIT", "engines": { "node": ">= 0.8.0" @@ -7408,6 +7478,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -7433,6 +7504,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, "funding": [ { "type": "github", @@ -8567,6 +8639,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "license": "MIT", "engines": { "node": ">=4" @@ -8586,6 +8659,7 @@ "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", @@ -8597,6 +8671,7 @@ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -8625,6 +8700,7 @@ "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": [ { "type": "github", @@ -9044,6 +9120,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -9056,6 +9133,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -9402,6 +9480,7 @@ "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" @@ -9569,6 +9648,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, "license": "MIT" }, "node_modules/thingies": { @@ -9722,6 +9802,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" @@ -9734,6 +9815,7 @@ "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, "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" @@ -9944,6 +10026,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -10394,6 +10477,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -10499,6 +10583,7 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -10627,6 +10712,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=10" diff --git a/package.json b/package.json index 697296a9..f29a0716 100755 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "bento-auth-js": "^5.1.1", "bento-charts": "^2.6.8", "dotenv": "^16.3.1", - "eslint-plugin-react-hooks": "^4.6.2", "i18next": "^23.7.7", "i18next-browser-languagedetector": "^8.0.0", "i18next-http-backend": "^2.4.2", @@ -55,6 +54,7 @@ "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.1", "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.2", "file-loader": "^6.2.0", "html-loader": "^5.0.0", "html-webpack-plugin": "^5.5.3", From 86ec9a5670c0be0d8e6e84e1b44d9006e1300586 Mon Sep 17 00:00:00 2001 From: Sanjeev Lakhwani Date: Mon, 26 Aug 2024 11:22:32 -0400 Subject: [PATCH 2/4] Added import type enforcing rule --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 93952512..8047f5ae 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,6 +27,7 @@ module.exports = { 'no-unused-vars': 'off', // disable no-unused-vars since @typescript-eslint/no-unused-vars does the same '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], // enable @typescript-eslint/no-unused-vars '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/consistent-type-imports': 'error', 'comma-dangle': [ 'error', { From dac82ecbfc2e3209f3292caf552ed37897ed0dd3 Mon Sep 17 00:00:00 2001 From: Sanjeev Lakhwani Date: Mon, 26 Aug 2024 13:36:34 -0400 Subject: [PATCH 3/4] lint fixed consistent-type-import errors --- src/js/components/Beacon/AssemblyIdSelect.tsx | 2 +- src/js/components/Beacon/BeaconQueryUi.tsx | 5 +++-- src/js/components/Beacon/Filter.tsx | 12 +++++++++--- src/js/components/Beacon/Filters.tsx | 9 +++++---- src/js/components/Beacon/VariantInput.tsx | 2 +- src/js/components/Beacon/VariantsForm.tsx | 5 +++-- src/js/components/Overview/Chart.tsx | 11 +++-------- src/js/components/Overview/ChartCard.tsx | 2 +- src/js/components/Overview/Drawer/ChartTree.tsx | 8 +++++--- .../Overview/Drawer/ManageChartsDrawer.tsx | 5 +++-- src/js/components/Overview/LastIngestion.tsx | 2 +- src/js/components/Overview/OverviewDisplayData.tsx | 2 +- src/js/components/Overview/OverviewSection.tsx | 2 +- src/js/components/Provenance/DatasetProvenance.tsx | 2 +- src/js/components/Provenance/DownloadDats.tsx | 2 +- .../Provenance/Tables/AcknowledgesTable.tsx | 2 +- .../Provenance/Tables/BaseProvenanceTable.tsx | 5 +++-- .../components/Provenance/Tables/CreatedByTable.tsx | 2 +- .../Provenance/Tables/DistributionsTable.tsx | 4 ++-- .../Provenance/Tables/ExtraPropertiesTable.tsx | 4 ++-- src/js/components/Provenance/Tables/IsAboutTable.tsx | 2 +- .../Provenance/Tables/PublicationsTable.tsx | 7 ++++--- .../Provenance/Tables/SpatialCoverageTable.tsx | 2 +- src/js/components/Search/MakeQueryOption.tsx | 2 +- src/js/components/Search/SearchFieldsStack.tsx | 2 +- src/js/components/Search/SearchResultsPane.tsx | 2 +- src/js/components/Util/ConditionalWrapper.tsx | 3 ++- src/js/constants/beaconConstants.ts | 2 +- src/js/constants/overviewConstants.ts | 2 +- src/js/features/beacon/beaconConfig.store.ts | 4 ++-- src/js/features/beacon/beaconQuery.store.ts | 6 +++--- src/js/features/config/config.store.ts | 9 +++++---- src/js/features/content/content.store.ts | 3 ++- src/js/features/data/data.store.ts | 9 +++++---- src/js/features/data/makeGetDataRequest.thunk.ts | 8 ++++---- src/js/features/dataTypes/dataTypes.store.ts | 3 ++- src/js/features/ingestion/lastIngestion.store.ts | 5 +++-- src/js/features/metadata/metadata.store.ts | 7 ++++--- src/js/features/provenance/provenance.store.ts | 2 +- src/js/features/search/makeGetKatsuPublic.thunk.ts | 4 ++-- src/js/features/search/makeGetSearchFields.thunk.ts | 4 ++-- src/js/features/search/query.store.ts | 7 ++++--- src/js/hooks.ts | 11 +++++++---- src/js/i18n.ts | 3 ++- src/js/store.ts | 10 +++------- src/js/types/beacon.ts | 4 ++-- src/js/types/chartConfig.ts | 2 +- src/js/types/data.ts | 4 ++-- src/js/types/metadata.ts | 6 +++--- src/js/types/overviewResponse.ts | 2 +- src/js/types/search.ts | 2 +- src/js/utils/beaconApiError.ts | 4 ++-- src/js/utils/chart.ts | 4 ++-- src/js/utils/error.util.ts | 2 +- src/js/utils/localStorage.ts | 4 ++-- src/js/utils/router.ts | 2 +- src/js/utils/search.ts | 2 +- 57 files changed, 131 insertions(+), 114 deletions(-) diff --git a/src/js/components/Beacon/AssemblyIdSelect.tsx b/src/js/components/Beacon/AssemblyIdSelect.tsx index 6806cb63..d2b6e19c 100644 --- a/src/js/components/Beacon/AssemblyIdSelect.tsx +++ b/src/js/components/Beacon/AssemblyIdSelect.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Form, Select } from 'antd'; -import { FormField, BeaconAssemblyIds } from '@/types/beacon'; +import type { FormField, BeaconAssemblyIds } from '@/types/beacon'; import { DEFAULT_TRANSLATION } from '@/constants/configConstants'; const AssemblyIdSelect = ({ field, beaconAssemblyIds, disabled }: AssemblyIdSelectProps) => { diff --git a/src/js/components/Beacon/BeaconQueryUi.tsx b/src/js/components/Beacon/BeaconQueryUi.tsx index 416cb7fc..7c39c687 100644 --- a/src/js/components/Beacon/BeaconQueryUi.tsx +++ b/src/js/components/Beacon/BeaconQueryUi.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useState, ReactNode, useCallback, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { useEffect, useState, useCallback, useMemo } from 'react'; import { useAppSelector, useAppDispatch, useTranslationDefault, useQueryWithAuthIfAllowed } from '@/hooks'; import { Button, Card, Col, Form, Row, Space, Tooltip, Typography } from 'antd'; import { InfoCircleOutlined } from '@ant-design/icons'; @@ -8,7 +9,7 @@ import BeaconSearchResults from './BeaconSearchResults'; import BeaconErrorMessage from './BeaconErrorMessage'; import VariantsForm from './VariantsForm'; import { makeBeaconQuery } from '@/features/beacon/beaconQuery.store'; -import { BeaconQueryPayload, FormFilter, FormValues, PayloadFilter, PayloadVariantsQuery } from '@/types/beacon'; +import type { BeaconQueryPayload, FormFilter, FormValues, PayloadFilter, PayloadVariantsQuery } from '@/types/beacon'; import { WRAPPER_STYLE, FORM_ROW_GUTTERS, diff --git a/src/js/components/Beacon/Filter.tsx b/src/js/components/Beacon/Filter.tsx index 33cf27c1..98c15df5 100644 --- a/src/js/components/Beacon/Filter.tsx +++ b/src/js/components/Beacon/Filter.tsx @@ -2,9 +2,15 @@ import React, { useEffect, useState } from 'react'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; import { Button, Form, Select, Space } from 'antd'; import { CloseOutlined } from '@ant-design/icons'; -import { FormInstance } from 'antd/es/form'; -import { FormFilter, FilterOption, FilterPullDownKey, FilterPullDownValue, GenericOptionType } from '@/types/beacon'; -import { Section, Field } from '@/types/search'; +import type { FormInstance } from 'antd/es/form'; +import type { + FormFilter, + FilterOption, + FilterPullDownKey, + FilterPullDownValue, + GenericOptionType, +} from '@/types/beacon'; +import type { Section, Field } from '@/types/search'; // TODOs: // any search key (eg "sex") selected in one filter should not available in other diff --git a/src/js/components/Beacon/Filters.tsx b/src/js/components/Beacon/Filters.tsx index 59b9c5a1..62a7d0a0 100644 --- a/src/js/components/Beacon/Filters.tsx +++ b/src/js/components/Beacon/Filters.tsx @@ -1,10 +1,11 @@ -import React, { Dispatch, SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; +import React from 'react'; import { useAppSelector } from '@/hooks'; import { useTranslation } from 'react-i18next'; import { Button, Form, Space, Tooltip } from 'antd'; -import { FormInstance } from 'antd/es/form'; -import { FormFilter } from '@/types/beacon'; -import { SearchFieldResponse } from '@/types/search'; +import type { FormInstance } from 'antd/es/form'; +import type { FormFilter } from '@/types/beacon'; +import type { SearchFieldResponse } from '@/types/search'; import { DEFAULT_TRANSLATION } from '@/constants/configConstants'; import Filter from './Filter'; diff --git a/src/js/components/Beacon/VariantInput.tsx b/src/js/components/Beacon/VariantInput.tsx index 238fc57d..41d8cdd5 100644 --- a/src/js/components/Beacon/VariantInput.tsx +++ b/src/js/components/Beacon/VariantInput.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Form, Input } from 'antd'; -import { FormField } from '@/types/beacon'; +import type { FormField } from '@/types/beacon'; import { DEFAULT_TRANSLATION } from '@/constants/configConstants'; const VariantInput = ({ field, disabled }: VariantInputProps) => { diff --git a/src/js/components/Beacon/VariantsForm.tsx b/src/js/components/Beacon/VariantsForm.tsx index 8309bb47..6debeb89 100644 --- a/src/js/components/Beacon/VariantsForm.tsx +++ b/src/js/components/Beacon/VariantsForm.tsx @@ -1,9 +1,10 @@ -import React, { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; +import React from 'react'; import { useTranslation } from 'react-i18next'; import { Col, Row } from 'antd'; import VariantInput from './VariantInput'; import AssemblyIdSelect from './AssemblyIdSelect'; -import { BeaconAssemblyIds } from '@/types/beacon'; +import type { BeaconAssemblyIds } from '@/types/beacon'; import { DEFAULT_TRANSLATION } from '@/constants/configConstants'; // form state has to be one of these: diff --git a/src/js/components/Overview/Chart.tsx b/src/js/components/Overview/Chart.tsx index f8a729c9..f9c0b913 100644 --- a/src/js/components/Overview/Chart.tsx +++ b/src/js/components/Overview/Chart.tsx @@ -5,14 +5,9 @@ import { BarChart, Histogram, PieChart } from 'bento-charts'; import { ChoroplethMap } from 'bento-charts/dist/maps'; import { CHART_HEIGHT, PIE_CHART_HEIGHT } from '@/constants/overviewConstants'; -import { ChartData } from '@/types/data'; -import { - CHART_TYPE_BAR, - CHART_TYPE_HISTOGRAM, - CHART_TYPE_CHOROPLETH, - CHART_TYPE_PIE, - ChartConfig, -} from '@/types/chartConfig'; +import type { ChartData } from '@/types/data'; +import type { ChartConfig } from '@/types/chartConfig'; +import { CHART_TYPE_BAR, CHART_TYPE_HISTOGRAM, CHART_TYPE_CHOROPLETH, CHART_TYPE_PIE } from '@/types/chartConfig'; import { useAppSelector } from '@/hooks'; import { scopeToUrl } from '@/utils/router'; diff --git a/src/js/components/Overview/ChartCard.tsx b/src/js/components/Overview/ChartCard.tsx index f82490e5..77241309 100644 --- a/src/js/components/Overview/ChartCard.tsx +++ b/src/js/components/Overview/ChartCard.tsx @@ -5,7 +5,7 @@ import Chart from './Chart'; import CustomEmpty from '../Util/CustomEmpty'; import { CHART_HEIGHT, BOX_SHADOW } from '@/constants/overviewConstants'; import { useElementWidth, useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { ChartDataField } from '@/types/data'; +import type { ChartDataField } from '@/types/data'; const CARD_STYLE: React.CSSProperties = { height: '415px', borderRadius: '11px', ...BOX_SHADOW }; const ROW_EMPTY_STYLE: React.CSSProperties = { height: `${CHART_HEIGHT}px` }; diff --git a/src/js/components/Overview/Drawer/ChartTree.tsx b/src/js/components/Overview/Drawer/ChartTree.tsx index 9e1bd896..418250c3 100644 --- a/src/js/components/Overview/Drawer/ChartTree.tsx +++ b/src/js/components/Overview/Drawer/ChartTree.tsx @@ -1,10 +1,12 @@ -import React, { ReactNode, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { useMemo } from 'react'; import { useDispatch } from 'react-redux'; -import { InputNumber, Tree, TreeProps } from 'antd'; +import type { TreeProps } from 'antd'; +import { InputNumber, Tree } from 'antd'; import { rearrange, setDisplayedCharts, setChartWidth } from '@/features/data/data.store'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { ChartDataField } from '@/types/data'; +import type { ChartDataField } from '@/types/data'; interface MappedChartItem { title: ReactNode; diff --git a/src/js/components/Overview/Drawer/ManageChartsDrawer.tsx b/src/js/components/Overview/Drawer/ManageChartsDrawer.tsx index e83dd111..1ef5ec7b 100644 --- a/src/js/components/Overview/Drawer/ManageChartsDrawer.tsx +++ b/src/js/components/Overview/Drawer/ManageChartsDrawer.tsx @@ -1,11 +1,12 @@ import React from 'react'; -import { Button, Drawer, DrawerProps, Flex, Space, Typography } from 'antd'; +import type { DrawerProps } from 'antd'; +import { Button, Drawer, Flex, Space, Typography } from 'antd'; const { Title } = Typography; import ChartTree from './ChartTree'; -import { ChartDataField } from '@/types/data'; +import type { ChartDataField } from '@/types/data'; import { useAppSelector, useAppDispatch, useTranslationCustom, useTranslationDefault } from '@/hooks'; import { hideAllSectionCharts, setAllDisplayedCharts, resetLayout } from '@/features/data/data.store'; diff --git a/src/js/components/Overview/LastIngestion.tsx b/src/js/components/Overview/LastIngestion.tsx index 09d7117d..5a7c06f3 100644 --- a/src/js/components/Overview/LastIngestion.tsx +++ b/src/js/components/Overview/LastIngestion.tsx @@ -7,7 +7,7 @@ import { DEFAULT_TRANSLATION } from '@/constants/configConstants'; import { useAppSelector } from '@/hooks'; import { getDataTypeLabel } from '@/types/dataTypes'; -import { LastIngestionDataTypeResponse } from '@/types/lastIngestionDataTypeResponse'; +import type { LastIngestionDataTypeResponse } from '@/types/lastIngestionDataTypeResponse'; import { BOX_SHADOW } from '@/constants/overviewConstants'; const LastIngestionInfo: React.FC = () => { diff --git a/src/js/components/Overview/OverviewDisplayData.tsx b/src/js/components/Overview/OverviewDisplayData.tsx index 526c2da4..1122d58b 100644 --- a/src/js/components/Overview/OverviewDisplayData.tsx +++ b/src/js/components/Overview/OverviewDisplayData.tsx @@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from 'react'; import { useDispatch } from 'react-redux'; import { disableChart } from '@/features/data/data.store'; -import { ChartDataField } from '@/types/data'; +import type { ChartDataField } from '@/types/data'; import ChartCard from './ChartCard'; import { CHART_WIDTH, GRID_GAP } from '@/constants/overviewConstants'; diff --git a/src/js/components/Overview/OverviewSection.tsx b/src/js/components/Overview/OverviewSection.tsx index d6a5ccb9..5c08bfb3 100644 --- a/src/js/components/Overview/OverviewSection.tsx +++ b/src/js/components/Overview/OverviewSection.tsx @@ -3,7 +3,7 @@ import { Typography, Space } from 'antd'; import OverviewDisplayData from './OverviewDisplayData'; import { useTranslationCustom } from '@/hooks'; -import { ChartDataField } from '@/types/data'; +import type { ChartDataField } from '@/types/data'; const OverviewSection = ({ title, chartData }: { title: string; chartData: ChartDataField[] }) => { const t = useTranslationCustom(); diff --git a/src/js/components/Provenance/DatasetProvenance.tsx b/src/js/components/Provenance/DatasetProvenance.tsx index 46187e8d..af4811ef 100644 --- a/src/js/components/Provenance/DatasetProvenance.tsx +++ b/src/js/components/Provenance/DatasetProvenance.tsx @@ -10,7 +10,7 @@ import PublicationsTable from './Tables/PublicationsTable'; import CreatedByTable from './Tables/CreatedByTable'; import DownloadDats from './DownloadDats'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { ProvenanceStoreDataset } from '@/types/provenance'; +import type { ProvenanceStoreDataset } from '@/types/provenance'; import { BOX_SHADOW } from '@/constants/overviewConstants'; const { Item } = Descriptions; diff --git a/src/js/components/Provenance/DownloadDats.tsx b/src/js/components/Provenance/DownloadDats.tsx index 73cdea65..c231d601 100644 --- a/src/js/components/Provenance/DownloadDats.tsx +++ b/src/js/components/Provenance/DownloadDats.tsx @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { Button, Space } from 'antd'; import { DownloadOutlined } from '@ant-design/icons'; import { useTranslationDefault } from '@/hooks'; -import { ProvenanceStoreDataset } from '@/types/provenance'; +import type { ProvenanceStoreDataset } from '@/types/provenance'; const DownloadDats = ({ metadata }: { metadata: ProvenanceStoreDataset }) => { const t = useTranslationDefault(); diff --git a/src/js/components/Provenance/Tables/AcknowledgesTable.tsx b/src/js/components/Provenance/Tables/AcknowledgesTable.tsx index 8c629e97..2ec9bb61 100644 --- a/src/js/components/Provenance/Tables/AcknowledgesTable.tsx +++ b/src/js/components/Provenance/Tables/AcknowledgesTable.tsx @@ -2,7 +2,7 @@ import React from 'react'; import BaseProvenanceTable from './BaseProvenanceTable'; import LinkIfUrl from '../../Util/LinkIfUrl'; -import { Acknowledge } from '@/types/provenance'; +import type { Acknowledge } from '@/types/provenance'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; const AcknowledgesTable = ({ acknowledges }: AcknowledgesTableProps) => { diff --git a/src/js/components/Provenance/Tables/BaseProvenanceTable.tsx b/src/js/components/Provenance/Tables/BaseProvenanceTable.tsx index 99951623..f724d57e 100644 --- a/src/js/components/Provenance/Tables/BaseProvenanceTable.tsx +++ b/src/js/components/Provenance/Tables/BaseProvenanceTable.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import { Table, TableProps } from 'antd'; -import { AnyObject } from 'antd/es/_util/type'; +import type { TableProps } from 'antd'; +import { Table } from 'antd'; +import type { AnyObject } from 'antd/es/_util/type'; const BaseProvenanceTable = (props: TableProps) => ( diff --git a/src/js/components/Provenance/Tables/CreatedByTable.tsx b/src/js/components/Provenance/Tables/CreatedByTable.tsx index 7ced6c00..77c331f8 100644 --- a/src/js/components/Provenance/Tables/CreatedByTable.tsx +++ b/src/js/components/Provenance/Tables/CreatedByTable.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { Tag } from 'antd'; import BaseProvenanceTable from './BaseProvenanceTable'; -import { ProvenanceStoreDataset } from '@/types/provenance'; +import type { ProvenanceStoreDataset } from '@/types/provenance'; import { useTranslationDefault, useTranslationCustom } from '@/hooks'; const CreatedByTable = ({ creators }: CreatedByTableProps) => { diff --git a/src/js/components/Provenance/Tables/DistributionsTable.tsx b/src/js/components/Provenance/Tables/DistributionsTable.tsx index e7cc53bd..9f520380 100644 --- a/src/js/components/Provenance/Tables/DistributionsTable.tsx +++ b/src/js/components/Provenance/Tables/DistributionsTable.tsx @@ -1,12 +1,12 @@ import React, { useMemo } from 'react'; import { Tag, Typography } from 'antd'; -import { ColumnsType } from 'antd/es/table'; +import type { ColumnsType } from 'antd/es/table'; const { Link } = Typography; import BaseProvenanceTable from './BaseProvenanceTable'; import { useTranslationDefault, useTranslationCustom } from '@/hooks'; -import { Distribution, ProvenanceStoreDataset } from '@/types/provenance'; +import type { Distribution, ProvenanceStoreDataset } from '@/types/provenance'; const DistributionsTable = ({ distributions }: DistributionsTableProps) => { const t = useTranslationCustom(); diff --git a/src/js/components/Provenance/Tables/ExtraPropertiesTable.tsx b/src/js/components/Provenance/Tables/ExtraPropertiesTable.tsx index c05016b1..3df70da6 100644 --- a/src/js/components/Provenance/Tables/ExtraPropertiesTable.tsx +++ b/src/js/components/Provenance/Tables/ExtraPropertiesTable.tsx @@ -1,11 +1,11 @@ import React, { Fragment, useMemo } from 'react'; -import { ColumnsType } from 'antd/es/table'; +import type { ColumnsType } from 'antd/es/table'; import BaseProvenanceTable from '@/components/Provenance/Tables/BaseProvenanceTable'; import LinkIfUrl from '../../Util/LinkIfUrl'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { ExtraProperty, ProvenanceStoreDataset } from '@/types/provenance'; +import type { ExtraProperty, ProvenanceStoreDataset } from '@/types/provenance'; const ExtraPropertiesTable = ({ extraProperties }: ExtraPropertiesTableProps) => { const t = useTranslationCustom(); diff --git a/src/js/components/Provenance/Tables/IsAboutTable.tsx b/src/js/components/Provenance/Tables/IsAboutTable.tsx index 1c571712..f59a0f5c 100644 --- a/src/js/components/Provenance/Tables/IsAboutTable.tsx +++ b/src/js/components/Provenance/Tables/IsAboutTable.tsx @@ -4,7 +4,7 @@ import { Tag } from 'antd'; import BaseProvenanceTable from './BaseProvenanceTable'; import LinkIfUrl from '../../Util/LinkIfUrl'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { ProvenanceStoreDataset } from '@/types/provenance'; +import type { ProvenanceStoreDataset } from '@/types/provenance'; const IsAboutTable = ({ isAbout }: IsAboutTableProps) => { const t = useTranslationCustom(); diff --git a/src/js/components/Provenance/Tables/PublicationsTable.tsx b/src/js/components/Provenance/Tables/PublicationsTable.tsx index bdcf48de..da80b9bc 100644 --- a/src/js/components/Provenance/Tables/PublicationsTable.tsx +++ b/src/js/components/Provenance/Tables/PublicationsTable.tsx @@ -1,12 +1,13 @@ -import React, { ReactNode, useMemo } from 'react'; +import type { ReactNode } from 'react'; +import React, { useMemo } from 'react'; import { Typography } from 'antd'; -import { ColumnsType } from 'antd/es/table'; +import type { ColumnsType } from 'antd/es/table'; import BaseProvenanceTable from './BaseProvenanceTable'; import LinkIfUrl from '../../Util/LinkIfUrl'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { Person, PrimaryPublication, ProvenanceStoreDataset } from '@/types/provenance'; +import type { Person, PrimaryPublication, ProvenanceStoreDataset } from '@/types/provenance'; import { stringIsDOI, stringIsURL } from '@/utils/strings'; diff --git a/src/js/components/Provenance/Tables/SpatialCoverageTable.tsx b/src/js/components/Provenance/Tables/SpatialCoverageTable.tsx index 85e57b7c..ce750bd6 100644 --- a/src/js/components/Provenance/Tables/SpatialCoverageTable.tsx +++ b/src/js/components/Provenance/Tables/SpatialCoverageTable.tsx @@ -2,7 +2,7 @@ import React from 'react'; import BaseProvenanceTable from './BaseProvenanceTable'; import { useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { ProvenanceStoreDataset } from '@/types/provenance'; +import type { ProvenanceStoreDataset } from '@/types/provenance'; const SpatialCoverageTable = ({ spatialCoverage }: SpatialCoverageTableProps) => { const t = useTranslationCustom(); diff --git a/src/js/components/Search/MakeQueryOption.tsx b/src/js/components/Search/MakeQueryOption.tsx index f6fe4e24..6460ce2b 100644 --- a/src/js/components/Search/MakeQueryOption.tsx +++ b/src/js/components/Search/MakeQueryOption.tsx @@ -6,7 +6,7 @@ import { addQueryParam, makeGetKatsuPublic, removeQueryParam } from '@/features/ import SelectOption from './SelectOption'; import { useAppDispatch, useAppSelector, useTranslationCustom, useTranslationDefault } from '@/hooks'; -import { Field } from '@/types/search'; +import type { Field } from '@/types/search'; const MakeQueryOption = ({ queryField }: MakeQueryOptionProps) => { const t = useTranslationCustom(); diff --git a/src/js/components/Search/SearchFieldsStack.tsx b/src/js/components/Search/SearchFieldsStack.tsx index ddb6fef7..18a30192 100644 --- a/src/js/components/Search/SearchFieldsStack.tsx +++ b/src/js/components/Search/SearchFieldsStack.tsx @@ -1,7 +1,7 @@ import React from 'react'; import MakeQueryOption from './MakeQueryOption'; import { Space } from 'antd'; -import { Field } from '@/types/search'; +import type { Field } from '@/types/search'; const SearchFieldsStack = ({ queryFields }: SearchFieldStackProps) => { return ( diff --git a/src/js/components/Search/SearchResultsPane.tsx b/src/js/components/Search/SearchResultsPane.tsx index fe08bf89..3157a71e 100644 --- a/src/js/components/Search/SearchResultsPane.tsx +++ b/src/js/components/Search/SearchResultsPane.tsx @@ -7,7 +7,7 @@ import CustomEmpty from '../Util/CustomEmpty'; import ExpSvg from '../Util/ExpSvg'; import { BOX_SHADOW, COUNTS_FILL, PIE_CHART_HEIGHT } from '@/constants/overviewConstants'; import { useTranslationDefault, useTranslationCustom } from '@/hooks'; -import { ChartData } from '@/types/data'; +import type { ChartData } from '@/types/data'; const SearchResultsPane = ({ isFetchingData, diff --git a/src/js/components/Util/ConditionalWrapper.tsx b/src/js/components/Util/ConditionalWrapper.tsx index a48cc262..b614821f 100644 --- a/src/js/components/Util/ConditionalWrapper.tsx +++ b/src/js/components/Util/ConditionalWrapper.tsx @@ -1,5 +1,6 @@ import { Space } from 'antd'; -import React, { ComponentType, memo, PropsWithChildren } from 'react'; +import type { ComponentType, PropsWithChildren } from 'react'; +import React, { memo } from 'react'; export const VerticalSpaceWrapper = memo(function VerticalSpaceWrapper({ children }: PropsWithChildren) { return ( diff --git a/src/js/constants/beaconConstants.ts b/src/js/constants/beaconConstants.ts index a40f5181..fb5c7ff6 100644 --- a/src/js/constants/beaconConstants.ts +++ b/src/js/constants/beaconConstants.ts @@ -1,4 +1,4 @@ -import { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; import { BOX_SHADOW } from '@/constants/overviewConstants'; export const WRAPPER_STYLE: CSSProperties = { diff --git a/src/js/constants/overviewConstants.ts b/src/js/constants/overviewConstants.ts index 0aaabb8f..b3d49772 100644 --- a/src/js/constants/overviewConstants.ts +++ b/src/js/constants/overviewConstants.ts @@ -1,4 +1,4 @@ -import { HexColor } from 'bento-charts'; +import type { HexColor } from 'bento-charts'; export const COUNTS_FILL = '#75787a'; diff --git a/src/js/features/beacon/beaconConfig.store.ts b/src/js/features/beacon/beaconConfig.store.ts index 485d22f4..98019106 100644 --- a/src/js/features/beacon/beaconConfig.store.ts +++ b/src/js/features/beacon/beaconConfig.store.ts @@ -1,7 +1,7 @@ import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; -import { BeaconConfigResponse, BeaconAssemblyIds } from '@/types/beacon'; -import { RootState } from '@/store'; +import type { BeaconConfigResponse, BeaconAssemblyIds } from '@/types/beacon'; +import type { RootState } from '@/store'; import { printAPIError } from '@/utils/error.util'; import { BEACON_URL } from '@/config'; diff --git a/src/js/features/beacon/beaconQuery.store.ts b/src/js/features/beacon/beaconQuery.store.ts index 545e80bd..63a0dfa3 100644 --- a/src/js/features/beacon/beaconQuery.store.ts +++ b/src/js/features/beacon/beaconQuery.store.ts @@ -1,11 +1,11 @@ import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; import { makeAuthorizationHeader } from 'bento-auth-js'; -import { RootState } from '@/store'; +import type { RootState } from '@/store'; import { serializeChartData } from '@/utils/chart'; import { beaconApiError } from '@/utils/beaconApiError'; -import { BeaconQueryPayload, BeaconQueryResponse } from '@/types/beacon'; -import { ChartData } from '@/types/data'; +import type { BeaconQueryPayload, BeaconQueryResponse } from '@/types/beacon'; +import type { ChartData } from '@/types/data'; import { BEACON_URL } from '@/config'; const beaconIndividualsEndpoint = BEACON_URL + '/individuals'; diff --git a/src/js/features/config/config.store.ts b/src/js/features/config/config.store.ts index 6b6a5311..b560c200 100644 --- a/src/js/features/config/config.store.ts +++ b/src/js/features/config/config.store.ts @@ -1,11 +1,12 @@ -import { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; import { katsuPublicRulesUrl } from '@/constants/configConstants'; import { printAPIError } from '@/utils/error.util'; -import { ServiceInfoStore, ServicesResponse } from '@/types/services'; -import { RootState } from '@/store'; +import type { ServiceInfoStore, ServicesResponse } from '@/types/services'; +import type { RootState } from '@/store'; import { PUBLIC_URL } from '@/config'; -import { DiscoveryRules } from '@/types/configResponse'; +import type { DiscoveryRules } from '@/types/configResponse'; export const makeGetConfigRequest = createAsyncThunk( 'config/getConfigData', diff --git a/src/js/features/content/content.store.ts b/src/js/features/content/content.store.ts index 3924862e..b7327fdc 100644 --- a/src/js/features/content/content.store.ts +++ b/src/js/features/content/content.store.ts @@ -1,4 +1,5 @@ -import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; import axios from 'axios'; import { partialAboutUrl } from '@/constants/contentConstants'; import { printAPIError } from '@/utils/error.util'; diff --git a/src/js/features/data/data.store.ts b/src/js/features/data/data.store.ts index ec70833e..6c3dcc82 100644 --- a/src/js/features/data/data.store.ts +++ b/src/js/features/data/data.store.ts @@ -1,9 +1,10 @@ -import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; import { makeGetDataRequestThunk } from './makeGetDataRequest.thunk'; -import { Sections } from '@/types/data'; -import { Counts } from '@/types/overviewResponse'; -import { QueryState } from '@/features/search/query.store'; +import type { Sections } from '@/types/data'; +import type { Counts } from '@/types/overviewResponse'; +import type { QueryState } from '@/features/search/query.store'; export const populateClickable = createAsyncThunk( 'data/populateClickable', diff --git a/src/js/features/data/makeGetDataRequest.thunk.ts b/src/js/features/data/makeGetDataRequest.thunk.ts index 327b2747..ca6b3343 100644 --- a/src/js/features/data/makeGetDataRequest.thunk.ts +++ b/src/js/features/data/makeGetDataRequest.thunk.ts @@ -6,11 +6,11 @@ import { verifyData, saveValue, getValue, convertSequenceAndDisplayData } from ' import { DEFAULT_CHART_WIDTH, LOCALSTORAGE_CHARTS_KEY } from '@/constants/overviewConstants'; import { serializeChartData } from '@/utils/chart'; -import { ChartConfig } from '@/types/chartConfig'; -import { ChartDataField, LocalStorageData, Sections } from '@/types/data'; -import { Counts, OverviewResponse } from '@/types/overviewResponse'; +import type { ChartConfig } from '@/types/chartConfig'; +import type { ChartDataField, LocalStorageData, Sections } from '@/types/data'; +import type { Counts, OverviewResponse } from '@/types/overviewResponse'; import { printAPIError } from '@/utils/error.util'; -import { RootState } from '@/store'; +import type { RootState } from '@/store'; export const makeGetDataRequestThunk = createAsyncThunk< { sectionData: Sections; counts: Counts; defaultData: Sections }, diff --git a/src/js/features/dataTypes/dataTypes.store.ts b/src/js/features/dataTypes/dataTypes.store.ts index 7c31e082..0aac0aa0 100644 --- a/src/js/features/dataTypes/dataTypes.store.ts +++ b/src/js/features/dataTypes/dataTypes.store.ts @@ -1,4 +1,5 @@ -import { PayloadAction, createAsyncThunk, createSlice } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; import axios from 'axios'; // TODO: find a way to allow this without an auth token diff --git a/src/js/features/ingestion/lastIngestion.store.ts b/src/js/features/ingestion/lastIngestion.store.ts index 09146e2e..b899a494 100644 --- a/src/js/features/ingestion/lastIngestion.store.ts +++ b/src/js/features/ingestion/lastIngestion.store.ts @@ -1,9 +1,10 @@ -import { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; import { katsuLastIngestionsUrl, gohanLastIngestionsUrl } from '@/constants/configConstants'; import { printAPIError } from '@/utils/error.util'; -import { LastIngestionDataTypeResponse, DataTypeMap } from '@/types/lastIngestionDataTypeResponse'; +import type { LastIngestionDataTypeResponse, DataTypeMap } from '@/types/lastIngestionDataTypeResponse'; // Async thunks to fetch data from the two endpoints export const fetchKatsuData = createAsyncThunk('dataTypes/fetchKatsuData', (_, { rejectWithValue }) => diff --git a/src/js/features/metadata/metadata.store.ts b/src/js/features/metadata/metadata.store.ts index 1261dcf0..3d3fceac 100644 --- a/src/js/features/metadata/metadata.store.ts +++ b/src/js/features/metadata/metadata.store.ts @@ -1,7 +1,8 @@ -import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; import axios from 'axios'; -import { PaginatedResponse, Project } from '@/types/metadata'; -import { RootState } from '@/store'; +import type { PaginatedResponse, Project } from '@/types/metadata'; +import type { RootState } from '@/store'; import { printAPIError } from '@/utils/error.util'; import { validProjectDataset } from '@/utils/router'; import { projectsUrl } from '@/constants/configConstants'; diff --git a/src/js/features/provenance/provenance.store.ts b/src/js/features/provenance/provenance.store.ts index cc7a83a4..af0df1d8 100644 --- a/src/js/features/provenance/provenance.store.ts +++ b/src/js/features/provenance/provenance.store.ts @@ -2,7 +2,7 @@ import { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; import { provenanceUrl } from '@/constants/configConstants'; import { printAPIError } from '@/utils/error.util'; -import { ProvenanceAPIResponse, ProvenanceStore } from '@/types/provenance'; +import type { ProvenanceAPIResponse, ProvenanceStore } from '@/types/provenance'; export const makeGetProvenanceRequest = createAsyncThunk( 'provenance/getProvenance', diff --git a/src/js/features/search/makeGetKatsuPublic.thunk.ts b/src/js/features/search/makeGetKatsuPublic.thunk.ts index 6ccc6d49..04ad1c03 100644 --- a/src/js/features/search/makeGetKatsuPublic.thunk.ts +++ b/src/js/features/search/makeGetKatsuPublic.thunk.ts @@ -1,9 +1,9 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; import { katsuUrl } from '@/constants/configConstants'; -import { KatsuSearchResponse } from '@/types/search'; +import type { KatsuSearchResponse } from '@/types/search'; import { printAPIError } from '@/utils/error.util'; -import { RootState } from '@/store'; +import type { RootState } from '@/store'; export const makeGetKatsuPublic = createAsyncThunk< KatsuSearchResponse, diff --git a/src/js/features/search/makeGetSearchFields.thunk.ts b/src/js/features/search/makeGetSearchFields.thunk.ts index 81a21a2a..b0812fb1 100644 --- a/src/js/features/search/makeGetSearchFields.thunk.ts +++ b/src/js/features/search/makeGetSearchFields.thunk.ts @@ -2,8 +2,8 @@ import { createAsyncThunk } from '@reduxjs/toolkit'; import axios from 'axios'; import { searchFieldsUrl } from '@/constants/configConstants'; import { printAPIError } from '@/utils/error.util'; -import { SearchFieldResponse } from '@/types/search'; -import { RootState } from '@/store'; +import type { SearchFieldResponse } from '@/types/search'; +import type { RootState } from '@/store'; export const makeGetSearchFields = createAsyncThunk< SearchFieldResponse, diff --git a/src/js/features/search/query.store.ts b/src/js/features/search/query.store.ts index cdc47dd1..a732f9d2 100644 --- a/src/js/features/search/query.store.ts +++ b/src/js/features/search/query.store.ts @@ -1,9 +1,10 @@ -import { createSlice, PayloadAction } from '@reduxjs/toolkit'; +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createSlice } from '@reduxjs/toolkit'; import { makeGetKatsuPublic } from './makeGetKatsuPublic.thunk'; import { makeGetSearchFields } from './makeGetSearchFields.thunk'; import { serializeChartData } from '@/utils/chart'; -import { KatsuSearchResponse, SearchFieldResponse } from '@/types/search'; -import { ChartData } from '@/types/data'; +import type { KatsuSearchResponse, SearchFieldResponse } from '@/types/search'; +import type { ChartData } from '@/types/data'; export type QueryState = { isFetchingFields: boolean; diff --git a/src/js/hooks.ts b/src/js/hooks.ts index 1eba40be..daeb7131 100644 --- a/src/js/hooks.ts +++ b/src/js/hooks.ts @@ -1,11 +1,14 @@ -import React, { useCallback, useEffect, useState } from 'react'; -import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'; +import type React from 'react'; +import { useCallback, useEffect, useState } from 'react'; +import type { TypedUseSelectorHook } from 'react-redux'; +import { useDispatch, useSelector } from 'react-redux'; import { useTranslation } from 'react-i18next'; -import { RESOURCE_EVERYTHING, Resource, queryData, useHasResourcePermission } from 'bento-auth-js'; +import type { Resource } from 'bento-auth-js'; +import { RESOURCE_EVERYTHING, queryData, useHasResourcePermission } from 'bento-auth-js'; import type { RootState, AppDispatch } from '@/store'; import { DEFAULT_TRANSLATION, NON_DEFAULT_TRANSLATION } from '@/constants/configConstants'; -import { NamespaceTranslationFunction } from '@/types/translation'; +import type { NamespaceTranslationFunction } from '@/types/translation'; import { setMaxQueryParametersRequired } from '@/features/config//config.store'; import { CHART_WIDTH, GRID_GAP } from '@/constants/overviewConstants'; diff --git a/src/js/i18n.ts b/src/js/i18n.ts index a8ab33f9..de1e409b 100644 --- a/src/js/i18n.ts +++ b/src/js/i18n.ts @@ -1,4 +1,5 @@ -import i18n, { InitOptions } from 'i18next'; +import type { InitOptions } from 'i18next'; +import i18n from 'i18next'; import { initReactI18next } from 'react-i18next'; import LanguageDetector from 'i18next-browser-languagedetector'; import HttpApi from 'i18next-http-backend'; diff --git a/src/js/store.ts b/src/js/store.ts index 5642f05c..d1bfaaaf 100644 --- a/src/js/store.ts +++ b/src/js/store.ts @@ -1,12 +1,8 @@ import { configureStore } from '@reduxjs/toolkit'; -import { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore'; +import type { ToolkitStore } from '@reduxjs/toolkit/dist/configureStore'; -import { - LS_OPENID_CONFIG_KEY, - OIDCSliceState, - AuthReducer as auth, - OIDCReducer as openIdConfiguration, -} from 'bento-auth-js'; +import type { OIDCSliceState } from 'bento-auth-js'; +import { LS_OPENID_CONFIG_KEY, AuthReducer as auth, OIDCReducer as openIdConfiguration } from 'bento-auth-js'; import configReducer from '@/features/config/config.store'; import contentReducer from '@/features/content/content.store'; diff --git a/src/js/types/beacon.ts b/src/js/types/beacon.ts index 976ea11d..cb3c5b8f 100644 --- a/src/js/types/beacon.ts +++ b/src/js/types/beacon.ts @@ -1,5 +1,5 @@ -import { Rule } from 'antd/es/form'; -import { Datum } from '@/types/overviewResponse'; +import type { Rule } from 'antd/es/form'; +import type { Datum } from '@/types/overviewResponse'; // ---------------------------- // form handling diff --git a/src/js/types/chartConfig.ts b/src/js/types/chartConfig.ts index 54b737ca..b1331d18 100644 --- a/src/js/types/chartConfig.ts +++ b/src/js/types/chartConfig.ts @@ -1,4 +1,4 @@ -import { ChoroplethMapProps } from 'bento-charts/dist/maps'; +import type { ChoroplethMapProps } from 'bento-charts/dist/maps'; // Use multiple literals here instead of an object for full immutability. export const CHART_TYPE_PIE = 'pie'; diff --git a/src/js/types/data.ts b/src/js/types/data.ts index 9df7939d..d0391f44 100644 --- a/src/js/types/data.ts +++ b/src/js/types/data.ts @@ -1,5 +1,5 @@ -import { ChartConfig } from '@/types/chartConfig'; -import { OverviewResponseDataField } from '@/types/overviewResponse'; +import type { ChartConfig } from '@/types/chartConfig'; +import type { OverviewResponseDataField } from '@/types/overviewResponse'; export type Sections = Section[]; diff --git a/src/js/types/metadata.ts b/src/js/types/metadata.ts index 66a8e3c1..a22a6d17 100644 --- a/src/js/types/metadata.ts +++ b/src/js/types/metadata.ts @@ -1,6 +1,6 @@ -import { Layout as DiscoveryOverview, Fields as DiscoveryFields } from '@/types/overviewResponse'; -import { Section as DiscoverySearch } from '@/types/search'; -import { DiscoveryRules } from '@/types/configResponse'; +import type { Layout as DiscoveryOverview, Fields as DiscoveryFields } from '@/types/overviewResponse'; +import type { Section as DiscoverySearch } from '@/types/search'; +import type { DiscoveryRules } from '@/types/configResponse'; export interface Discovery { overview: DiscoveryOverview[]; diff --git a/src/js/types/overviewResponse.ts b/src/js/types/overviewResponse.ts index e1755685..ec493b8a 100644 --- a/src/js/types/overviewResponse.ts +++ b/src/js/types/overviewResponse.ts @@ -1,4 +1,4 @@ -import { ChartConfig } from '@/types/chartConfig'; +import type { ChartConfig } from '@/types/chartConfig'; export interface OverviewResponse { overview: Overview; diff --git a/src/js/types/search.ts b/src/js/types/search.ts index 0ced9711..d333968f 100644 --- a/src/js/types/search.ts +++ b/src/js/types/search.ts @@ -1,4 +1,4 @@ -import { Datum } from '@/types/overviewResponse'; +import type { Datum } from '@/types/overviewResponse'; export type QueryParams = { [key: string]: string }; diff --git a/src/js/utils/beaconApiError.ts b/src/js/utils/beaconApiError.ts index 085f0fec..365f3009 100644 --- a/src/js/utils/beaconApiError.ts +++ b/src/js/utils/beaconApiError.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { AxiosError } from 'axios'; -import { BeaconErrorData } from '@/types/beacon'; +import type { AxiosError } from 'axios'; +import type { BeaconErrorData } from '@/types/beacon'; export const beaconApiError = (rejectWithValue: (value: string) => any) => (error: AxiosError) => { if (error.response) { diff --git a/src/js/utils/chart.ts b/src/js/utils/chart.ts index b9cf0f62..0b9d580b 100644 --- a/src/js/utils/chart.ts +++ b/src/js/utils/chart.ts @@ -1,5 +1,5 @@ -import { Datum } from '@/types/overviewResponse'; -import { ChartData } from '@/types/data'; +import type { Datum } from '@/types/overviewResponse'; +import type { ChartData } from '@/types/data'; export const serializeChartData = (chartData: Datum[]): ChartData[] => { return chartData.map(({ label, value }) => ({ x: label, y: value })); diff --git a/src/js/utils/error.util.ts b/src/js/utils/error.util.ts index 1e608872..97b49f29 100644 --- a/src/js/utils/error.util.ts +++ b/src/js/utils/error.util.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { AxiosError } from 'axios'; +import type { AxiosError } from 'axios'; export const printAPIError = (rejectWithValue: (value: string) => any) => (error: AxiosError) => { if (error.response) { diff --git a/src/js/utils/localStorage.ts b/src/js/utils/localStorage.ts index d1710590..fde00c02 100644 --- a/src/js/utils/localStorage.ts +++ b/src/js/utils/localStorage.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { LocalStorageData, Sections } from '@/types/data'; -import { ValueOf } from '@/types/util'; +import type { LocalStorageData, Sections } from '@/types/data'; +import type { ValueOf } from '@/types/util'; export const verifyData = (nObj: any, oObj: LocalStorageData) => { const verifyCharts = (nCharts: any, oCharts: ValueOf) => { diff --git a/src/js/utils/router.ts b/src/js/utils/router.ts index 6c12f392..1c6c188b 100644 --- a/src/js/utils/router.ts +++ b/src/js/utils/router.ts @@ -1,5 +1,5 @@ import { BentoRoute } from '@/types/routes'; -import { MetadataState } from '@/features/metadata/metadata.store'; +import type { MetadataState } from '@/features/metadata/metadata.store'; export const getCurrentPage = (): BentoRoute => { const pathArray = window.location.pathname.split('/'); diff --git a/src/js/utils/search.ts b/src/js/utils/search.ts index 4f185021..dcd41a28 100644 --- a/src/js/utils/search.ts +++ b/src/js/utils/search.ts @@ -1,4 +1,4 @@ -import { QueryParams } from '@/types/search'; +import type { QueryParams } from '@/types/search'; export const buildQueryParamsUrl = (pathName: string, qp: QueryParams): string => `${pathName}?${new URLSearchParams(qp).toString()}`; From 86d832ca757feb14a8a9351c7d72632ea620e41e Mon Sep 17 00:00:00 2001 From: Sanjeev Lakhwani Date: Mon, 26 Aug 2024 13:53:47 -0400 Subject: [PATCH 4/4] pr changes --- src/js/components/Beacon/VariantsForm.tsx | 2 +- src/js/hooks.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/components/Beacon/VariantsForm.tsx b/src/js/components/Beacon/VariantsForm.tsx index 6debeb89..4b8e9bab 100644 --- a/src/js/components/Beacon/VariantsForm.tsx +++ b/src/js/components/Beacon/VariantsForm.tsx @@ -1,5 +1,5 @@ -import type { CSSProperties } from 'react'; import React from 'react'; +import type { CSSProperties } from 'react'; import { useTranslation } from 'react-i18next'; import { Col, Row } from 'antd'; import VariantInput from './VariantInput'; diff --git a/src/js/hooks.ts b/src/js/hooks.ts index daeb7131..dc0e24bc 100644 --- a/src/js/hooks.ts +++ b/src/js/hooks.ts @@ -1,4 +1,4 @@ -import type React from 'react'; +import type { RefObject } from 'react'; import { useCallback, useEffect, useState } from 'react'; import type { TypedUseSelectorHook } from 'react-redux'; import { useDispatch, useSelector } from 'react-redux'; @@ -66,7 +66,7 @@ function isSpaceAvailable(element: HTMLElement): boolean { return rect.right + CHART_WIDTH + GRID_GAP + 64 < window.innerWidth; } -export const useElementWidth = (ref: React.RefObject, initialWidth: number) => { +export const useElementWidth = (ref: RefObject, initialWidth: number) => { const [width, setWidth] = useState(initialWidth); const adjustWidth = useCallback(() => {