From 6395f125d1d544ead4c7dc9a880eadc4e20e44dd Mon Sep 17 00:00:00 2001 From: hazre Date: Fri, 27 Feb 2026 09:17:37 +0100 Subject: [PATCH 01/59] chore(lint): add knip --- knip.json | 6 + package-lock.json | 665 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 4 +- 3 files changed, 673 insertions(+), 2 deletions(-) create mode 100644 knip.json diff --git a/knip.json b/knip.json new file mode 100644 index 00000000..c9201d3b --- /dev/null +++ b/knip.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://unpkg.com/knip@5/schema.json", + "tags": [ + "-lintignore" + ] +} diff --git a/package-lock.json b/package-lock.json index 22781aba..850c7724 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,8 +94,9 @@ "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.1", + "knip": "5.85.0", "prettier": "^3.8.1", - "typescript": "^5.9.3", + "typescript": "5.9.3", "typescript-eslint": "^8.56.1", "vite": "^7.3.1", "vite-plugin-pwa": "^1.2.0", @@ -1762,6 +1763,40 @@ "integrity": "sha512-OViKJonDaDNVBUW9WdV9mk78/Ruh34C7XsEgt3O8D9z+64C39elbIgllHSoH5S12IRlv9RYrrV37FZLo6QWsDQ==", "dev": true }, + "node_modules/@emnapi/core": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.8.1.tgz", + "integrity": "sha512-AvT9QFpxK0Zd8J0jopedNm+w/2fIzvtPKPjqyw9jwvBaReTTqPBk9Hixaz7KbjimP+QNz605/XnjFcDAL2pqBg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.1.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.8.1.tgz", + "integrity": "sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@emotion/hash": { "version": "0.9.2", "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz", @@ -2887,6 +2922,344 @@ "url": "https://github.com/sponsors/Brooooooklyn" } }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz", + "integrity": "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1", + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "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" + }, + "engines": { + "node": ">= 8" + } + }, + "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" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@oxc-resolver/binding-android-arm-eabi": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm-eabi/-/binding-android-arm-eabi-11.19.0.tgz", + "integrity": "sha512-dlMjjWE3h+qMujLp5nBX/x7R5ny+xfr4YtsyaMNuM5JImOtQBzpFxQr9kJOKGL+9RbaoTOXpt5KF05f9pnOsgw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@oxc-resolver/binding-android-arm64": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-android-arm64/-/binding-android-arm64-11.19.0.tgz", + "integrity": "sha512-x5P0Y12oMcSC9PKkz1FtdVVLosXYi/05m+ufxPrUggd6vZRBPJhW4zZUsMVbz8dwwk71Dh0f6/2ntw3WPOq+Ig==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@oxc-resolver/binding-darwin-arm64": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-arm64/-/binding-darwin-arm64-11.19.0.tgz", + "integrity": "sha512-DjnuIPB60IQrVSCiuVBzN8/8AeeIjthdkk+dZYdZzgLeP2T5ZF41u50haJMtIdGr5cRzRH6zPV/gh6+RFjlvKA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxc-resolver/binding-darwin-x64": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-darwin-x64/-/binding-darwin-x64-11.19.0.tgz", + "integrity": "sha512-dVAqIZIIY7xOXCCV0nJPs8ExlYc6R7mcNpFobwNyE3qlXGbgvwb7Gl3iOumOiPBfF+sbJR3MMP7RAPfKqbvYyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oxc-resolver/binding-freebsd-x64": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-freebsd-x64/-/binding-freebsd-x64-11.19.0.tgz", + "integrity": "sha512-kwcZ30bIpJNFcT22sIlde4mz0EyXmB3lAefCFWtffqpbmLweQUwz1dKDcsutxEjpkbEKLmfrj1wCyRZp7n5Hnw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm-gnueabihf": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-11.19.0.tgz", + "integrity": "sha512-GImk/cb3X+zBGEwr6l9h0dbiNo5zNd52gamZmluEpbyybiZ8kc5q44/7zRR4ILChWRW7pI92W57CJwhkF+wRmg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm-musleabihf": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-11.19.0.tgz", + "integrity": "sha512-uIEyws3bBD1gif4SZCOV2XIr6q5fd1WbzzBbpL8qk+TbzOvKMWnMNNtfNacnAGGa2lLRNXR1Fffot2mlZ/Xmbw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm64-gnu": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-11.19.0.tgz", + "integrity": "sha512-bIkgp+AB+yZfvdKDfjFT7PycsRtih7+zCV5AbnkzfyvNvQ47rfssf8R1IbG++mx+rZ4YUCUu8EbP66HC3O5c5w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-arm64-musl": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-arm64-musl/-/binding-linux-arm64-musl-11.19.0.tgz", + "integrity": "sha512-bOt5pKPcbidTSy64m2CfM0XcaCmxBEFclCMPuOPO08hh8QIFTiZVhFf/OxTFqyRwhq/tlzzKmXpMo7DfzbO5lQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-ppc64-gnu": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-11.19.0.tgz", + "integrity": "sha512-BymEPqVeLZzA/1kXow9U9rdniq1r5kk4u686Cx3ZU77YygR48NJI/2TyjM70vKHZffGx75ZShobcc1M5GXG3WA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-riscv64-gnu": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-11.19.0.tgz", + "integrity": "sha512-aFgPTzZZY+XCYe4B+3A1S63xcIh2i136+2TPXWr9NOwXXTdMdBntb1J9fEgxXDnX82MjBknLUpJqAZHNTJzixA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-riscv64-musl": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-11.19.0.tgz", + "integrity": "sha512-9WDGt7fV9GK97WrWE/VEDhMFv9m0ZXYn5NQ+16QvyT0ux8yGLAvyadi6viaTjEdJII/OaHBRYHcL+zUjmaWwmg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-s390x-gnu": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-11.19.0.tgz", + "integrity": "sha512-SY3di6tccocppAVal5Hev3D6D1N5Y6TCEypAvNCOiPqku2Y8U/aXfvGbthqdPNa72KYqjUR1vomOv6J9thHITA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-x64-gnu": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-gnu/-/binding-linux-x64-gnu-11.19.0.tgz", + "integrity": "sha512-SV+4zBeCC3xjSE2wvhN45eyABoVRX3xryWBABFKfLwAWhF3wsB3bUF+CantYfQ/TLpasyvplRS9ovvFT9cb/0A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-linux-x64-musl": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-linux-x64-musl/-/binding-linux-x64-musl-11.19.0.tgz", + "integrity": "sha512-LkbjO+r5Isl8Xl29pJYOCB/iSUIULFUJDGdMp+yJD3OgWtSa6VJta2iw7QXmpcoOkq18UIL09yWrlyjLDL0Hug==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oxc-resolver/binding-openharmony-arm64": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-openharmony-arm64/-/binding-openharmony-arm64-11.19.0.tgz", + "integrity": "sha512-Ud1gelL5slpEU5AjzBWQz1WheprOAl5CPnCKTWynvvdlBbAZXA6fPYLuCrlRo0uw+x3f37XJ71kirpSew8Zyvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@oxc-resolver/binding-wasm32-wasi": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-wasm32-wasi/-/binding-wasm32-wasi-11.19.0.tgz", + "integrity": "sha512-wXLNAVmL4vWXKaYJnFPgg5zQsSr3Rv+ftNReIU3UkzTcoVLK0805Pnbr2NwcBWSO5hhpOEdys02qlT2kxVgjWw==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.1.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@oxc-resolver/binding-win32-arm64-msvc": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-11.19.0.tgz", + "integrity": "sha512-zszvr0dJfvv0Jg49hLwjAJ4SRzfsq28SoearUtT1qv3qXRYsBWuctdlRa/lEZkiuG4tZWiY425Jh9QqLafwsAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxc-resolver/binding-win32-ia32-msvc": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-11.19.0.tgz", + "integrity": "sha512-I7ZYujr5XL1l7OwuddbOeqdUyFOaf51W1U2xUogInFdupIAKGqbpugpAK6RaccLcSlN0bbuo3CS5h7ue38SUAg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oxc-resolver/binding-win32-x64-msvc": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/@oxc-resolver/binding-win32-x64-msvc/-/binding-win32-x64-msvc-11.19.0.tgz", + "integrity": "sha512-NxErbI1TmJEZZVvGPePjgXFZCuOzrjQuJ6YwHjcWkelReK7Uhg4QeL05zRdfTpgkH6IY/C8OjbKx5ZilQ4yDFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@react-aria/breadcrumbs": { "version": "3.5.31", "resolved": "https://registry.npmjs.org/@react-aria/breadcrumbs/-/breadcrumbs-3.5.31.tgz", @@ -5723,6 +6096,17 @@ "url": "https://github.com/sponsors/tannerlinsley" } }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -9086,6 +9470,36 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -9115,6 +9529,26 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fd-package-json": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fd-package-json/-/fd-package-json-2.0.0.tgz", + "integrity": "sha512-jKmm9YtsNXN789RS/0mSzOC1NUq9mkVd65vbSSVsKdjGvYXBuE4oWe2QOEoFeRmJg+lPuZxpmrfFclNhoRMneQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "walk-up-path": "^4.0.0" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -9302,6 +9736,22 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/formatly": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/formatly/-/formatly-0.3.0.tgz", + "integrity": "sha512-9XNj/o4wrRFyhSMJOvsuyMwy8aUfBaZ1VrqHVfohyXf0Sw0e+yfKG+xZaY3arGCOMdwFsqObtzVOc1gU9KiT9w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fd-package-json": "^2.0.0" + }, + "bin": { + "formatly": "bin/index.mjs" + }, + "engines": { + "node": ">=18.3.0" + } + }, "node_modules/framer-motion": { "version": "12.34.3", "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.34.3.tgz", @@ -10494,6 +10944,16 @@ "integrity": "sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==", "license": "MIT" }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, "node_modules/jotai": { "version": "2.18.0", "resolved": "https://registry.npmjs.org/jotai/-/jotai-2.18.0.tgz", @@ -10653,6 +11113,61 @@ "json-buffer": "3.0.1" } }, + "node_modules/knip": { + "version": "5.85.0", + "resolved": "https://registry.npmjs.org/knip/-/knip-5.85.0.tgz", + "integrity": "sha512-V2kyON+DZiYdNNdY6GALseiNCwX7dYdpz9Pv85AUn69Gk0UKCts+glOKWfe5KmaMByRjM9q17Mzj/KinTVOyxg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/webpro" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/knip" + } + ], + "license": "ISC", + "dependencies": { + "@nodelib/fs.walk": "^1.2.3", + "fast-glob": "^3.3.3", + "formatly": "^0.3.0", + "jiti": "^2.6.0", + "js-yaml": "^4.1.1", + "minimist": "^1.2.8", + "oxc-resolver": "^11.15.0", + "picocolors": "^1.1.1", + "picomatch": "^4.0.1", + "smol-toml": "^1.5.2", + "strip-json-comments": "5.0.3", + "zod": "^4.1.11" + }, + "bin": { + "knip": "bin/knip.js", + "knip-bun": "bin/knip-bun.js" + }, + "engines": { + "node": ">=18.18.0" + }, + "peerDependencies": { + "@types/node": ">=18", + "typescript": ">=5.0.4 <7" + } + }, + "node_modules/knip/node_modules/strip-json-comments": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-5.0.3.tgz", + "integrity": "sha512-1tB5mhVo7U+ETBKNf92xT4hrQa3pm0MZ0PQvuDnWgAAGHDsfp4lPSpiS6psrSiet87wyGPh9ft6wmhOMQ0hDiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/language-subtag-registry": { "version": "0.3.23", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", @@ -10899,6 +11414,43 @@ "@babel/runtime": "^7.12.5" } }, + "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" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/millify": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/millify/-/millify-6.1.0.tgz", @@ -11224,6 +11776,38 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/oxc-resolver": { + "version": "11.19.0", + "resolved": "https://registry.npmjs.org/oxc-resolver/-/oxc-resolver-11.19.0.tgz", + "integrity": "sha512-oEe42WEoZc2T5sCQqgaRBx8huzP4cJvrnm+BfNTJESdtM633Tqs6iowkpsMTXgnb7SLwU6N6D9bqwW/PULjo6A==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxc-resolver/binding-android-arm-eabi": "11.19.0", + "@oxc-resolver/binding-android-arm64": "11.19.0", + "@oxc-resolver/binding-darwin-arm64": "11.19.0", + "@oxc-resolver/binding-darwin-x64": "11.19.0", + "@oxc-resolver/binding-freebsd-x64": "11.19.0", + "@oxc-resolver/binding-linux-arm-gnueabihf": "11.19.0", + "@oxc-resolver/binding-linux-arm-musleabihf": "11.19.0", + "@oxc-resolver/binding-linux-arm64-gnu": "11.19.0", + "@oxc-resolver/binding-linux-arm64-musl": "11.19.0", + "@oxc-resolver/binding-linux-ppc64-gnu": "11.19.0", + "@oxc-resolver/binding-linux-riscv64-gnu": "11.19.0", + "@oxc-resolver/binding-linux-riscv64-musl": "11.19.0", + "@oxc-resolver/binding-linux-s390x-gnu": "11.19.0", + "@oxc-resolver/binding-linux-x64-gnu": "11.19.0", + "@oxc-resolver/binding-linux-x64-musl": "11.19.0", + "@oxc-resolver/binding-openharmony-arm64": "11.19.0", + "@oxc-resolver/binding-wasm32-wasi": "11.19.0", + "@oxc-resolver/binding-win32-arm64-msvc": "11.19.0", + "@oxc-resolver/binding-win32-ia32-msvc": "11.19.0", + "@oxc-resolver/binding-win32-x64-msvc": "11.19.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -11569,6 +12153,27 @@ "node": ">=6" } }, + "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": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/raf-schd": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz", @@ -11991,6 +12596,17 @@ "node": ">=4" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, "node_modules/rollup": { "version": "4.57.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz", @@ -12035,6 +12651,30 @@ "fsevents": "~2.3.2" } }, + "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": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safe-array-concat": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", @@ -12390,6 +13030,19 @@ "node": ">=20.0.0" } }, + "node_modules/smol-toml": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz", + "integrity": "sha512-4zemZi0HvTnYwLfrpk/CF9LOd9Lt87kAt50GnqhMpyF9U3poDAP2+iukq2bZsO/ufegbYehBkqINbsWxj4l4cw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 18" + }, + "funding": { + "url": "https://github.com/sponsors/cyyynthia" + } + }, "node_modules/snake-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", @@ -13866,6 +14519,16 @@ "node": ">=0.10.0" } }, + "node_modules/walk-up-path": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz", + "integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/package.json b/package.json index 1fe71d42..25f68e65 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "check:eslint": "eslint src/*", "check:prettier": "prettier --check .", "fix:prettier": "prettier --write .", - "typecheck": "tsc" + "typecheck": "tsc", + "knip": "knip" }, "keywords": [], "author": "7w1", @@ -108,6 +109,7 @@ "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.1", + "knip": "5.85.0", "prettier": "^3.8.1", "typescript": "^5.9.3", "typescript-eslint": "^8.56.1", From 44fbfa0d0e3b8aadd06fc2d79356911c69ac15d8 Mon Sep 17 00:00:00 2001 From: hazre Date: Fri, 27 Feb 2026 10:39:00 +0100 Subject: [PATCH 02/59] chore: tighten knip/eslint config and remove dead code --- eslint.config.js | 40 +- knip.json | 15 +- package-lock.json | 746 +++++++++++++----- package.json | 20 +- src/app/components/CapabilitiesLoader.tsx | 19 - src/app/components/MediaConfigLoader.tsx | 19 - .../components/SpaceChildDirectsProvider.tsx | 28 - .../components/SpaceChildRoomsProvider.tsx | 28 - src/app/components/editor/Editor.preview.tsx | 84 -- src/app/features/space-settings/styles.css.ts | 6 - src/app/hooks/useDisplayName.ts | 17 - src/app/hooks/useForceUpdate.js | 13 - src/app/hooks/useUserTrustStatusChange.ts | 16 - src/app/pages/client/sidebar/SettingsTab.tsx | 49 -- src/app/state/hooks/inviteList.ts | 55 -- src/app/utils/disposable.ts | 16 - src/index.tsx | 1 - src/types/utils.ts | 3 - tsconfig.json | 2 +- 19 files changed, 611 insertions(+), 566 deletions(-) delete mode 100644 src/app/components/CapabilitiesLoader.tsx delete mode 100644 src/app/components/MediaConfigLoader.tsx delete mode 100644 src/app/components/SpaceChildDirectsProvider.tsx delete mode 100644 src/app/components/SpaceChildRoomsProvider.tsx delete mode 100644 src/app/components/editor/Editor.preview.tsx delete mode 100644 src/app/features/space-settings/styles.css.ts delete mode 100644 src/app/hooks/useDisplayName.ts delete mode 100644 src/app/hooks/useForceUpdate.js delete mode 100644 src/app/hooks/useUserTrustStatusChange.ts delete mode 100644 src/app/pages/client/sidebar/SettingsTab.tsx delete mode 100644 src/app/state/hooks/inviteList.ts delete mode 100644 src/app/utils/disposable.ts delete mode 100644 src/types/utils.ts diff --git a/eslint.config.js b/eslint.config.js index 792e263f..4f32bc93 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,15 +1,21 @@ import js from '@eslint/js'; +import { includeIgnoreFile } from '@eslint/compat'; import { defineConfig } from 'eslint/config'; +import { fileURLToPath } from 'node:url'; import css from '@eslint/css'; +import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'; import tseslint from 'typescript-eslint'; import react from 'eslint-plugin-react'; import reactHooks from 'eslint-plugin-react-hooks'; -import importPlugin from 'eslint-plugin-import'; +import jsxA11y from 'eslint-plugin-jsx-a11y'; +import { createNodeResolver, importX } from 'eslint-plugin-import-x'; +import unusedImports from 'eslint-plugin-unused-imports'; import eslintConfigPrettier from 'eslint-config-prettier'; -const sourceFiles = ['**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}']; -const tsSourceFiles = ['**/*.{ts,tsx,mts,cts}']; -const jsSourceFiles = ['**/*.{js,jsx,mjs,cjs}']; +const sourceFiles = ['src/**/*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}']; +const tsSourceFiles = ['src/**/*.{ts,tsx,mts,cts}']; +const jsSourceFiles = ['src/**/*.{js,jsx,mjs,cjs}']; +const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url)); const scopedRecommendedTsConfigs = tseslint.configs.recommended.map((config) => config.files ? config : { ...config, files: sourceFiles } ); @@ -18,6 +24,7 @@ const scopedRecommendedTypeCheckedTsConfigs = tseslint.configs.recommendedTypeCh ); export default defineConfig( + includeIgnoreFile(gitignorePath), { files: ['**/*.css'], plugins: { css }, @@ -41,20 +48,30 @@ export default defineConfig( react: { version: 'detect', }, + 'import-x/resolver-next': [ + createTypeScriptImportResolver({ + project: './tsconfig.json', + }), + createNodeResolver(), + ], }, }, { ...js.configs.recommended, files: sourceFiles }, ...scopedRecommendedTsConfigs, ...scopedRecommendedTypeCheckedTsConfigs, - { ...importPlugin.flatConfigs.recommended, files: sourceFiles }, - { ...importPlugin.flatConfigs.typescript, files: tsSourceFiles }, + { ...importX.flatConfigs.recommended, files: sourceFiles }, + { ...importX.flatConfigs.typescript, files: tsSourceFiles }, { ...react.configs.flat.recommended, files: sourceFiles }, { ...react.configs.flat['jsx-runtime'], files: sourceFiles }, + { ...jsxA11y.flatConfigs.recommended, files: sourceFiles }, { ...reactHooks.configs.flat.recommended, files: sourceFiles }, { ...tseslint.configs.disableTypeChecked, files: jsSourceFiles }, { ...eslintConfigPrettier, files: sourceFiles }, { files: sourceFiles, + plugins: { + 'unused-imports': unusedImports, + }, rules: { 'linebreak-style': 'off', 'no-unused-vars': 'off', @@ -70,18 +87,15 @@ export default defineConfig( 'react/require-default-props': 'off', 'react/jsx-props-no-spreading': 'off', 'react-hooks/exhaustive-deps': 'error', - 'import/no-extraneous-dependencies': [ + 'import-x/no-extraneous-dependencies': [ 'error', { devDependencies: true, }, ], - '@typescript-eslint/no-unused-vars': [ - 'error', - { - varsIgnorePattern: '^React$', - }, - ], + '@typescript-eslint/no-unused-vars': 'off', + 'unused-imports/no-unused-imports': 'error', + 'unused-imports/no-unused-vars': 'error', '@typescript-eslint/no-shadow': 'error', }, }, diff --git a/knip.json b/knip.json index c9201d3b..bc885b41 100644 --- a/knip.json +++ b/knip.json @@ -1,6 +1,15 @@ { "$schema": "https://unpkg.com/knip@5/schema.json", - "tags": [ - "-lintignore" - ] + "entry": ["src/sw.ts", "scripts/normalize-imports.js"], + "ignoreExportsUsedInFile": { + "interface": true, + "type": true + }, + "ignoreDependencies": ["buffer", "@element-hq/element-call-embedded"], + "rules": { + "exports": "off", + "types": "off", + "enumMembers": "off" + }, + "tags": ["-lintignore"] } diff --git a/package-lock.json b/package-lock.json index 850c7724..fb279440 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,6 @@ "browser-encrypt-attachment": "^0.3.0", "chroma-js": "^3.2.0", "classnames": "^2.5.1", - "dateformat": "^5.0.3", "dayjs": "^1.11.19", "domhandler": "^5.0.3", "emojibase": "^15.3.1", @@ -71,8 +70,8 @@ "devDependencies": { "@element-hq/element-call-embedded": "0.16.3", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", + "@eslint/compat": "2.0.2", "@eslint/css": "^0.14.1", - "@eslint/eslintrc": "^3.3.4", "@eslint/js": "^9.39.3", "@rollup/plugin-inject": "^5.0.5", "@rollup/plugin-wasm": "^6.2.2", @@ -90,13 +89,15 @@ "buffer": "^6.0.3", "eslint": "^9.39.3", "eslint-config-prettier": "^10.1.8", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-import-resolver-typescript": "4.4.4", + "eslint-plugin-import-x": "4.16.1", + "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-unused-imports": "4.4.1", "knip": "5.85.0", "prettier": "^3.8.1", - "typescript": "5.9.3", + "typescript": "^5.9.3", "typescript-eslint": "^8.56.1", "vite": "^7.3.1", "vite-plugin-pwa": "^1.2.0", @@ -2282,6 +2283,40 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/compat": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-2.0.2.tgz", + "integrity": "sha512-pR1DoD0h3HfF675QZx0xsyrsU8q70Z/plx7880NOhS02NuWLgBCOMDL787nUeQ7EWLkxv3bPQJaarjcPQb2Dwg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "peerDependencies": { + "eslint": "^8.40 || 9 || 10" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/compat/node_modules/@eslint/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz", + "integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, "node_modules/@eslint/config-array": { "version": "0.21.1", "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", @@ -5519,13 +5554,6 @@ "win32" ] }, - "node_modules/@rtsao/scc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", - "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", - "dev": true, - "license": "MIT" - }, "node_modules/@surma/rollup-plugin-off-main-thread": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz", @@ -6188,12 +6216,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", - "dev": true - }, "node_modules/@types/node": { "version": "24.10.13", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.13.tgz", @@ -6551,6 +6573,288 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz", + "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz", + "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz", + "integrity": "sha512-gPVA1UjRu1Y/IsB/dQEsp2V1pm44Of6+LWvbLc9SDk1c2KhhDRDBUkQCYVWe6f26uJb3fOK8saWMgtX8IrMk3g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz", + "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz", + "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz", + "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz", + "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz", + "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz", + "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz", + "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz", + "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz", + "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz", + "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz", + "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz", + "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz", + "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^0.2.11" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@unrs/resolver-binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" + } + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@use-gesture/core": { "version": "10.3.1", "resolved": "https://registry.npmjs.org/@use-gesture/core/-/core-10.3.1.tgz", @@ -7716,28 +8020,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.6.tgz", - "integrity": "sha512-F/TKATkzseUExPlfvmwQKGITM3DGTK+vkAsCZoDc5daVygbJBnjEUCbgkAvVFsgfXfX4YIqZ/27G3k3tdXrTxQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.8", - "call-bound": "^1.0.4", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.9", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "es-shim-unscopables": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/array.prototype.flat": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", @@ -7859,10 +8141,11 @@ } }, "node_modules/axe-core": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.10.2.tgz", - "integrity": "sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.1.tgz", + "integrity": "sha512-BASOg+YwO2C+346x3LZOeoovTIoTrRqEsqMa6fmfAV0P+U9mFr9NsyOEpiYvFjbc64NMrSswhV50WdXzdb/Z5A==", "dev": true, + "license": "MPL-2.0", "engines": { "node": ">=4" } @@ -8310,6 +8593,16 @@ "dev": true, "license": "MIT" }, + "node_modules/comment-parser": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.5.tgz", + "integrity": "sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/common-tags": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", @@ -8450,7 +8743,8 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", - "dev": true + "dev": true, + "license": "BSD-2-Clause" }, "node_modules/data-view-buffer": { "version": "1.0.2", @@ -8503,14 +8797,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/dateformat": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-5.0.3.tgz", - "integrity": "sha512-Kvr6HmPXUMerlLcLF+Pwq3K7apHpYmGDVqrxcDasBg86UcKeTSNWbEzU8bwdXnxnR44FtMhJAxI4Bov6Y/KUfA==", - "engines": { - "node": ">=12.20" - } - }, "node_modules/dayjs": { "version": "1.11.19", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz", @@ -8721,7 +9007,8 @@ "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/emojibase": { "version": "15.3.1", @@ -9076,116 +9363,140 @@ "eslint": ">=7.0.0" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.1.tgz", - "integrity": "sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==", + "node_modules/eslint-import-context": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", + "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^3.2.7" + "get-tsconfig": "^4.10.1", + "stable-hash-x": "^0.2.0" }, "engines": { - "node": ">=4" + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-context" + }, + "peerDependencies": { + "unrs-resolver": "^1.0.0" }, "peerDependenciesMeta": { - "eslint": { + "unrs-resolver": { "optional": true } } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-import-resolver-typescript": { + "version": "4.4.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-4.4.4.tgz", + "integrity": "sha512-1iM2zeBvrYmUNTj2vSC/90JTHDth+dfOfiNKkxApWRsTJYNrc8rOdxxIf5vazX+BiAXTeOT0UvWpGI/7qIWQOw==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import": { - "version": "2.32.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz", - "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@rtsao/scc": "^1.1.0", - "array-includes": "^3.1.9", - "array.prototype.findlastindex": "^1.2.6", - "array.prototype.flat": "^1.3.3", - "array.prototype.flatmap": "^1.3.3", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.12.1", - "hasown": "^2.0.2", - "is-core-module": "^2.16.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.8", - "object.groupby": "^1.0.3", - "object.values": "^1.2.1", - "semver": "^6.3.1", - "string.prototype.trimend": "^1.0.9", - "tsconfig-paths": "^3.15.0" + "debug": "^4.4.1", + "eslint-import-context": "^0.1.8", + "get-tsconfig": "^4.10.1", + "is-bun-module": "^2.0.0", + "stable-hash-x": "^0.2.0", + "tinyglobby": "^0.2.14", + "unrs-resolver": "^1.7.11" }, "engines": { - "node": ">=4" + "node": "^16.17.0 || >=18.6.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-resolver-typescript" }, "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-plugin-import-x": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.16.1.tgz", + "integrity": "sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" + "@typescript-eslint/types": "^8.35.0", + "comment-parser": "^1.4.1", + "debug": "^4.4.1", + "eslint-import-context": "^0.1.9", + "is-glob": "^4.0.3", + "minimatch": "^9.0.3 || ^10.0.1", + "semver": "^7.7.2", + "stable-hash-x": "^0.2.0", + "unrs-resolver": "^1.9.2" }, "engines": { - "node": ">=0.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-import-x" + }, + "peerDependencies": { + "@typescript-eslint/utils": "^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "eslint-import-resolver-node": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/utils": { + "optional": true + }, + "eslint-import-resolver-node": { + "optional": true + } } }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/eslint-plugin-import-x/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/eslint-plugin-import-x/node_modules/brace-expansion": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.3.tgz", + "integrity": "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/eslint-plugin-import-x/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/eslint-plugin-jsx-a11y": { @@ -9309,6 +9620,22 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.4.1.tgz", + "integrity": "sha512-oZGYUz1X3sRMGUB+0cZyK2VcvRX5lm/vB56PgNNcU+7ficUCKm66oZWKUubXWnOuPjQ8PvmXtCViXBMONPe7tQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", + "eslint": "^10.0.0 || ^9.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "8.4.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", @@ -9909,6 +10236,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.13.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz", + "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/glob/-/glob-11.1.0.tgz", @@ -10499,6 +10839,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-bun-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-2.0.0.tgz", + "integrity": "sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.7.1" + } + }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", @@ -11172,13 +11522,15 @@ "version": "0.3.23", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", - "dev": true + "dev": true, + "license": "CC0-1.0" }, "node_modules/language-tags": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", "dev": true, + "license": "MIT", "dependencies": { "language-subtag-registry": "^0.3.20" }, @@ -11550,6 +11902,22 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-postinstall": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", + "integrity": "sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==", + "dev": true, + "license": "MIT", + "bin": { + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -11692,20 +12060,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/object.values": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz", @@ -12596,6 +12950,16 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", @@ -13134,6 +13498,16 @@ "dev": true, "license": "MIT" }, + "node_modules/stable-hash-x": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz", + "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/stop-iteration-iterator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", @@ -13301,15 +13675,6 @@ "node": ">=8" } }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/strip-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz", @@ -13490,30 +13855,6 @@ "typescript": ">=4.8.4" } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", - "dev": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" - } - }, - "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -13785,6 +14126,41 @@ "node": ">= 10.0.0" } }, + "node_modules/unrs-resolver": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", + "integrity": "sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.0" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.11.1", + "@unrs/resolver-binding-android-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-arm64": "1.11.1", + "@unrs/resolver-binding-darwin-x64": "1.11.1", + "@unrs/resolver-binding-freebsd-x64": "1.11.1", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.11.1", + "@unrs/resolver-binding-linux-arm64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-arm64-musl": "1.11.1", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-riscv64-musl": "1.11.1", + "@unrs/resolver-binding-linux-s390x-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-gnu": "1.11.1", + "@unrs/resolver-binding-linux-x64-musl": "1.11.1", + "@unrs/resolver-binding-wasm32-wasi": "1.11.1", + "@unrs/resolver-binding-win32-arm64-msvc": "1.11.1", + "@unrs/resolver-binding-win32-ia32-msvc": "1.11.1", + "@unrs/resolver-binding-win32-x64-msvc": "1.11.1" + } + }, "node_modules/upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", diff --git a/package.json b/package.json index 25f68e65..f9fa6f85 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "sable", "version": "1.2.0", "description": "Yet another matrix client fork", - "main": "index.js", "type": "module", "packageManager": "npm@11.11.0", "engines": { @@ -10,13 +9,13 @@ "npm": "11.x" }, "scripts": { - "start": "vite", + "dev": "vite dev", "build": "vite build", "preview": "vite preview", - "lint": "npm run check:eslint && npm run check:prettier", - "check:eslint": "eslint src/*", - "check:prettier": "prettier --check .", - "fix:prettier": "prettier --write .", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "fmt": "prettier --write .", + "fmt:check": "prettier --check .", "typecheck": "tsc", "knip": "knip" }, @@ -42,7 +41,6 @@ "browser-encrypt-attachment": "^0.3.0", "chroma-js": "^3.2.0", "classnames": "^2.5.1", - "dateformat": "^5.0.3", "dayjs": "^1.11.19", "domhandler": "^5.0.3", "emojibase": "^15.3.1", @@ -86,8 +84,8 @@ "devDependencies": { "@element-hq/element-call-embedded": "0.16.3", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", + "@eslint/compat": "2.0.2", "@eslint/css": "^0.14.1", - "@eslint/eslintrc": "^3.3.4", "@eslint/js": "^9.39.3", "@rollup/plugin-inject": "^5.0.5", "@rollup/plugin-wasm": "^6.2.2", @@ -105,10 +103,12 @@ "buffer": "^6.0.3", "eslint": "^9.39.3", "eslint-config-prettier": "^10.1.8", - "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-import-resolver-typescript": "4.4.4", + "eslint-plugin-import-x": "4.16.1", + "eslint-plugin-jsx-a11y": "6.10.2", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.1", + "eslint-plugin-unused-imports": "4.4.1", "knip": "5.85.0", "prettier": "^3.8.1", "typescript": "^5.9.3", diff --git a/src/app/components/CapabilitiesLoader.tsx b/src/app/components/CapabilitiesLoader.tsx deleted file mode 100644 index 2152b572..00000000 --- a/src/app/components/CapabilitiesLoader.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { ReactNode, useCallback, useEffect } from 'react'; -import { Capabilities } from '$types/matrix-sdk'; -import { AsyncStatus, useAsyncCallback } from '../hooks/useAsyncCallback'; -import { useMatrixClient } from '../hooks/useMatrixClient'; - -type CapabilitiesLoaderProps = { - children: (capabilities: Capabilities | undefined) => ReactNode; -}; -export function CapabilitiesLoader({ children }: CapabilitiesLoaderProps) { - const mx = useMatrixClient(); - - const [state, load] = useAsyncCallback(useCallback(() => mx.getCapabilities(), [mx])); - - useEffect(() => { - load(); - }, [load]); - - return children(state.status === AsyncStatus.Success ? state.data : undefined); -} diff --git a/src/app/components/MediaConfigLoader.tsx b/src/app/components/MediaConfigLoader.tsx deleted file mode 100644 index 9fd99330..00000000 --- a/src/app/components/MediaConfigLoader.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { ReactNode, useCallback, useEffect } from 'react'; -import { AsyncStatus, useAsyncCallback } from '../hooks/useAsyncCallback'; -import { useMatrixClient } from '../hooks/useMatrixClient'; -import { MediaConfig } from '../hooks/useMediaConfig'; - -type MediaConfigLoaderProps = { - children: (mediaConfig: MediaConfig | undefined) => ReactNode; -}; -export function MediaConfigLoader({ children }: MediaConfigLoaderProps) { - const mx = useMatrixClient(); - - const [state, load] = useAsyncCallback(useCallback(() => mx.getMediaConfig(), [mx])); - - useEffect(() => { - load(); - }, [load]); - - return children(state.status === AsyncStatus.Success ? state.data : undefined); -} diff --git a/src/app/components/SpaceChildDirectsProvider.tsx b/src/app/components/SpaceChildDirectsProvider.tsx deleted file mode 100644 index 8ec88614..00000000 --- a/src/app/components/SpaceChildDirectsProvider.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { ReactNode } from 'react'; -import { RoomToParents } from '$types/matrix/room'; -import { useMatrixClient } from '../hooks/useMatrixClient'; -import { allRoomsAtom } from '../state/room-list/roomList'; -import { useChildDirectScopeFactory, useSpaceChildren } from '../state/hooks/roomList'; - -type SpaceChildDirectsProviderProps = { - spaceId: string; - mDirects: Set; - roomToParents: RoomToParents; - children: (rooms: string[]) => ReactNode; -}; -export function SpaceChildDirectsProvider({ - spaceId, - roomToParents, - mDirects, - children, -}: SpaceChildDirectsProviderProps) { - const mx = useMatrixClient(); - - const childDirects = useSpaceChildren( - allRoomsAtom, - spaceId, - useChildDirectScopeFactory(mx, mDirects, roomToParents) - ); - - return children(childDirects); -} diff --git a/src/app/components/SpaceChildRoomsProvider.tsx b/src/app/components/SpaceChildRoomsProvider.tsx deleted file mode 100644 index d7ce387b..00000000 --- a/src/app/components/SpaceChildRoomsProvider.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { ReactNode } from 'react'; -import { RoomToParents } from '$types/matrix/room'; -import { useMatrixClient } from '../hooks/useMatrixClient'; -import { allRoomsAtom } from '../state/room-list/roomList'; -import { useChildRoomScopeFactory, useSpaceChildren } from '../state/hooks/roomList'; - -type SpaceChildRoomsProviderProps = { - spaceId: string; - mDirects: Set; - roomToParents: RoomToParents; - children: (rooms: string[]) => ReactNode; -}; -export function SpaceChildRoomsProvider({ - spaceId, - roomToParents, - mDirects, - children, -}: SpaceChildRoomsProviderProps) { - const mx = useMatrixClient(); - - const childRooms = useSpaceChildren( - allRoomsAtom, - spaceId, - useChildRoomScopeFactory(mx, mDirects, roomToParents) - ); - - return children(childRooms); -} diff --git a/src/app/components/editor/Editor.preview.tsx b/src/app/components/editor/Editor.preview.tsx deleted file mode 100644 index 6dc2795d..00000000 --- a/src/app/components/editor/Editor.preview.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import React, { useState } from 'react'; -import FocusTrap from 'focus-trap-react'; -import { - config, - Icon, - IconButton, - Icons, - Line, - Modal, - Overlay, - OverlayBackdrop, - OverlayCenter, -} from 'folds'; - -import { CustomEditor, useEditor } from './Editor'; -import { Toolbar } from './Toolbar'; -import { stopPropagation } from '$appUtils/keyboard'; - -export function EditorPreview() { - const [open, setOpen] = useState(false); - const editor = useEditor(); - const [toolbar, setToolbar] = useState(false); - - return ( - <> - setOpen(!open)}> - - - }> - - setOpen(false), - clickOutsideDeactivates: true, - escapeDeactivates: stopPropagation, - }} - > - -
- - - - } - after={ - <> - setToolbar(!toolbar)} - aria-pressed={toolbar} - > - - - - - - - - - - } - bottom={ - toolbar && ( -
- - -
- ) - } - /> -
-
-
-
-
- - ); -} diff --git a/src/app/features/space-settings/styles.css.ts b/src/app/features/space-settings/styles.css.ts deleted file mode 100644 index ce89c16e..00000000 --- a/src/app/features/space-settings/styles.css.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { style } from '@vanilla-extract/css'; -import { config } from 'folds'; - -export const SequenceCardStyle = style({ - padding: config.space.S300, -}); diff --git a/src/app/hooks/useDisplayName.ts b/src/app/hooks/useDisplayName.ts deleted file mode 100644 index 87c35f2b..00000000 --- a/src/app/hooks/useDisplayName.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { useAtomValue } from 'jotai'; -import type { Room } from '$types/matrix-sdk'; -import { nicknamesAtom } from '../state/nicknames'; -import { getMemberDisplayName } from '../utils/room'; -import { getMxIdLocalPart } from '../utils/matrix'; - -/** - * Returns the display name for a user, preferring any locally-set nickname, - * then the room member display name, then the local part of the MXID. - */ -export const useDisplayName = (userId: string, room?: Room): string => { - const nicknames = useAtomValue(nicknamesAtom); - if (room) { - return getMemberDisplayName(room, userId, nicknames) ?? getMxIdLocalPart(userId) ?? userId; - } - return nicknames[userId] ?? getMxIdLocalPart(userId) ?? userId; -}; diff --git a/src/app/hooks/useForceUpdate.js b/src/app/hooks/useForceUpdate.js deleted file mode 100644 index 2244c529..00000000 --- a/src/app/hooks/useForceUpdate.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable import/prefer-default-export */ -import { useState } from 'react'; - -export function useForceUpdate() { - const [data, setData] = useState(null); - - return [ - data, - function forceUpdateHook() { - setData({}); - }, - ]; -} diff --git a/src/app/hooks/useUserTrustStatusChange.ts b/src/app/hooks/useUserTrustStatusChange.ts deleted file mode 100644 index 546f2203..00000000 --- a/src/app/hooks/useUserTrustStatusChange.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { CryptoEvent, CryptoEventHandlerMap } from '$types/matrix-sdk'; -import { useEffect } from 'react'; -import { useMatrixClient } from './useMatrixClient'; - -export const useUserTrustStatusChange = ( - onChange: CryptoEventHandlerMap[CryptoEvent.UserTrustStatusChanged] -) => { - const mx = useMatrixClient(); - - useEffect(() => { - mx.on(CryptoEvent.UserTrustStatusChanged, onChange); - return () => { - mx.removeListener(CryptoEvent.UserTrustStatusChanged, onChange); - }; - }, [mx, onChange]); -}; diff --git a/src/app/pages/client/sidebar/SettingsTab.tsx b/src/app/pages/client/sidebar/SettingsTab.tsx deleted file mode 100644 index 8e495d2e..00000000 --- a/src/app/pages/client/sidebar/SettingsTab.tsx +++ /dev/null @@ -1,49 +0,0 @@ -import React, { useState } from 'react'; -import { Text } from 'folds'; -import { SidebarItem, SidebarItemTooltip, SidebarAvatar } from '$components/sidebar'; -import { UserAvatar } from '$components/user-avatar'; -import { useMatrixClient } from '$hooks/useMatrixClient'; -import { getMxIdLocalPart, mxcUrlToHttp } from '$appUtils/matrix'; -import { nameInitials } from '$appUtils/common'; -import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; -import { Settings } from '$features/settings'; -import { useUserProfile } from '$hooks/useUserProfile'; -import { Modal500 } from '$components/Modal500'; - -export function SettingsTab() { - const mx = useMatrixClient(); - const useAuthentication = useMediaAuthentication(); - const userId = mx.getUserId()!; - const profile = useUserProfile(userId); - - const [settings, setSettings] = useState(false); - - const displayName = profile.displayName ?? getMxIdLocalPart(userId) ?? userId; - const avatarUrl = profile.avatarUrl - ? (mxcUrlToHttp(mx, profile.avatarUrl, useAuthentication, 96, 96, 'crop') ?? undefined) - : undefined; - - const openSettings = () => setSettings(true); - const closeSettings = () => setSettings(false); - - return ( - - - {(triggerRef) => ( - - {nameInitials(displayName)}} - /> - - )} - - {settings && ( - - - - )} - - ); -} diff --git a/src/app/state/hooks/inviteList.ts b/src/app/state/hooks/inviteList.ts deleted file mode 100644 index 54729396..00000000 --- a/src/app/state/hooks/inviteList.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { useAtomValue } from 'jotai'; -import { selectAtom } from 'jotai/utils'; -import { MatrixClient } from '$types/matrix-sdk'; -import { useCallback } from 'react'; -import { isDirectInvite, isRoom, isSpace, isUnsupportedRoom } from '$appUtils/room'; -import { compareRoomsEqual } from '../room-list/utils'; -import { allInvitesAtom } from '../room-list/inviteList'; - -export const useSpaceInvites = (mx: MatrixClient, invitesAtom: typeof allInvitesAtom) => { - const selector = useCallback( - (rooms: string[]) => rooms.filter((roomId) => isSpace(mx.getRoom(roomId))), - [mx] - ); - return useAtomValue(selectAtom(invitesAtom, selector, compareRoomsEqual)); -}; - -export const useRoomInvites = ( - mx: MatrixClient, - invitesAtom: typeof allInvitesAtom, - mDirects: Set -) => { - const selector = useCallback( - (rooms: string[]) => - rooms.filter( - (roomId) => - isRoom(mx.getRoom(roomId)) && - !(mDirects.has(roomId) || isDirectInvite(mx.getRoom(roomId), mx.getUserId())) - ), - [mx, mDirects] - ); - return useAtomValue(selectAtom(invitesAtom, selector, compareRoomsEqual)); -}; - -export const useDirectInvites = ( - mx: MatrixClient, - invitesAtom: typeof allInvitesAtom, - mDirects: Set -) => { - const selector = useCallback( - (rooms: string[]) => - rooms.filter( - (roomId) => mDirects.has(roomId) || isDirectInvite(mx.getRoom(roomId), mx.getUserId()) - ), - [mx, mDirects] - ); - return useAtomValue(selectAtom(invitesAtom, selector, compareRoomsEqual)); -}; - -export const useUnsupportedInvites = (mx: MatrixClient, invitesAtom: typeof allInvitesAtom) => { - const selector = useCallback( - (rooms: string[]) => rooms.filter((roomId) => isUnsupportedRoom(mx.getRoom(roomId))), - [mx] - ); - return useAtomValue(selectAtom(invitesAtom, selector, compareRoomsEqual)); -}; diff --git a/src/app/utils/disposable.ts b/src/app/utils/disposable.ts deleted file mode 100644 index 0982adaa..00000000 --- a/src/app/utils/disposable.ts +++ /dev/null @@ -1,16 +0,0 @@ -export type DisposeCallback = ( - ...args: DisposeArgs -) => DisposeReturn; -export type DisposableContext< - DisposableArgs extends unknown[] = [], - DisposeArgs extends unknown[] = [], - DisposeReturn = void, -> = (...args: DisposableArgs) => DisposeCallback; - -export const disposable = < - DisposableArgs extends unknown[], - DisposeArgs extends unknown[] = [], - DisposeReturn = void, ->( - context: DisposableContext -) => context; diff --git a/src/index.tsx b/src/index.tsx index d5bbd8e2..8c132b07 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createRoot } from 'react-dom/client'; import { enableMapSet } from 'immer'; import '@fontsource-variable/nunito'; diff --git a/src/types/utils.ts b/src/types/utils.ts deleted file mode 100644 index 353ace6e..00000000 --- a/src/types/utils.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type WithRequiredProp = Type & { - [Property in Key]-?: Type[Property]; -}; diff --git a/tsconfig.json b/tsconfig.json index 1372cc8a..d98b4a1d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "sourceMap": true, - "jsx": "react", + "jsx": "react-jsx", "target": "ES2022", "module": "ES2022", "allowJs": true, From 5770ca1c14c9aab17af1a6e6094dd8843ec5b067 Mon Sep 17 00:00:00 2001 From: hazre Date: Fri, 27 Feb 2026 10:53:19 +0100 Subject: [PATCH 03/59] chore(lint): drop obsolete React imports --- src/app/components/AccountDataEditor.tsx | 2 +- src/app/components/ActionUIA.tsx | 2 +- src/app/components/BackupRestore.tsx | 2 +- src/app/components/BetaNoticeBadge.tsx | 1 - src/app/components/DeviceVerification.tsx | 7 +++---- .../components/DeviceVerificationSetup.tsx | 2 +- src/app/components/HexColorPickerPopOut.tsx | 2 +- src/app/components/JoinRulesSwitcher.tsx | 2 +- src/app/components/LogoutDialog.tsx | 2 +- src/app/components/ManualVerification.tsx | 2 +- src/app/components/MemberSortMenu.tsx | 1 - src/app/components/MembershipFilterMenu.tsx | 1 - src/app/components/Modal500.tsx | 2 +- src/app/components/Pdf-viewer/PdfViewer.tsx | 6 +++--- .../components/RoomNotificationSwitcher.tsx | 2 +- src/app/components/RoomSummaryLoader.tsx | 3 +-- src/app/components/SecretStorage.tsx | 2 +- src/app/components/SwipeableChatWrapper.tsx | 2 +- .../components/SwipeableOverlayWrapper.tsx | 2 +- src/app/components/UIAFlowOverlay.tsx | 2 +- .../components/UserRoomProfileRenderer.tsx | 1 - .../create-room/AdditionalCreatorInput.tsx | 2 +- .../create-room/CreateRoomAccessSelector.tsx | 1 - .../create-room/CreateRoomAliasInput.tsx | 2 +- .../create-room/CreateRoomTypeSelector.tsx | 1 - .../create-room/RoomVersionSelector.tsx | 2 +- src/app/components/create-room/utils.ts | 3 +-- src/app/components/cutout-card/CutoutCard.tsx | 1 - src/app/components/editor/Editor.tsx | 4 ++-- src/app/components/editor/Elements.tsx | 1 - src/app/components/editor/Toolbar.tsx | 2 +- .../editor/autocomplete/AutocompleteMenu.tsx | 2 +- .../autocomplete/EmoticonAutocomplete.tsx | 2 +- .../autocomplete/RoomMentionAutocomplete.tsx | 2 +- .../autocomplete/UserMentionAutocomplete.tsx | 4 ++-- src/app/components/editor/output.ts | 2 +- src/app/components/editor/utils.ts | 4 ++-- src/app/components/emoji-board/EmojiBoard.tsx | 2 +- .../emoji-board/components/Group.tsx | 2 +- .../emoji-board/components/Item.tsx | 1 - .../emoji-board/components/Layout.tsx | 2 +- .../emoji-board/components/NoStickerPacks.tsx | 1 - .../emoji-board/components/Preview.tsx | 1 - .../emoji-board/components/SearchInput.tsx | 2 +- .../emoji-board/components/Sidebar.tsx | 2 +- .../emoji-board/components/Tabs.tsx | 2 +- .../components/event-readers/EventReaders.tsx | 1 - .../components/image-editor/ImageEditor.tsx | 1 - .../image-pack-view/ImagePackContent.tsx | 2 +- .../image-pack-view/ImagePackView.tsx | 1 - .../components/image-pack-view/ImageTile.tsx | 2 +- .../components/image-pack-view/PackMeta.tsx | 2 +- .../image-pack-view/RoomImagePack.tsx | 2 +- .../image-pack-view/UsageSwitcher.tsx | 2 +- .../image-pack-view/UserImagePack.tsx | 2 +- .../components/image-viewer/ImageViewer.tsx | 4 ++-- src/app/components/info-card/InfoCard.tsx | 2 +- .../invite-user-prompt/InviteUserPrompt.tsx | 2 +- .../join-address-prompt/JoinAddressPrompt.tsx | 2 +- .../leave-room-prompt/LeaveRoomPrompt.tsx | 2 +- .../leave-space-prompt/LeaveSpacePrompt.tsx | 2 +- src/app/components/media/Image.tsx | 2 +- src/app/components/media/MediaControls.tsx | 2 +- src/app/components/media/Video.tsx | 2 +- src/app/components/member-tile/MemberTile.tsx | 2 +- src/app/components/message/FileHeader.tsx | 2 +- .../components/message/MsgTypeRenderers.tsx | 2 +- src/app/components/message/Reaction.tsx | 1 - src/app/components/message/RenderBody.tsx | 1 - src/app/components/message/Reply.tsx | 6 +++--- .../message/attachment/Attachment.tsx | 1 - .../message/content/AudioContent.tsx | 2 +- .../message/content/EventContent.tsx | 2 +- .../message/content/FallbackContent.tsx | 1 - .../message/content/FileContent.tsx | 2 +- .../message/content/ImageContent.tsx | 2 +- .../message/content/VideoContent.tsx | 2 +- src/app/components/message/layout/Base.tsx | 1 - src/app/components/message/layout/Bubble.tsx | 2 +- src/app/components/message/layout/Compact.tsx | 2 +- src/app/components/message/layout/Modern.tsx | 2 +- .../message/modals/GlobalModalManager.tsx | 1 - .../message/modals/MessageReactions.tsx | 3 +-- .../placeholder/CompactPlaceholder.tsx | 2 +- .../placeholder/DefaultPlaceholder.tsx | 2 +- .../message/placeholder/LinePlaceholder.tsx | 1 - src/app/components/nav/NavCategory.tsx | 2 +- src/app/components/nav/NavCategoryHeader.tsx | 2 +- src/app/components/nav/NavEmptyLayout.tsx | 2 +- src/app/components/nav/NavItem.tsx | 2 +- src/app/components/nav/NavItemContent.tsx | 2 +- src/app/components/nav/NavItemOptions.tsx | 2 +- src/app/components/page/Page.tsx | 2 +- .../password-input/PasswordInput.tsx | 2 +- src/app/components/power/PowerColorBadge.tsx | 1 - src/app/components/power/PowerIcon.tsx | 1 - src/app/components/power/PowerSelector.tsx | 2 +- src/app/components/presence/Presence.tsx | 2 +- src/app/components/room-avatar/RoomAvatar.tsx | 2 +- src/app/components/room-card/RoomCard.tsx | 2 +- src/app/components/room-intro/RoomIntro.tsx | 2 +- .../room-topic-viewer/RoomTopicViewer.tsx | 1 - .../ScrollTopContainer.tsx | 2 +- .../components/sequence-card/SequenceCard.tsx | 2 +- .../components/server-badge/ServerBadge.tsx | 1 - .../components/setting-tile/SettingTile.tsx | 2 +- src/app/components/sidebar/Sidebar.tsx | 1 - src/app/components/sidebar/SidebarContent.tsx | 2 +- src/app/components/sidebar/SidebarItem.tsx | 2 +- src/app/components/sidebar/SidebarStack.tsx | 1 - .../sidebar/SidebarStackSeparator.tsx | 1 - .../components/splash-screen/SplashScreen.tsx | 2 +- src/app/components/text-viewer/TextViewer.tsx | 4 ++-- src/app/components/time-date/DatePicker.tsx | 2 +- src/app/components/time-date/PickerColumn.tsx | 2 +- src/app/components/time-date/TimePicker.tsx | 2 +- .../typing-indicator/TypingIndicator.tsx | 1 - src/app/components/uia-stages/DummyStage.tsx | 2 +- src/app/components/uia-stages/EmailStage.tsx | 2 +- .../components/uia-stages/PasswordStage.tsx | 2 +- .../components/uia-stages/ReCaptchaStage.tsx | 1 - .../uia-stages/RegistrationTokenStage.tsx | 2 +- src/app/components/uia-stages/SSOStage.tsx | 2 +- src/app/components/uia-stages/TermsStage.tsx | 2 +- .../components/unread-badge/UnreadBadge.tsx | 2 +- .../components/upload-board/UploadBoard.tsx | 4 ++-- .../upload-card/CompactUploadCardRenderer.tsx | 2 +- src/app/components/upload-card/UploadCard.tsx | 2 +- .../upload-card/UploadCardRenderer.tsx | 2 +- src/app/components/url-preview/UrlPreview.tsx | 1 - .../components/url-preview/UrlPreviewCard.tsx | 5 +---- src/app/components/user-avatar/UserAvatar.tsx | 2 +- .../components/user-profile/CreatorChip.tsx | 2 +- src/app/components/user-profile/PowerChip.tsx | 2 +- src/app/components/user-profile/UserChips.tsx | 2 +- src/app/components/user-profile/UserHero.tsx | 2 +- .../user-profile/UserModeration.tsx | 2 +- .../components/virtualizer/VirtualTile.tsx | 1 - src/app/features/add-existing/AddExisting.tsx | 2 +- src/app/features/call/CallViewUser.tsx | 3 +-- src/app/features/call/SmallWidget.ts | 6 +++--- src/app/features/call/SmallWidgetDriver.ts | 18 ++++++++--------- .../common-settings/cosmetics/Cosmetics.tsx | 2 +- .../developer-tools/DevelopTools.tsx | 2 +- .../developer-tools/SendRoomEvent.tsx | 2 +- .../developer-tools/StateEventEditor.tsx | 2 +- .../emojis-stickers/EmojisStickers.tsx | 2 +- .../emojis-stickers/RoomPacks.tsx | 4 ++-- .../common-settings/general/RoomAddress.tsx | 4 ++-- .../general/RoomEncryption.tsx | 2 +- .../general/RoomHistoryVisibility.tsx | 5 ++--- .../common-settings/general/RoomJoinRules.tsx | 5 ++--- .../common-settings/general/RoomProfile.tsx | 2 +- .../common-settings/general/RoomPublish.tsx | 4 +--- .../common-settings/general/RoomUpgrade.tsx | 5 ++--- .../common-settings/members/Members.tsx | 2 +- .../permissions/PermissionGroups.tsx | 4 ++-- .../common-settings/permissions/Powers.tsx | 4 ++-- .../permissions/PowersEditor.tsx | 2 +- src/app/features/create-chat/CreateChat.tsx | 2 +- src/app/features/create-room/CreateRoom.tsx | 2 +- .../features/create-room/CreateRoomModal.tsx | 1 - src/app/features/create-space/CreateSpace.tsx | 2 +- .../create-space/CreateSpaceModal.tsx | 1 - .../JoinBeforeNavigate.tsx | 1 - src/app/features/lobby/DnD.tsx | 2 +- src/app/features/lobby/HierarchyItemMenu.tsx | 2 +- src/app/features/lobby/Lobby.tsx | 8 +++----- src/app/features/lobby/LobbyHeader.tsx | 2 +- src/app/features/lobby/LobbyHero.tsx | 1 - src/app/features/lobby/RoomItem.tsx | 5 ++--- src/app/features/lobby/SpaceHierarchy.tsx | 5 ++--- src/app/features/lobby/SpaceItem.tsx | 5 ++--- .../features/message-search/MessageSearch.tsx | 2 +- .../features/message-search/SearchFilters.tsx | 2 +- .../features/message-search/SearchInput.tsx | 2 +- .../message-search/SearchResultGroup.tsx | 4 ++-- .../features/room-nav/RoomCallNavStatus.tsx | 1 - .../room-nav/RoomNavCategoryButton.tsx | 1 - src/app/features/room-nav/RoomNavItem.tsx | 2 +- src/app/features/room-nav/RoomNavUser.tsx | 3 +-- .../features/room-settings/RoomSettings.tsx | 3 +-- .../room-settings/RoomSettingsRenderer.tsx | 1 - .../room-settings/general/General.tsx | 1 - .../room-settings/permissions/Permissions.tsx | 2 +- src/app/features/room/CommandAutocomplete.tsx | 2 +- src/app/features/room/MembersDrawer.tsx | 2 +- src/app/features/room/Room.tsx | 2 +- src/app/features/room/RoomInput.tsx | 9 +-------- .../features/room/RoomInputPlaceholder.tsx | 2 +- src/app/features/room/RoomTimeline.tsx | 8 ++------ src/app/features/room/RoomTombstone.tsx | 2 +- src/app/features/room/RoomView.tsx | 2 +- src/app/features/room/RoomViewFollowing.tsx | 2 +- src/app/features/room/RoomViewHeader.tsx | 2 +- src/app/features/room/RoomViewTyping.tsx | 1 - .../features/room/jump-to-time/JumpToTime.tsx | 2 +- .../room/message/EncryptedContent.tsx | 2 +- src/app/features/room/message/Message.tsx | 10 ++-------- .../features/room/message/MessageEditor.tsx | 2 +- src/app/features/room/message/Reactions.tsx | 2 +- .../room/reaction-viewer/ReactionViewer.tsx | 5 ++--- .../room/room-pin-menu/RoomPinMenu.tsx | 7 +++---- src/app/features/search/Search.tsx | 2 +- src/app/features/settings/Settings.tsx | 2 +- src/app/features/settings/about/About.tsx | 1 - src/app/features/settings/account/Account.tsx | 1 - .../features/settings/account/BioEditor.tsx | 2 +- .../features/settings/account/ContactInfo.tsx | 2 +- .../settings/account/IgnoredUserList.tsx | 2 +- .../features/settings/account/MatrixId.tsx | 1 - .../settings/account/NameColorEditor.tsx | 2 +- src/app/features/settings/account/Profile.tsx | 2 +- .../settings/account/PronounEditor.tsx | 2 +- .../settings/account/TimezoneEditor.tsx | 2 +- .../features/settings/cosmetics/Cosmetics.tsx | 2 +- .../features/settings/cosmetics/Themes.tsx | 2 +- .../settings/developer-tools/AccountData.tsx | 6 +++--- .../settings/developer-tools/DevelopTools.tsx | 2 +- .../features/settings/devices/DeviceTile.tsx | 5 ++--- src/app/features/settings/devices/Devices.tsx | 1 - .../features/settings/devices/LocalBackup.tsx | 2 +- .../settings/devices/OtherDevices.tsx | 2 +- .../settings/devices/Verification.tsx | 2 +- .../emojis-stickers/EmojisStickers.tsx | 2 +- .../settings/emojis-stickers/GlobalPacks.tsx | 2 +- .../settings/emojis-stickers/UserPack.tsx | 1 - src/app/features/settings/general/General.tsx | 2 +- .../settings/notifications/AllMessages.tsx | 2 +- .../notifications/KeywordMessages.tsx | 2 +- .../NotificationModeSwitcher.tsx | 2 +- .../settings/notifications/Notifications.tsx | 1 - .../notifications/SpecialMessages.tsx | 2 +- .../notifications/SystemNotification.tsx | 2 +- .../features/space-settings/SpaceSettings.tsx | 2 +- .../space-settings/SpaceSettingsRenderer.tsx | 1 - .../space-settings/general/General.tsx | 1 - .../permissions/Permissions.tsx | 2 +- .../features/widgets/GenericWidgetDriver.ts | 2 +- .../features/widgets/IntegrationManager.tsx | 2 +- src/app/features/widgets/WidgetIframe.tsx | 4 ++-- src/app/features/widgets/WidgetsDrawer.tsx | 2 +- src/app/hooks/useAuthFlows.ts | 3 +-- src/app/hooks/useCallMemberships.ts | 4 +--- src/app/hooks/useCommands.ts | 9 +++------ src/app/hooks/useDeviceList.ts | 3 +-- src/app/hooks/useMemberEventParser.tsx | 2 +- src/app/hooks/useNickname.ts | 2 +- src/app/hooks/usePowerLevels.ts | 20 +++++++++---------- src/app/hooks/useRoomAliases.ts | 3 +-- src/app/hooks/useRoomEvent.ts | 3 +-- src/app/hooks/useRoomLatestRenderedEvent.ts | 2 +- src/app/hooks/useRoomMeta.ts | 3 +-- src/app/hooks/useRoomPinnedEvents.ts | 3 +-- src/app/hooks/useRoomWidgets.ts | 2 +- src/app/hooks/useSessionProfiles.ts | 2 +- src/app/hooks/useSpaceHierarchy.ts | 3 +-- src/app/hooks/useStateEvent.ts | 2 +- src/app/hooks/useVirtualPaginator.ts | 4 ++-- src/app/pages/App.tsx | 1 - src/app/pages/ConfigConfig.tsx | 1 - src/app/pages/FeatureCheck.tsx | 2 +- src/app/pages/Router.tsx | 1 - src/app/pages/ThemeManager.tsx | 2 +- src/app/pages/auth/AuthFooter.tsx | 1 - src/app/pages/auth/AuthLayout.tsx | 2 +- src/app/pages/auth/FiledError.tsx | 1 - src/app/pages/auth/OrDivider.tsx | 1 - src/app/pages/auth/SSOLogin.tsx | 2 +- src/app/pages/auth/ServerPicker.tsx | 2 +- src/app/pages/auth/login/Login.tsx | 2 +- .../pages/auth/login/PasswordLoginForm.tsx | 2 +- src/app/pages/auth/login/TokenLogin.tsx | 2 +- .../auth/register/PasswordRegisterForm.tsx | 2 +- src/app/pages/auth/register/Register.tsx | 2 +- .../auth/reset-password/PasswordResetForm.tsx | 2 +- .../auth/reset-password/ResetPassword.tsx | 2 +- .../pages/client/BackgroundNotifications.tsx | 4 +--- .../pages/client/ClientInitStorageAtom.tsx | 2 +- src/app/pages/client/ClientLayout.tsx | 2 +- src/app/pages/client/ClientNonUIFeatures.tsx | 2 +- .../ClientRoomsNotificationPreferences.tsx | 2 +- src/app/pages/client/ClientRoot.tsx | 2 +- src/app/pages/client/SidebarNav.tsx | 2 +- src/app/pages/client/SpecVersions.tsx | 2 +- src/app/pages/client/SyncStatus.tsx | 2 +- src/app/pages/client/WelcomePage.tsx | 1 - src/app/pages/client/call/CallProvider.tsx | 9 ++++----- .../client/call/PersistentCallContainer.tsx | 2 +- src/app/pages/client/create/Create.tsx | 1 - src/app/pages/client/direct/Direct.tsx | 2 +- src/app/pages/client/direct/DirectCreate.tsx | 2 +- src/app/pages/client/direct/RoomProvider.tsx | 2 +- src/app/pages/client/explore/Explore.tsx | 2 +- src/app/pages/client/explore/Featured.tsx | 1 - src/app/pages/client/explore/Server.tsx | 2 +- src/app/pages/client/home/CreateRoom.tsx | 1 - src/app/pages/client/home/Home.tsx | 2 +- src/app/pages/client/home/RoomProvider.tsx | 2 +- src/app/pages/client/home/Search.tsx | 2 +- src/app/pages/client/inbox/Inbox.tsx | 1 - src/app/pages/client/inbox/Invites.tsx | 5 ++--- src/app/pages/client/inbox/Notifications.tsx | 4 ++-- src/app/pages/client/sidebar/CreateTab.tsx | 2 +- src/app/pages/client/sidebar/DirectTab.tsx | 2 +- src/app/pages/client/sidebar/ExploreTab.tsx | 1 - src/app/pages/client/sidebar/HomeTab.tsx | 2 +- src/app/pages/client/sidebar/InboxTab.tsx | 1 - src/app/pages/client/sidebar/SearchTab.tsx | 1 - src/app/pages/client/sidebar/SpaceTabs.tsx | 2 +- .../pages/client/sidebar/UnverifiedTab.tsx | 2 +- src/app/pages/client/space/RoomProvider.tsx | 2 +- src/app/pages/client/space/Search.tsx | 2 +- src/app/pages/client/space/Space.tsx | 6 ++---- src/app/pages/client/space/SpaceProvider.tsx | 2 +- src/app/plugins/custom-emoji/utils.ts | 6 ++---- src/app/plugins/react-custom-html-parser.tsx | 2 +- src/app/plugins/react-prism/ReactPrism.tsx | 2 +- src/app/state/modal.ts | 3 +-- src/app/state/room/roomToUnread.ts | 3 +-- src/app/utils/debug.ts | 2 +- src/app/utils/matrix.ts | 4 ++-- src/app/utils/room.ts | 3 +-- src/types/matrix-sdk-events.d.ts | 3 +-- src/util/colorMXID.js | 4 ++-- src/util/cryptE2ERoomKeys.js | 2 +- 326 files changed, 328 insertions(+), 455 deletions(-) diff --git a/src/app/components/AccountDataEditor.tsx b/src/app/components/AccountDataEditor.tsx index 2e58bed9..0e424604 100644 --- a/src/app/components/AccountDataEditor.tsx +++ b/src/app/components/AccountDataEditor.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Box, Text, diff --git a/src/app/components/ActionUIA.tsx b/src/app/components/ActionUIA.tsx index 10a16792..ab5a33db 100644 --- a/src/app/components/ActionUIA.tsx +++ b/src/app/components/ActionUIA.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { AuthDict, AuthType, IAuthData, UIAFlow } from '$types/matrix-sdk'; import { getUIAFlowForStages } from '../utils/matrix-uia'; import { useSupportedUIAFlows, useUIACompleted, useUIAFlow } from '../hooks/useUIAFlows'; diff --git a/src/app/components/BackupRestore.tsx b/src/app/components/BackupRestore.tsx index 0192af2f..f12d3ef9 100644 --- a/src/app/components/BackupRestore.tsx +++ b/src/app/components/BackupRestore.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useState } from 'react'; +import { MouseEventHandler, useCallback, useState } from 'react'; import { useAtom } from 'jotai'; import { CryptoApi, KeyBackupInfo } from '$types/matrix-sdk'; import { diff --git a/src/app/components/BetaNoticeBadge.tsx b/src/app/components/BetaNoticeBadge.tsx index d1859876..a6ba55e0 100644 --- a/src/app/components/BetaNoticeBadge.tsx +++ b/src/app/components/BetaNoticeBadge.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { TooltipProvider, Tooltip, Box, Text, Badge, toRem } from 'folds'; export function BetaNoticeBadge() { diff --git a/src/app/components/DeviceVerification.tsx b/src/app/components/DeviceVerification.tsx index 3267b72a..2d45391a 100644 --- a/src/app/components/DeviceVerification.tsx +++ b/src/app/components/DeviceVerification.tsx @@ -2,10 +2,9 @@ import { ShowSasCallbacks, VerificationPhase, VerificationRequest, - Verifier, + Verifier, VerificationMethod } from '$types/matrix-sdk'; -import React, { CSSProperties, useCallback, useEffect, useState } from 'react'; -import { VerificationMethod } from '$types/matrix-sdk'; +import { CSSProperties, useCallback, useEffect, useState } from 'react'; import { Box, Button, @@ -137,7 +136,7 @@ function CompareEmoji({ sasData }: { sasData: ShowSasCallbacks }) { > {sasData.sas.emoji?.map(([emoji, name], index) => ( { }; export const resetEditorHistory = (editor: Editor) => { - // eslint-disable-next-line no-param-reassign + editor.history = { undos: [], redos: [], @@ -229,7 +229,7 @@ export const getPointUntilChar = ( reverse: options.reverse, }); - // eslint-disable-next-line no-restricted-syntax + for (const point of pointItr) { if (!Point.equals(point, cursorPoint) && prevPoint) { char = Editor.string(editor, { anchor: point, focus: prevPoint }); diff --git a/src/app/components/emoji-board/EmojiBoard.tsx b/src/app/components/emoji-board/EmojiBoard.tsx index e4a9ab11..09ebc925 100644 --- a/src/app/components/emoji-board/EmojiBoard.tsx +++ b/src/app/components/emoji-board/EmojiBoard.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, FocusEventHandler, MouseEventHandler, diff --git a/src/app/components/emoji-board/components/Group.tsx b/src/app/components/emoji-board/components/Group.tsx index cf19c6e0..293ac614 100644 --- a/src/app/components/emoji-board/components/Group.tsx +++ b/src/app/components/emoji-board/components/Group.tsx @@ -1,5 +1,5 @@ import { as, Box, Text } from 'folds'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/emoji-board/components/Item.tsx b/src/app/components/emoji-board/components/Item.tsx index 56ea5d72..5039d657 100644 --- a/src/app/components/emoji-board/components/Item.tsx +++ b/src/app/components/emoji-board/components/Item.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box } from 'folds'; import { MatrixClient } from '$types/matrix-sdk'; import { EmojiItemInfo, EmojiType } from '../types'; diff --git a/src/app/components/emoji-board/components/Layout.tsx b/src/app/components/emoji-board/components/Layout.tsx index 392d4a31..28600689 100644 --- a/src/app/components/emoji-board/components/Layout.tsx +++ b/src/app/components/emoji-board/components/Layout.tsx @@ -1,5 +1,5 @@ import { as, Box, Line } from 'folds'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/emoji-board/components/NoStickerPacks.tsx b/src/app/components/emoji-board/components/NoStickerPacks.tsx index 6703362c..9b46229a 100644 --- a/src/app/components/emoji-board/components/NoStickerPacks.tsx +++ b/src/app/components/emoji-board/components/NoStickerPacks.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, toRem, config, Icons, Icon, Text } from 'folds'; export function NoStickerPacks() { diff --git a/src/app/components/emoji-board/components/Preview.tsx b/src/app/components/emoji-board/components/Preview.tsx index 2a75d4dc..b6fe436d 100644 --- a/src/app/components/emoji-board/components/Preview.tsx +++ b/src/app/components/emoji-board/components/Preview.tsx @@ -1,5 +1,4 @@ import { Box, Text } from 'folds'; -import React from 'react'; import { Atom, atom, useAtomValue } from 'jotai'; import * as css from './styles.css'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/components/emoji-board/components/SearchInput.tsx b/src/app/components/emoji-board/components/SearchInput.tsx index 05074645..bf3ef608 100644 --- a/src/app/components/emoji-board/components/SearchInput.tsx +++ b/src/app/components/emoji-board/components/SearchInput.tsx @@ -1,4 +1,4 @@ -import React, { ChangeEventHandler, useRef } from 'react'; +import { ChangeEventHandler, useRef } from 'react'; import { Input, Chip, Icon, Icons, Text } from 'folds'; import { mobileOrTablet } from '$appUtils/user-agent'; diff --git a/src/app/components/emoji-board/components/Sidebar.tsx b/src/app/components/emoji-board/components/Sidebar.tsx index de22b483..70bf8790 100644 --- a/src/app/components/emoji-board/components/Sidebar.tsx +++ b/src/app/components/emoji-board/components/Sidebar.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box, Scroll, diff --git a/src/app/components/emoji-board/components/Tabs.tsx b/src/app/components/emoji-board/components/Tabs.tsx index d433354f..fc3386d2 100644 --- a/src/app/components/emoji-board/components/Tabs.tsx +++ b/src/app/components/emoji-board/components/Tabs.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties } from 'react'; +import { CSSProperties } from 'react'; import { Badge, Box, Text } from 'folds'; import { EmojiBoardTab } from '../types'; diff --git a/src/app/components/event-readers/EventReaders.tsx b/src/app/components/event-readers/EventReaders.tsx index 201eafbb..cab82b8a 100644 --- a/src/app/components/event-readers/EventReaders.tsx +++ b/src/app/components/event-readers/EventReaders.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import classNames from 'classnames'; import { Avatar, diff --git a/src/app/components/image-editor/ImageEditor.tsx b/src/app/components/image-editor/ImageEditor.tsx index 1ec474e8..f937192e 100644 --- a/src/app/components/image-editor/ImageEditor.tsx +++ b/src/app/components/image-editor/ImageEditor.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import classNames from 'classnames'; import { Box, Chip, Header, Icon, IconButton, Icons, Text, as } from 'folds'; import * as css from './ImageEditor.css'; diff --git a/src/app/components/image-pack-view/ImagePackContent.tsx b/src/app/components/image-pack-view/ImagePackContent.tsx index af6a1ee6..04eaf278 100644 --- a/src/app/components/image-pack-view/ImagePackContent.tsx +++ b/src/app/components/image-pack-view/ImagePackContent.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { useCallback, useEffect, useMemo, useState } from 'react'; import { as, Box, Text, config, Button, Menu, Spinner } from 'folds'; import { ImagePack, diff --git a/src/app/components/image-pack-view/ImagePackView.tsx b/src/app/components/image-pack-view/ImagePackView.tsx index e304d8b6..bf6d18bd 100644 --- a/src/app/components/image-pack-view/ImagePackView.tsx +++ b/src/app/components/image-pack-view/ImagePackView.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, IconButton, Text, Icon, Icons, Scroll, Chip } from 'folds'; import { PackAddress } from '$plugins/custom-emoji'; import { Page, PageHeader, PageContent } from '../page'; diff --git a/src/app/components/image-pack-view/ImageTile.tsx b/src/app/components/image-pack-view/ImageTile.tsx index bbaec005..38d7d258 100644 --- a/src/app/components/image-pack-view/ImageTile.tsx +++ b/src/app/components/image-pack-view/ImageTile.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, ReactNode, useMemo, useState } from 'react'; +import { FormEventHandler, ReactNode, useMemo, useState } from 'react'; import { Badge, Box, Button, Chip, Icon, Icons, Input, Text } from 'folds'; import { UsageSwitcher, useUsageStr } from './UsageSwitcher'; import { mxcUrlToHttp } from '$appUtils/matrix'; diff --git a/src/app/components/image-pack-view/PackMeta.tsx b/src/app/components/image-pack-view/PackMeta.tsx index fdf54794..c79dee92 100644 --- a/src/app/components/image-pack-view/PackMeta.tsx +++ b/src/app/components/image-pack-view/PackMeta.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useMemo, useState } from 'react'; +import { FormEventHandler, useCallback, useMemo, useState } from 'react'; import { Box, Text, diff --git a/src/app/components/image-pack-view/RoomImagePack.tsx b/src/app/components/image-pack-view/RoomImagePack.tsx index d3c8ca4f..2082bb61 100644 --- a/src/app/components/image-pack-view/RoomImagePack.tsx +++ b/src/app/components/image-pack-view/RoomImagePack.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { Room } from '$types/matrix-sdk'; import { usePowerLevels } from '$hooks/usePowerLevels'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/components/image-pack-view/UsageSwitcher.tsx b/src/app/components/image-pack-view/UsageSwitcher.tsx index b8875f31..31d9fae3 100644 --- a/src/app/components/image-pack-view/UsageSwitcher.tsx +++ b/src/app/components/image-pack-view/UsageSwitcher.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useMemo, useState } from 'react'; +import { MouseEventHandler, useMemo, useState } from 'react'; import { Box, Button, config, Icon, Icons, Menu, MenuItem, PopOut, RectCords, Text } from 'folds'; import FocusTrap from 'focus-trap-react'; import { ImageUsage } from '$plugins/custom-emoji'; diff --git a/src/app/components/image-pack-view/UserImagePack.tsx b/src/app/components/image-pack-view/UserImagePack.tsx index 329c137d..0003ff5e 100644 --- a/src/app/components/image-pack-view/UserImagePack.tsx +++ b/src/app/components/image-pack-view/UserImagePack.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { ImagePackContent } from './ImagePackContent'; import { ImagePack, PackContent } from '$plugins/custom-emoji'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/components/image-viewer/ImageViewer.tsx b/src/app/components/image-viewer/ImageViewer.tsx index 4066bd6b..87d77556 100644 --- a/src/app/components/image-viewer/ImageViewer.tsx +++ b/src/app/components/image-viewer/ImageViewer.tsx @@ -1,5 +1,5 @@ -/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ -import React, { useEffect } from 'react'; + +import React from 'react'; import FileSaver from 'file-saver'; import classNames from 'classnames'; import { Box, Chip, Header, Icon, IconButton, Icons, Text, as } from 'folds'; diff --git a/src/app/components/info-card/InfoCard.tsx b/src/app/components/info-card/InfoCard.tsx index 6e4d8ecc..9db5f5f4 100644 --- a/src/app/components/info-card/InfoCard.tsx +++ b/src/app/components/info-card/InfoCard.tsx @@ -1,5 +1,5 @@ import { Box, ContainerColor, Text } from 'folds'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import classNames from 'classnames'; import { BreakWord } from '$styles/Text.css'; import { ContainerColor as ContainerClr } from '$styles/ContainerColor.css'; diff --git a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx index 2b9480ee..cdcee398 100644 --- a/src/app/components/invite-user-prompt/InviteUserPrompt.tsx +++ b/src/app/components/invite-user-prompt/InviteUserPrompt.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, FormEventHandler, KeyboardEventHandler, diff --git a/src/app/components/join-address-prompt/JoinAddressPrompt.tsx b/src/app/components/join-address-prompt/JoinAddressPrompt.tsx index ebdd1f67..dbf31778 100644 --- a/src/app/components/join-address-prompt/JoinAddressPrompt.tsx +++ b/src/app/components/join-address-prompt/JoinAddressPrompt.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useState } from 'react'; +import { FormEventHandler, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { Dialog, diff --git a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx index 6a7e2868..a7cabfe9 100644 --- a/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx +++ b/src/app/components/leave-room-prompt/LeaveRoomPrompt.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; import FocusTrap from 'focus-trap-react'; import { Dialog, diff --git a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx index f70d4994..f7f674c4 100644 --- a/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx +++ b/src/app/components/leave-space-prompt/LeaveSpacePrompt.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; import FocusTrap from 'focus-trap-react'; import { Dialog, diff --git a/src/app/components/media/Image.tsx b/src/app/components/media/Image.tsx index dda21a53..29990e99 100644 --- a/src/app/components/media/Image.tsx +++ b/src/app/components/media/Image.tsx @@ -1,4 +1,4 @@ -import React, { ImgHTMLAttributes, forwardRef } from 'react'; +import { ImgHTMLAttributes, forwardRef } from 'react'; import classNames from 'classnames'; import * as css from './media.css'; diff --git a/src/app/components/media/MediaControls.tsx b/src/app/components/media/MediaControls.tsx index 95a344ab..2360b9f9 100644 --- a/src/app/components/media/MediaControls.tsx +++ b/src/app/components/media/MediaControls.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box, as } from 'folds'; export type MediaControlProps = { diff --git a/src/app/components/media/Video.tsx b/src/app/components/media/Video.tsx index 03108c32..307dc9e6 100644 --- a/src/app/components/media/Video.tsx +++ b/src/app/components/media/Video.tsx @@ -1,4 +1,4 @@ -import React, { VideoHTMLAttributes, forwardRef } from 'react'; +import { VideoHTMLAttributes, forwardRef } from 'react'; import classNames from 'classnames'; import * as css from './media.css'; diff --git a/src/app/components/member-tile/MemberTile.tsx b/src/app/components/member-tile/MemberTile.tsx index 60725784..fa5252f4 100644 --- a/src/app/components/member-tile/MemberTile.tsx +++ b/src/app/components/member-tile/MemberTile.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { as, Avatar, Box, Icon, Icons, Text } from 'folds'; import { MatrixClient, Room, RoomMember } from '$types/matrix-sdk'; import { getMemberDisplayName } from '$appUtils/room'; diff --git a/src/app/components/message/FileHeader.tsx b/src/app/components/message/FileHeader.tsx index 2b85b2c7..f0d8273d 100644 --- a/src/app/components/message/FileHeader.tsx +++ b/src/app/components/message/FileHeader.tsx @@ -1,5 +1,5 @@ import { Badge, Box, Icon, IconButton, Icons, Spinner, Text, as, toRem } from 'folds'; -import React, { ReactNode, useCallback } from 'react'; +import { ReactNode, useCallback } from 'react'; import { EncryptedAttachmentInfo } from 'browser-encrypt-attachment'; import FileSaver from 'file-saver'; import { mimeTypeToExt } from '$appUtils/mimeTypes'; diff --git a/src/app/components/message/MsgTypeRenderers.tsx b/src/app/components/message/MsgTypeRenderers.tsx index fc9acd6e..17dbbc6e 100644 --- a/src/app/components/message/MsgTypeRenderers.tsx +++ b/src/app/components/message/MsgTypeRenderers.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties, ReactNode } from 'react'; +import { CSSProperties, ReactNode } from 'react'; import { Box, Chip, Icon, Icons, Text, toRem } from 'folds'; import { IContent } from '$types/matrix-sdk'; import { JUMBO_EMOJI_REG, URL_REG } from '$appUtils/regex'; diff --git a/src/app/components/message/Reaction.tsx b/src/app/components/message/Reaction.tsx index d3b6be1c..9d7214ce 100644 --- a/src/app/components/message/Reaction.tsx +++ b/src/app/components/message/Reaction.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Text, as } from 'folds'; import classNames from 'classnames'; import { MatrixClient, MatrixEvent, Room } from '$types/matrix-sdk'; diff --git a/src/app/components/message/RenderBody.tsx b/src/app/components/message/RenderBody.tsx index a67dc682..ff612757 100644 --- a/src/app/components/message/RenderBody.tsx +++ b/src/app/components/message/RenderBody.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import parse, { HTMLReactParserOptions } from 'html-react-parser'; import Linkify from 'linkify-react'; import { Opts } from 'linkifyjs'; diff --git a/src/app/components/message/Reply.tsx b/src/app/components/message/Reply.tsx index 748f980c..074cc39c 100644 --- a/src/app/components/message/Reply.tsx +++ b/src/app/components/message/Reply.tsx @@ -1,6 +1,6 @@ import { Box, Icon, Icons, Text, as, color, toRem } from 'folds'; import { EventTimelineSet, Room } from '$types/matrix-sdk'; -import React, { MouseEventHandler, ReactNode, useCallback, useMemo } from 'react'; +import { MouseEventHandler, ReactNode, useCallback, useMemo } from 'react'; import classNames from 'classnames'; import parse from 'html-react-parser'; import { useAtomValue } from 'jotai'; @@ -81,7 +81,7 @@ export const Reply = as<'div', ReplyProps>( const mx = useMatrixClient(); - // eslint-disable-next-line camelcase + const { body, formatted_body, format } = replyEvent?.getContent() ?? {}; const sender = replyEvent?.getSender(); @@ -97,7 +97,7 @@ export const Reply = as<'div', ReplyProps>( const badEncryption = replyEvent?.getContent().msgtype === 'm.bad.encrypted'; let bodyJSX: ReactNode = fallbackBody; - // eslint-disable-next-line camelcase + if (format === 'org.matrix.custom.html' && formatted_body) { const strippedHtml = trimReplyFromFormattedBody(formatted_body) .replace(//gi, ' ') diff --git a/src/app/components/message/attachment/Attachment.tsx b/src/app/components/message/attachment/Attachment.tsx index 4b0b71f3..d0c737ca 100644 --- a/src/app/components/message/attachment/Attachment.tsx +++ b/src/app/components/message/attachment/Attachment.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, as } from 'folds'; import classNames from 'classnames'; import * as css from './Attachment.css'; diff --git a/src/app/components/message/content/AudioContent.tsx b/src/app/components/message/content/AudioContent.tsx index 5704595b..97668806 100644 --- a/src/app/components/message/content/AudioContent.tsx +++ b/src/app/components/message/content/AudioContent.tsx @@ -1,5 +1,5 @@ /* eslint-disable jsx-a11y/media-has-caption */ -import React, { ReactNode, useCallback, useRef, useState } from 'react'; +import { ReactNode, useCallback, useRef, useState } from 'react'; import { Badge, Chip, Icon, IconButton, Icons, ProgressBar, Spinner, Text, toRem } from 'folds'; import { EncryptedAttachmentInfo } from 'browser-encrypt-attachment'; import { Range } from 'react-range'; diff --git a/src/app/components/message/content/EventContent.tsx b/src/app/components/message/content/EventContent.tsx index e1e7f2fd..747cf23a 100644 --- a/src/app/components/message/content/EventContent.tsx +++ b/src/app/components/message/content/EventContent.tsx @@ -1,5 +1,5 @@ import { Box, Icon, IconSrc } from 'folds'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { BubbleLayout, CompactLayout, ModernLayout } from '..'; import { MessageLayout } from '$state/settings'; diff --git a/src/app/components/message/content/FallbackContent.tsx b/src/app/components/message/content/FallbackContent.tsx index 9edb9678..270504f0 100644 --- a/src/app/components/message/content/FallbackContent.tsx +++ b/src/app/components/message/content/FallbackContent.tsx @@ -1,5 +1,4 @@ import { Box, Icon, Icons, Text, as, color, config } from 'folds'; -import React from 'react'; const warningStyle = { color: color.Warning.Main, opacity: config.opacity.P300 }; const criticalStyle = { color: color.Critical.Main, opacity: config.opacity.P300 }; diff --git a/src/app/components/message/content/FileContent.tsx b/src/app/components/message/content/FileContent.tsx index bbc8314b..6da0abde 100644 --- a/src/app/components/message/content/FileContent.tsx +++ b/src/app/components/message/content/FileContent.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useCallback, useState } from 'react'; +import { ReactNode, useCallback, useState } from 'react'; import { Box, Button, diff --git a/src/app/components/message/content/ImageContent.tsx b/src/app/components/message/content/ImageContent.tsx index d9b073e7..cb5b4631 100644 --- a/src/app/components/message/content/ImageContent.tsx +++ b/src/app/components/message/content/ImageContent.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useCallback, useEffect, useState } from 'react'; +import { ReactNode, useCallback, useEffect, useState } from 'react'; import { Badge, Box, diff --git a/src/app/components/message/content/VideoContent.tsx b/src/app/components/message/content/VideoContent.tsx index cf458e7e..9ef1a039 100644 --- a/src/app/components/message/content/VideoContent.tsx +++ b/src/app/components/message/content/VideoContent.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useCallback, useEffect, useState } from 'react'; +import { ReactNode, useCallback, useEffect, useState } from 'react'; import { Badge, Box, diff --git a/src/app/components/message/layout/Base.tsx b/src/app/components/message/layout/Base.tsx index ac196a5b..63a01387 100644 --- a/src/app/components/message/layout/Base.tsx +++ b/src/app/components/message/layout/Base.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Text, as } from 'folds'; import classNames from 'classnames'; import * as css from './layout.css'; diff --git a/src/app/components/message/layout/Bubble.tsx b/src/app/components/message/layout/Bubble.tsx index 93ff84bc..c49cfa35 100644 --- a/src/app/components/message/layout/Bubble.tsx +++ b/src/app/components/message/layout/Bubble.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import classNames from 'classnames'; import { Box, ContainerColor, as, color } from 'folds'; import * as css from './layout.css'; diff --git a/src/app/components/message/layout/Compact.tsx b/src/app/components/message/layout/Compact.tsx index a033919f..e9015ab9 100644 --- a/src/app/components/message/layout/Compact.tsx +++ b/src/app/components/message/layout/Compact.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box, as } from 'folds'; import * as css from './layout.css'; diff --git a/src/app/components/message/layout/Modern.tsx b/src/app/components/message/layout/Modern.tsx index 70b25c57..e73e9301 100644 --- a/src/app/components/message/layout/Modern.tsx +++ b/src/app/components/message/layout/Modern.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box, as } from 'folds'; import * as css from './layout.css'; diff --git a/src/app/components/message/modals/GlobalModalManager.tsx b/src/app/components/message/modals/GlobalModalManager.tsx index 72f1e0ed..86c20600 100644 --- a/src/app/components/message/modals/GlobalModalManager.tsx +++ b/src/app/components/message/modals/GlobalModalManager.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useAtom } from 'jotai'; import { Overlay, OverlayBackdrop, OverlayCenter, Box, Modal } from 'folds'; import FocusTrap from 'focus-trap-react'; diff --git a/src/app/components/message/modals/MessageReactions.tsx b/src/app/components/message/modals/MessageReactions.tsx index a2b612e3..99c6c7fa 100644 --- a/src/app/components/message/modals/MessageReactions.tsx +++ b/src/app/components/message/modals/MessageReactions.tsx @@ -1,6 +1,5 @@ import React from 'react'; -import { Room } from '$types/matrix-sdk'; -import { Relations } from '$types/matrix-sdk'; +import { Room, Relations } from '$types/matrix-sdk'; import { useSetAtom } from 'jotai'; import { Icon, Icons, Text, MenuItem } from 'folds'; import { modalAtom, ModalType } from '$state/modal'; diff --git a/src/app/components/message/placeholder/CompactPlaceholder.tsx b/src/app/components/message/placeholder/CompactPlaceholder.tsx index 0dbffa0e..62d9ca23 100644 --- a/src/app/components/message/placeholder/CompactPlaceholder.tsx +++ b/src/app/components/message/placeholder/CompactPlaceholder.tsx @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { as, ContainerColor, toRem } from 'folds'; import { randomNumberBetween } from '$appUtils/common'; import { LinePlaceholder } from './LinePlaceholder'; diff --git a/src/app/components/message/placeholder/DefaultPlaceholder.tsx b/src/app/components/message/placeholder/DefaultPlaceholder.tsx index 20fc506e..21fbc6e2 100644 --- a/src/app/components/message/placeholder/DefaultPlaceholder.tsx +++ b/src/app/components/message/placeholder/DefaultPlaceholder.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties, useMemo } from 'react'; +import { CSSProperties, useMemo } from 'react'; import { Avatar, Box, ContainerColor, as, color, toRem } from 'folds'; import { randomNumberBetween } from '$appUtils/common'; import { LinePlaceholder } from './LinePlaceholder'; diff --git a/src/app/components/message/placeholder/LinePlaceholder.tsx b/src/app/components/message/placeholder/LinePlaceholder.tsx index 58fc52c0..7aaaac36 100644 --- a/src/app/components/message/placeholder/LinePlaceholder.tsx +++ b/src/app/components/message/placeholder/LinePlaceholder.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, as } from 'folds'; import classNames from 'classnames'; import * as css from './LinePlaceholder.css'; diff --git a/src/app/components/nav/NavCategory.tsx b/src/app/components/nav/NavCategory.tsx index 4ccf1158..7285330f 100644 --- a/src/app/components/nav/NavCategory.tsx +++ b/src/app/components/nav/NavCategory.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { as } from 'folds'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/nav/NavCategoryHeader.tsx b/src/app/components/nav/NavCategoryHeader.tsx index e6ae700a..1d4152fc 100644 --- a/src/app/components/nav/NavCategoryHeader.tsx +++ b/src/app/components/nav/NavCategoryHeader.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import classNames from 'classnames'; import { Header, as } from 'folds'; import * as css from './styles.css'; diff --git a/src/app/components/nav/NavEmptyLayout.tsx b/src/app/components/nav/NavEmptyLayout.tsx index 322ef1c3..25b69380 100644 --- a/src/app/components/nav/NavEmptyLayout.tsx +++ b/src/app/components/nav/NavEmptyLayout.tsx @@ -1,5 +1,5 @@ import { Box, config } from 'folds'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; export function NavEmptyCenter({ children }: { children: ReactNode }) { return ( diff --git a/src/app/components/nav/NavItem.tsx b/src/app/components/nav/NavItem.tsx index 1ec1257f..68a967f6 100644 --- a/src/app/components/nav/NavItem.tsx +++ b/src/app/components/nav/NavItem.tsx @@ -1,5 +1,5 @@ import classNames from 'classnames'; -import React, { ComponentProps, forwardRef } from 'react'; +import { ComponentProps, forwardRef } from 'react'; import { Link } from 'react-router-dom'; import { as } from 'folds'; import * as css from './styles.css'; diff --git a/src/app/components/nav/NavItemContent.tsx b/src/app/components/nav/NavItemContent.tsx index d6a5d131..22a45881 100644 --- a/src/app/components/nav/NavItemContent.tsx +++ b/src/app/components/nav/NavItemContent.tsx @@ -1,4 +1,4 @@ -import React, { ComponentProps } from 'react'; +import { ComponentProps } from 'react'; import { Text, as } from 'folds'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/nav/NavItemOptions.tsx b/src/app/components/nav/NavItemOptions.tsx index 1c2ffd3f..a735781e 100644 --- a/src/app/components/nav/NavItemOptions.tsx +++ b/src/app/components/nav/NavItemOptions.tsx @@ -1,4 +1,4 @@ -import React, { ComponentProps } from 'react'; +import { ComponentProps } from 'react'; import { Box, as } from 'folds'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/components/page/Page.tsx b/src/app/components/page/Page.tsx index 84bdf6dc..be4fd70c 100644 --- a/src/app/components/page/Page.tsx +++ b/src/app/components/page/Page.tsx @@ -1,4 +1,4 @@ -import React, { ComponentProps, MutableRefObject, ReactNode } from 'react'; +import { ComponentProps, MutableRefObject, ReactNode } from 'react'; import { Box, Header, Line, Scroll, Text, as } from 'folds'; import classNames from 'classnames'; import { ContainerColor } from '$styles/ContainerColor.css'; diff --git a/src/app/components/password-input/PasswordInput.tsx b/src/app/components/password-input/PasswordInput.tsx index 4ffe0d83..16aa1f16 100644 --- a/src/app/components/password-input/PasswordInput.tsx +++ b/src/app/components/password-input/PasswordInput.tsx @@ -1,4 +1,4 @@ -import React, { ComponentProps, forwardRef } from 'react'; +import { ComponentProps, forwardRef } from 'react'; import { Icon, IconButton, Input, config, Icons } from 'folds'; import { UseStateProvider } from '../UseStateProvider'; diff --git a/src/app/components/power/PowerColorBadge.tsx b/src/app/components/power/PowerColorBadge.tsx index 497385b7..5ef1f12a 100644 --- a/src/app/components/power/PowerColorBadge.tsx +++ b/src/app/components/power/PowerColorBadge.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { as } from 'folds'; import classNames from 'classnames'; import * as css from './style.css'; diff --git a/src/app/components/power/PowerIcon.tsx b/src/app/components/power/PowerIcon.tsx index 868b8ee2..d640a04f 100644 --- a/src/app/components/power/PowerIcon.tsx +++ b/src/app/components/power/PowerIcon.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import * as css from './style.css'; import { JUMBO_EMOJI_REG } from '$appUtils/regex'; diff --git a/src/app/components/power/PowerSelector.tsx b/src/app/components/power/PowerSelector.tsx index cceb19d1..a4a2a554 100644 --- a/src/app/components/power/PowerSelector.tsx +++ b/src/app/components/power/PowerSelector.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef, MouseEventHandler, ReactNode, useState } from 'react'; +import { forwardRef, MouseEventHandler, ReactNode, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { Box, config, Menu, MenuItem, PopOut, Scroll, Text, toRem, RectCords } from 'folds'; import { getPowers, PowerLevelTags } from '$hooks/usePowerLevelTags'; diff --git a/src/app/components/presence/Presence.tsx b/src/app/components/presence/Presence.tsx index 7bd87579..9283509e 100644 --- a/src/app/components/presence/Presence.tsx +++ b/src/app/components/presence/Presence.tsx @@ -10,7 +10,7 @@ import { TooltipProvider, toRem, } from 'folds'; -import React, { ReactNode, useId } from 'react'; +import { ReactNode, useId } from 'react'; import * as css from './styles.css'; import { Presence, usePresenceLabel } from '$hooks/useUserPresence'; diff --git a/src/app/components/room-avatar/RoomAvatar.tsx b/src/app/components/room-avatar/RoomAvatar.tsx index 6220af97..ef9218bb 100644 --- a/src/app/components/room-avatar/RoomAvatar.tsx +++ b/src/app/components/room-avatar/RoomAvatar.tsx @@ -1,6 +1,6 @@ import { JoinRule } from '$types/matrix-sdk'; import { AvatarFallback, AvatarImage, Icon, Icons, color } from 'folds'; -import React, { ComponentProps, ReactEventHandler, ReactNode, forwardRef, useState } from 'react'; +import { ComponentProps, ReactEventHandler, ReactNode, forwardRef, useState } from 'react'; import * as css from './RoomAvatar.css'; import { getRoomIconSrc } from '$appUtils/room'; import colorMXID from '$util/colorMXID'; diff --git a/src/app/components/room-card/RoomCard.tsx b/src/app/components/room-card/RoomCard.tsx index 40a0f65e..847740ec 100644 --- a/src/app/components/room-card/RoomCard.tsx +++ b/src/app/components/room-card/RoomCard.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useCallback, useRef, useState } from 'react'; +import { ReactNode, useCallback, useRef, useState } from 'react'; import { MatrixError, Room } from '$types/matrix-sdk'; import { Avatar, diff --git a/src/app/components/room-intro/RoomIntro.tsx b/src/app/components/room-intro/RoomIntro.tsx index 3ab97979..0db3bd3a 100644 --- a/src/app/components/room-intro/RoomIntro.tsx +++ b/src/app/components/room-intro/RoomIntro.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { Avatar, Box, Button, Spinner, Text, as } from 'folds'; import { Room } from '$types/matrix-sdk'; import { useAtomValue } from 'jotai'; diff --git a/src/app/components/room-topic-viewer/RoomTopicViewer.tsx b/src/app/components/room-topic-viewer/RoomTopicViewer.tsx index 96a2c01b..72798181 100644 --- a/src/app/components/room-topic-viewer/RoomTopicViewer.tsx +++ b/src/app/components/room-topic-viewer/RoomTopicViewer.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { as, Box, Header, Icon, IconButton, Icons, Modal, Scroll, Text } from 'folds'; import classNames from 'classnames'; import Linkify from 'linkify-react'; diff --git a/src/app/components/scroll-top-container/ScrollTopContainer.tsx b/src/app/components/scroll-top-container/ScrollTopContainer.tsx index 11433dc8..36b19417 100644 --- a/src/app/components/scroll-top-container/ScrollTopContainer.tsx +++ b/src/app/components/scroll-top-container/ScrollTopContainer.tsx @@ -1,4 +1,4 @@ -import React, { RefObject, useCallback, useState } from 'react'; +import { RefObject, useCallback, useState } from 'react'; import { Box, as } from 'folds'; import classNames from 'classnames'; import * as css from './style.css'; diff --git a/src/app/components/sequence-card/SequenceCard.tsx b/src/app/components/sequence-card/SequenceCard.tsx index 9f3c73fc..65d80dce 100644 --- a/src/app/components/sequence-card/SequenceCard.tsx +++ b/src/app/components/sequence-card/SequenceCard.tsx @@ -1,4 +1,4 @@ -import React, { ComponentProps } from 'react'; +import { ComponentProps } from 'react'; import { Box, as } from 'folds'; import classNames from 'classnames'; import { ContainerColor, ContainerColorVariants } from '$styles/ContainerColor.css'; diff --git a/src/app/components/server-badge/ServerBadge.tsx b/src/app/components/server-badge/ServerBadge.tsx index f61a146f..9a53af6e 100644 --- a/src/app/components/server-badge/ServerBadge.tsx +++ b/src/app/components/server-badge/ServerBadge.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { as, Badge, Text } from 'folds'; export const ServerBadge = as< diff --git a/src/app/components/setting-tile/SettingTile.tsx b/src/app/components/setting-tile/SettingTile.tsx index 541480a3..e57dccd5 100644 --- a/src/app/components/setting-tile/SettingTile.tsx +++ b/src/app/components/setting-tile/SettingTile.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box, Text } from 'folds'; import { BreakWord } from '$styles/Text.css'; diff --git a/src/app/components/sidebar/Sidebar.tsx b/src/app/components/sidebar/Sidebar.tsx index 7caf1b21..1e755987 100644 --- a/src/app/components/sidebar/Sidebar.tsx +++ b/src/app/components/sidebar/Sidebar.tsx @@ -1,6 +1,5 @@ import classNames from 'classnames'; import { as } from 'folds'; -import React from 'react'; import * as css from './Sidebar.css'; export const Sidebar = as<'div'>(({ as: AsSidebar = 'div', className, ...props }, ref) => ( diff --git a/src/app/components/sidebar/SidebarContent.tsx b/src/app/components/sidebar/SidebarContent.tsx index b09ea64a..a4546b19 100644 --- a/src/app/components/sidebar/SidebarContent.tsx +++ b/src/app/components/sidebar/SidebarContent.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box } from 'folds'; type SidebarContentProps = { diff --git a/src/app/components/sidebar/SidebarItem.tsx b/src/app/components/sidebar/SidebarItem.tsx index b23772bb..6e6e0146 100644 --- a/src/app/components/sidebar/SidebarItem.tsx +++ b/src/app/components/sidebar/SidebarItem.tsx @@ -1,6 +1,6 @@ import classNames from 'classnames'; import { as, Avatar, Text, Tooltip, TooltipProvider, toRem } from 'folds'; -import React, { ComponentProps, ReactNode, RefCallback } from 'react'; +import { ComponentProps, ReactNode, RefCallback } from 'react'; import * as css from './Sidebar.css'; export const SidebarItem = as<'div', css.SidebarItemVariants>( diff --git a/src/app/components/sidebar/SidebarStack.tsx b/src/app/components/sidebar/SidebarStack.tsx index c0e976c8..86a898e5 100644 --- a/src/app/components/sidebar/SidebarStack.tsx +++ b/src/app/components/sidebar/SidebarStack.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import classNames from 'classnames'; import { as } from 'folds'; import * as css from './Sidebar.css'; diff --git a/src/app/components/sidebar/SidebarStackSeparator.tsx b/src/app/components/sidebar/SidebarStackSeparator.tsx index 110341ca..40dada0a 100644 --- a/src/app/components/sidebar/SidebarStackSeparator.tsx +++ b/src/app/components/sidebar/SidebarStackSeparator.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Line, toRem } from 'folds'; export function SidebarStackSeparator() { diff --git a/src/app/components/splash-screen/SplashScreen.tsx b/src/app/components/splash-screen/SplashScreen.tsx index a5696f59..463fd66d 100644 --- a/src/app/components/splash-screen/SplashScreen.tsx +++ b/src/app/components/splash-screen/SplashScreen.tsx @@ -1,5 +1,5 @@ import { Box, Text } from 'folds'; -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import classNames from 'classnames'; import * as patternsCSS from '$styles/Patterns.css'; import * as css from './SplashScreen.css'; diff --git a/src/app/components/text-viewer/TextViewer.tsx b/src/app/components/text-viewer/TextViewer.tsx index e362d439..0eeaad9f 100644 --- a/src/app/components/text-viewer/TextViewer.tsx +++ b/src/app/components/text-viewer/TextViewer.tsx @@ -1,5 +1,5 @@ -/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ -import React, { ComponentProps, HTMLAttributes, Suspense, forwardRef, lazy } from 'react'; + +import { ComponentProps, HTMLAttributes, Suspense, forwardRef, lazy } from 'react'; import classNames from 'classnames'; import { Box, Chip, Header, Icon, IconButton, Icons, Scroll, Text, as } from 'folds'; import { ErrorBoundary } from 'react-error-boundary'; diff --git a/src/app/components/time-date/DatePicker.tsx b/src/app/components/time-date/DatePicker.tsx index 0f93985f..0d996f5e 100644 --- a/src/app/components/time-date/DatePicker.tsx +++ b/src/app/components/time-date/DatePicker.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { Menu, Box, Text, Chip } from 'folds'; import dayjs from 'dayjs'; import * as css from './styles.css'; diff --git a/src/app/components/time-date/PickerColumn.tsx b/src/app/components/time-date/PickerColumn.tsx index c31daf43..cf227a82 100644 --- a/src/app/components/time-date/PickerColumn.tsx +++ b/src/app/components/time-date/PickerColumn.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode } from 'react'; +import { ReactNode } from 'react'; import { Box, Text, Scroll } from 'folds'; import { CutoutCard } from '../cutout-card'; import * as css from './styles.css'; diff --git a/src/app/components/time-date/TimePicker.tsx b/src/app/components/time-date/TimePicker.tsx index 22f29800..da9b5be6 100644 --- a/src/app/components/time-date/TimePicker.tsx +++ b/src/app/components/time-date/TimePicker.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import { forwardRef } from 'react'; import { Menu, Box, Text, Chip } from 'folds'; import dayjs from 'dayjs'; import * as css from './styles.css'; diff --git a/src/app/components/typing-indicator/TypingIndicator.tsx b/src/app/components/typing-indicator/TypingIndicator.tsx index e7997cf1..779a728a 100644 --- a/src/app/components/typing-indicator/TypingIndicator.tsx +++ b/src/app/components/typing-indicator/TypingIndicator.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, as, toRem } from 'folds'; import * as css from './TypingIndicator.css'; diff --git a/src/app/components/uia-stages/DummyStage.tsx b/src/app/components/uia-stages/DummyStage.tsx index 2f75752e..9a78af0e 100644 --- a/src/app/components/uia-stages/DummyStage.tsx +++ b/src/app/components/uia-stages/DummyStage.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useCallback } from 'react'; +import { useEffect, useCallback } from 'react'; import { Dialog, Text, Box, Button, config } from 'folds'; import { AuthType } from '$types/matrix-sdk'; import { StageComponentProps } from './types'; diff --git a/src/app/components/uia-stages/EmailStage.tsx b/src/app/components/uia-stages/EmailStage.tsx index ce396e99..11da8cf1 100644 --- a/src/app/components/uia-stages/EmailStage.tsx +++ b/src/app/components/uia-stages/EmailStage.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useCallback, FormEventHandler } from 'react'; +import { useEffect, useCallback, FormEventHandler } from 'react'; import { Dialog, Text, Box, Button, config, Input, color, Spinner } from 'folds'; import { AuthType, MatrixError } from '$types/matrix-sdk'; import { StageComponentProps } from './types'; diff --git a/src/app/components/uia-stages/PasswordStage.tsx b/src/app/components/uia-stages/PasswordStage.tsx index d123a77e..d168ddcc 100644 --- a/src/app/components/uia-stages/PasswordStage.tsx +++ b/src/app/components/uia-stages/PasswordStage.tsx @@ -1,5 +1,5 @@ import { Box, Button, color, config, Dialog, Header, Icon, IconButton, Icons, Text } from 'folds'; -import React, { FormEventHandler } from 'react'; +import { FormEventHandler } from 'react'; import { AuthType } from '$types/matrix-sdk'; import { StageComponentProps } from './types'; import { ErrorCode } from '../../cs-errorcode'; diff --git a/src/app/components/uia-stages/ReCaptchaStage.tsx b/src/app/components/uia-stages/ReCaptchaStage.tsx index 6d9558c0..65357b0e 100644 --- a/src/app/components/uia-stages/ReCaptchaStage.tsx +++ b/src/app/components/uia-stages/ReCaptchaStage.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Dialog, Text, Box, Button, config } from 'folds'; import { AuthType } from '$types/matrix-sdk'; import ReCAPTCHA from 'react-google-recaptcha'; diff --git a/src/app/components/uia-stages/RegistrationTokenStage.tsx b/src/app/components/uia-stages/RegistrationTokenStage.tsx index 772db07f..cfe79786 100644 --- a/src/app/components/uia-stages/RegistrationTokenStage.tsx +++ b/src/app/components/uia-stages/RegistrationTokenStage.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useCallback, FormEventHandler } from 'react'; +import { useEffect, useCallback, FormEventHandler } from 'react'; import { Dialog, Text, Box, Button, config, Input } from 'folds'; import { AuthType } from '$types/matrix-sdk'; import { StageComponentProps } from './types'; diff --git a/src/app/components/uia-stages/SSOStage.tsx b/src/app/components/uia-stages/SSOStage.tsx index e3d6126a..fb20e03b 100644 --- a/src/app/components/uia-stages/SSOStage.tsx +++ b/src/app/components/uia-stages/SSOStage.tsx @@ -1,5 +1,5 @@ import { Box, Button, color, config, Dialog, Header, Icon, IconButton, Icons, Text } from 'folds'; -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { StageComponentProps } from './types'; export function SSOStage({ diff --git a/src/app/components/uia-stages/TermsStage.tsx b/src/app/components/uia-stages/TermsStage.tsx index 7e3fd9b6..bfe8e403 100644 --- a/src/app/components/uia-stages/TermsStage.tsx +++ b/src/app/components/uia-stages/TermsStage.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useCallback } from 'react'; +import { useEffect, useCallback } from 'react'; import { Dialog, Text, Box, Button, config } from 'folds'; import { AuthType } from '$types/matrix-sdk'; import { StageComponentProps } from './types'; diff --git a/src/app/components/unread-badge/UnreadBadge.tsx b/src/app/components/unread-badge/UnreadBadge.tsx index 25b0cfe1..6a62642a 100644 --- a/src/app/components/unread-badge/UnreadBadge.tsx +++ b/src/app/components/unread-badge/UnreadBadge.tsx @@ -1,4 +1,4 @@ -import React, { CSSProperties, ReactNode } from 'react'; +import { CSSProperties, ReactNode } from 'react'; import { Box, Badge, toRem, Text } from 'folds'; import { millify } from '$plugins/millify'; diff --git a/src/app/components/upload-board/UploadBoard.tsx b/src/app/components/upload-board/UploadBoard.tsx index 74f1b663..56acf2b7 100644 --- a/src/app/components/upload-board/UploadBoard.tsx +++ b/src/app/components/upload-board/UploadBoard.tsx @@ -1,4 +1,4 @@ -import React, { MutableRefObject, ReactNode, useImperativeHandle, useRef } from 'react'; +import { MutableRefObject, ReactNode, useImperativeHandle, useRef } from 'react'; import { Badge, Box, Chip, Header, Icon, Icons, Spinner, Text, as, percent } from 'folds'; import classNames from 'classnames'; import { useAtomValue } from 'jotai'; @@ -66,7 +66,7 @@ export function UploadBoardHeader({ if (sendingRef.current) return; sendingRef.current = true; await onSend( - uploads.filter((upload) => upload.status === UploadStatus.Success) as UploadSuccess[] + uploads.filter((upload) => upload.status === UploadStatus.Success) ); sendingRef.current = false; }; diff --git a/src/app/components/upload-card/CompactUploadCardRenderer.tsx b/src/app/components/upload-card/CompactUploadCardRenderer.tsx index fd0272da..6fdc1e9a 100644 --- a/src/app/components/upload-card/CompactUploadCardRenderer.tsx +++ b/src/app/components/upload-card/CompactUploadCardRenderer.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { Chip, Icon, IconButton, Icons, Text, color } from 'folds'; import { UploadCard, UploadCardError, CompactUploadCardProgress } from './UploadCard'; import { TUploadAtom, UploadStatus, UploadSuccess, useBindUploadAtom } from '$state/upload'; diff --git a/src/app/components/upload-card/UploadCard.tsx b/src/app/components/upload-card/UploadCard.tsx index b1c57e4f..b438ba3f 100644 --- a/src/app/components/upload-card/UploadCard.tsx +++ b/src/app/components/upload-card/UploadCard.tsx @@ -1,5 +1,5 @@ import { Badge, Box, Icon, Icons, ProgressBar, Text, percent } from 'folds'; -import React, { ReactNode, forwardRef } from 'react'; +import { ReactNode, forwardRef } from 'react'; import * as css from './UploadCard.css'; import { bytesToSize } from '$appUtils/common'; diff --git a/src/app/components/upload-card/UploadCardRenderer.tsx b/src/app/components/upload-card/UploadCardRenderer.tsx index 5f978703..6aa2a3a8 100644 --- a/src/app/components/upload-card/UploadCardRenderer.tsx +++ b/src/app/components/upload-card/UploadCardRenderer.tsx @@ -1,4 +1,4 @@ -import React, { ReactNode, useEffect } from 'react'; +import { ReactNode, useEffect } from 'react'; import { Box, Chip, Icon, IconButton, Icons, Text, color, config, toRem } from 'folds'; import { UploadCard, UploadCardError, UploadCardProgress } from './UploadCard'; import { UploadStatus, UploadSuccess, useBindUploadAtom } from '$state/upload'; diff --git a/src/app/components/url-preview/UrlPreview.tsx b/src/app/components/url-preview/UrlPreview.tsx index 4ba3e4e2..ae970b0e 100644 --- a/src/app/components/url-preview/UrlPreview.tsx +++ b/src/app/components/url-preview/UrlPreview.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import classNames from 'classnames'; import { Box, as } from 'folds'; import * as css from './UrlPreview.css'; diff --git a/src/app/components/url-preview/UrlPreviewCard.tsx b/src/app/components/url-preview/UrlPreviewCard.tsx index 6354bed3..0d25d0f6 100644 --- a/src/app/components/url-preview/UrlPreviewCard.tsx +++ b/src/app/components/url-preview/UrlPreviewCard.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import { IPreviewUrlResponse } from '$types/matrix-sdk'; import { Box, Icon, IconButton, Icons, Scroll, Spinner, Text, as, color, config } from 'folds'; import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; @@ -11,9 +11,6 @@ import { import * as css from './UrlPreviewCard.css'; import { mxcUrlToHttp } from '$appUtils/matrix'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; -import { ImageViewer } from '../image-viewer'; -import { Image, Video } from '../media'; -import { ImageContent, VideoContent } from '../message'; const linkStyles = { color: color.Success.Main }; const TARGET_HEIGHT = 300; diff --git a/src/app/components/user-avatar/UserAvatar.tsx b/src/app/components/user-avatar/UserAvatar.tsx index 96611563..a8f08a61 100644 --- a/src/app/components/user-avatar/UserAvatar.tsx +++ b/src/app/components/user-avatar/UserAvatar.tsx @@ -1,5 +1,5 @@ import { AvatarFallback, AvatarImage, color } from 'folds'; -import React, { ReactEventHandler, ReactNode, useState } from 'react'; +import { ReactEventHandler, ReactNode, useState } from 'react'; import classNames from 'classnames'; import * as css from './UserAvatar.css'; import colorMXID from '$util/colorMXID'; diff --git a/src/app/components/user-profile/CreatorChip.tsx b/src/app/components/user-profile/CreatorChip.tsx index 5ce91a5f..71dc36be 100644 --- a/src/app/components/user-profile/CreatorChip.tsx +++ b/src/app/components/user-profile/CreatorChip.tsx @@ -1,5 +1,5 @@ import { Chip, config, Icon, Icons, Menu, MenuItem, PopOut, RectCords, Text } from 'folds'; -import React, { MouseEventHandler, useState } from 'react'; +import { MouseEventHandler, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { isKeyHotkey } from 'is-hotkey'; import { useRoomCreatorsTag } from '$hooks/useRoomCreatorsTag'; diff --git a/src/app/components/user-profile/PowerChip.tsx b/src/app/components/user-profile/PowerChip.tsx index 6fad42e6..39f5d39b 100644 --- a/src/app/components/user-profile/PowerChip.tsx +++ b/src/app/components/user-profile/PowerChip.tsx @@ -20,7 +20,7 @@ import { Text, toRem, } from 'folds'; -import React, { MouseEventHandler, useCallback, useState } from 'react'; +import { MouseEventHandler, useCallback, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { isKeyHotkey } from 'is-hotkey'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/components/user-profile/UserChips.tsx b/src/app/components/user-profile/UserChips.tsx index c35443ca..0041a2e2 100644 --- a/src/app/components/user-profile/UserChips.tsx +++ b/src/app/components/user-profile/UserChips.tsx @@ -1,4 +1,4 @@ -import React, { +import { KeyboardEventHandler, MouseEventHandler, useCallback, diff --git a/src/app/components/user-profile/UserHero.tsx b/src/app/components/user-profile/UserHero.tsx index a538c803..39b6597e 100644 --- a/src/app/components/user-profile/UserHero.tsx +++ b/src/app/components/user-profile/UserHero.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Avatar, Box, diff --git a/src/app/components/user-profile/UserModeration.tsx b/src/app/components/user-profile/UserModeration.tsx index a093c263..67695636 100644 --- a/src/app/components/user-profile/UserModeration.tsx +++ b/src/app/components/user-profile/UserModeration.tsx @@ -1,5 +1,5 @@ import { Box, Button, color, config, Icon, Icons, Spinner, Text, Input } from 'folds'; -import React, { useCallback, useRef } from 'react'; +import { useCallback, useRef } from 'react'; import { useRoom } from '$hooks/useRoom'; import { CutoutCard } from '../cutout-card'; import { SettingTile } from '../setting-tile'; diff --git a/src/app/components/virtualizer/VirtualTile.tsx b/src/app/components/virtualizer/VirtualTile.tsx index 0c6a5bd3..b92add55 100644 --- a/src/app/components/virtualizer/VirtualTile.tsx +++ b/src/app/components/virtualizer/VirtualTile.tsx @@ -1,6 +1,5 @@ import { VirtualItem } from '@tanstack/react-virtual'; import { as } from 'folds'; -import React from 'react'; import classNames from 'classnames'; import * as css from './style.css'; diff --git a/src/app/features/add-existing/AddExisting.tsx b/src/app/features/add-existing/AddExisting.tsx index 8e7c8a2f..605457b5 100644 --- a/src/app/features/add-existing/AddExisting.tsx +++ b/src/app/features/add-existing/AddExisting.tsx @@ -19,7 +19,7 @@ import { Spinner, Text, } from 'folds'; -import React, { +import { ChangeEventHandler, MouseEventHandler, useCallback, diff --git a/src/app/features/call/CallViewUser.tsx b/src/app/features/call/CallViewUser.tsx index afce615f..c3b60b1b 100644 --- a/src/app/features/call/CallViewUser.tsx +++ b/src/app/features/call/CallViewUser.tsx @@ -1,8 +1,7 @@ import { as, Avatar, Box, Icon, Icons, Text } from 'folds'; import React from 'react'; import classNames from 'classnames'; -import { Room } from '$types/matrix-sdk'; -import { CallMembership } from '$types/matrix-sdk'; +import { Room, CallMembership } from '$types/matrix-sdk'; import { UserAvatar } from '$components/user-avatar'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { getMxIdLocalPart } from '$appUtils/matrix'; diff --git a/src/app/features/call/SmallWidget.ts b/src/app/features/call/SmallWidget.ts index b90c1a2a..192c3f72 100644 --- a/src/app/features/call/SmallWidget.ts +++ b/src/app/features/call/SmallWidget.ts @@ -62,7 +62,7 @@ export const getWidgetUrl = ( userId: mx.getUserId()!, deviceId: mx.getDeviceId()!, roomId, - baseUrl: mx.baseUrl!, + baseUrl: mx.baseUrl, parentUrl: window.location.origin, }); @@ -140,7 +140,7 @@ export class SmallWidget extends EventEmitter { // Populate the map of "read up to" events for this widget with the current event in every room. // This is a bit inefficient, but should be okay. We do this for all rooms in case the widget // requests timeline capabilities in other rooms down the road. It's just easier to manage here. - // eslint-disable-next-line no-restricted-syntax + for (const room of this.client.getRooms()) { // Timelines are most recent last const events = room.getLiveTimeline()?.getEvents() || []; @@ -243,7 +243,7 @@ export class SmallWidget extends EventEmitter { return room === null || !room.findEventById(ev.relationEventId); } - // eslint-disable-next-line class-methods-use-this + private arrayFastClone(a: T[]): T[] { return a.slice(0, a.length); } diff --git a/src/app/features/call/SmallWidgetDriver.ts b/src/app/features/call/SmallWidgetDriver.ts index 54258b4f..92e3d5b8 100644 --- a/src/app/features/call/SmallWidgetDriver.ts +++ b/src/app/features/call/SmallWidgetDriver.ts @@ -1,8 +1,8 @@ -/* eslint-disable no-return-await */ -/* eslint-disable no-param-reassign */ -/* eslint-disable no-continue */ -/* eslint-disable class-methods-use-this */ -/* eslint-disable no-dupe-class-members */ + + + + + /* * Copyright 2024 New Vector Ltd. * Copyright 2020-2023 The Matrix.org Foundation C.I.C. @@ -127,7 +127,7 @@ export class SmallWidgetDriver extends WidgetDriver { EventType.RoomRedaction, 'io.element.call.reaction', ]; - // eslint-disable-next-line no-restricted-syntax + for (const eventType of sendRecvRoomEvents) { this.allowedCapabilities.add( WidgetEventCapability.forRoomEvent(EventDirection.Send, eventType).raw @@ -150,7 +150,7 @@ export class SmallWidgetDriver extends WidgetDriver { EventType.CallReplaces, EventType.CallEncryptionKeysPrefix, ]; - // eslint-disable-next-line no-restricted-syntax + for (const eventType of sendRecvToDevice) { this.allowedCapabilities.add( WidgetEventCapability.forToDeviceEvent(EventDirection.Send, eventType).raw @@ -325,10 +325,10 @@ export class SmallWidgetDriver extends WidgetDriver { // attempt to re-batch these up into a single request const invertedContentMap: { [content: string]: { userId: string; deviceId: string }[] } = {}; - // eslint-disable-next-line no-restricted-syntax + for (const userId of Object.keys(contentMap)) { const userContentMap = contentMap[userId]; - // eslint-disable-next-line no-restricted-syntax + for (const deviceId of Object.keys(userContentMap)) { const content = userContentMap[deviceId]; const stringifiedContent = JSON.stringify(content); diff --git a/src/app/features/common-settings/cosmetics/Cosmetics.tsx b/src/app/features/common-settings/cosmetics/Cosmetics.tsx index c2871630..dec707f2 100644 --- a/src/app/features/common-settings/cosmetics/Cosmetics.tsx +++ b/src/app/features/common-settings/cosmetics/Cosmetics.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll, Switch } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/common-settings/developer-tools/DevelopTools.tsx b/src/app/features/common-settings/developer-tools/DevelopTools.tsx index 0b99de81..0f94e6e5 100644 --- a/src/app/features/common-settings/developer-tools/DevelopTools.tsx +++ b/src/app/features/common-settings/developer-tools/DevelopTools.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { Box, Text, diff --git a/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx b/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx index 373ea224..478f0519 100644 --- a/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx +++ b/src/app/features/common-settings/developer-tools/SendRoomEvent.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useRef, useState, FormEventHandler, useEffect } from 'react'; +import { useCallback, useRef, useState, FormEventHandler, useEffect } from 'react'; import { MatrixError } from '$types/matrix-sdk'; import { Box, diff --git a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx index 4d358000..0aedf844 100644 --- a/src/app/features/common-settings/developer-tools/StateEventEditor.tsx +++ b/src/app/features/common-settings/developer-tools/StateEventEditor.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import { FormEventHandler, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { Box, Text, diff --git a/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx b/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx index 63a0dd00..0ee350a6 100644 --- a/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx +++ b/src/app/features/common-settings/emojis-stickers/EmojisStickers.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { ImagePack } from '$plugins/custom-emoji'; diff --git a/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx b/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx index 4e69397b..e5a8b580 100644 --- a/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx +++ b/src/app/features/common-settings/emojis-stickers/RoomPacks.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useMemo, useState } from 'react'; +import { FormEventHandler, useCallback, useMemo, useState } from 'react'; import { Box, Text, @@ -163,7 +163,7 @@ export function RoomPacks({ onViewPack }: RoomPacksProps) { useCallback(async () => { for (let i = 0; i < removedPacks.length; i += 1) { const addr = removedPacks[i]; - // eslint-disable-next-line no-await-in-loop + await mx.sendStateEvent(room.roomId, StateEvent.PoniesRoomEmotes as any, {}, addr.stateKey); } }, [mx, room, removedPacks]) diff --git a/src/app/features/common-settings/general/RoomAddress.tsx b/src/app/features/common-settings/general/RoomAddress.tsx index 62d7f4d7..b69b46e5 100644 --- a/src/app/features/common-settings/general/RoomAddress.tsx +++ b/src/app/features/common-settings/general/RoomAddress.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useState } from 'react'; +import { FormEventHandler, useCallback, useState } from 'react'; import { Badge, Box, @@ -237,7 +237,7 @@ function LocalAddressesList({ async (aliases: string[]) => { for (let i = 0; i < aliases.length; i += 1) { const alias = aliases[i]; - // eslint-disable-next-line no-await-in-loop + await removeLocalAlias(alias); } }, diff --git a/src/app/features/common-settings/general/RoomEncryption.tsx b/src/app/features/common-settings/general/RoomEncryption.tsx index 183aaf22..25ea12aa 100644 --- a/src/app/features/common-settings/general/RoomEncryption.tsx +++ b/src/app/features/common-settings/general/RoomEncryption.tsx @@ -15,7 +15,7 @@ import { Spinner, Text, } from 'folds'; -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { MatrixError } from '$types/matrix-sdk'; import FocusTrap from 'focus-trap-react'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/common-settings/general/RoomHistoryVisibility.tsx b/src/app/features/common-settings/general/RoomHistoryVisibility.tsx index 51ec3ce0..01e0e213 100644 --- a/src/app/features/common-settings/general/RoomHistoryVisibility.tsx +++ b/src/app/features/common-settings/general/RoomHistoryVisibility.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useMemo, useState } from 'react'; +import { MouseEventHandler, useCallback, useMemo, useState } from 'react'; import { Button, color, @@ -12,8 +12,7 @@ import { Spinner, Text, } from 'folds'; -import { HistoryVisibility, MatrixError } from '$types/matrix-sdk'; -import { RoomHistoryVisibilityEventContent } from '$types/matrix-sdk'; +import { HistoryVisibility, MatrixError, RoomHistoryVisibilityEventContent } from '$types/matrix-sdk'; import FocusTrap from 'focus-trap-react'; import { SequenceCard } from '$components/sequence-card'; import { SequenceCardStyle } from '$features/room-settings/styles.css'; diff --git a/src/app/features/common-settings/general/RoomJoinRules.tsx b/src/app/features/common-settings/general/RoomJoinRules.tsx index f3229b42..926f73c8 100644 --- a/src/app/features/common-settings/general/RoomJoinRules.tsx +++ b/src/app/features/common-settings/general/RoomJoinRules.tsx @@ -1,7 +1,6 @@ -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { color, Text } from 'folds'; -import { JoinRule, MatrixError, RestrictedAllowType } from '$types/matrix-sdk'; -import { RoomJoinRulesEventContent } from '$types/matrix-sdk'; +import { JoinRule, MatrixError, RestrictedAllowType, RoomJoinRulesEventContent } from '$types/matrix-sdk'; import { useAtomValue } from 'jotai'; import { ExtendedJoinRules, diff --git a/src/app/features/common-settings/general/RoomProfile.tsx b/src/app/features/common-settings/general/RoomProfile.tsx index c06d7639..e3a0daf7 100644 --- a/src/app/features/common-settings/general/RoomProfile.tsx +++ b/src/app/features/common-settings/general/RoomProfile.tsx @@ -11,7 +11,7 @@ import { Text, TextArea, } from 'folds'; -import React, { FormEventHandler, useCallback, useMemo, useState } from 'react'; +import { FormEventHandler, useCallback, useMemo, useState } from 'react'; import { useAtomValue } from 'jotai'; import Linkify from 'linkify-react'; import classNames from 'classnames'; diff --git a/src/app/features/common-settings/general/RoomPublish.tsx b/src/app/features/common-settings/general/RoomPublish.tsx index 16beccbb..7be15b66 100644 --- a/src/app/features/common-settings/general/RoomPublish.tsx +++ b/src/app/features/common-settings/general/RoomPublish.tsx @@ -1,7 +1,5 @@ -import React from 'react'; import { Box, color, Spinner, Switch, Text } from 'folds'; -import { JoinRule, MatrixError } from '$types/matrix-sdk'; -import { RoomJoinRulesEventContent } from '$types/matrix-sdk'; +import { JoinRule, MatrixError, RoomJoinRulesEventContent } from '$types/matrix-sdk'; import { SequenceCard } from '$components/sequence-card'; import { SequenceCardStyle } from '$features/room-settings/styles.css'; import { SettingTile } from '$components/setting-tile'; diff --git a/src/app/features/common-settings/general/RoomUpgrade.tsx b/src/app/features/common-settings/general/RoomUpgrade.tsx index c3db79e4..18140adc 100644 --- a/src/app/features/common-settings/general/RoomUpgrade.tsx +++ b/src/app/features/common-settings/general/RoomUpgrade.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { Button, color, @@ -16,8 +16,7 @@ import { Icons, } from 'folds'; import FocusTrap from 'focus-trap-react'; -import { MatrixError, Method } from '$types/matrix-sdk'; -import { RoomTombstoneEventContent } from '$types/matrix-sdk'; +import { MatrixError, Method, RoomTombstoneEventContent } from '$types/matrix-sdk'; import { SequenceCard } from '$components/sequence-card'; import { SequenceCardStyle } from '$features/room-settings/styles.css'; import { SettingTile } from '$components/setting-tile'; diff --git a/src/app/features/common-settings/members/Members.tsx b/src/app/features/common-settings/members/Members.tsx index 66d79356..743e40b4 100644 --- a/src/app/features/common-settings/members/Members.tsx +++ b/src/app/features/common-settings/members/Members.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, MouseEventHandler, useCallback, diff --git a/src/app/features/common-settings/permissions/PermissionGroups.tsx b/src/app/features/common-settings/permissions/PermissionGroups.tsx index b1e9e398..385e0237 100644 --- a/src/app/features/common-settings/permissions/PermissionGroups.tsx +++ b/src/app/features/common-settings/permissions/PermissionGroups.tsx @@ -1,5 +1,5 @@ -/* eslint-disable react/no-array-index-key */ -import React, { useCallback, useEffect, useMemo, useState } from 'react'; + +import { useCallback, useEffect, useMemo, useState } from 'react'; import { Badge, Box, Button, Chip, config, Icon, Icons, Menu, Spinner, Text } from 'folds'; import { produce } from 'immer'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/common-settings/permissions/Powers.tsx b/src/app/features/common-settings/permissions/Powers.tsx index 703ad9ad..005059cd 100644 --- a/src/app/features/common-settings/permissions/Powers.tsx +++ b/src/app/features/common-settings/permissions/Powers.tsx @@ -1,5 +1,5 @@ -/* eslint-disable react/no-array-index-key */ -import React, { useState, MouseEventHandler, ReactNode } from 'react'; + +import { useState, MouseEventHandler, ReactNode } from 'react'; import FocusTrap from 'focus-trap-react'; import { Box, diff --git a/src/app/features/common-settings/permissions/PowersEditor.tsx b/src/app/features/common-settings/permissions/PowersEditor.tsx index 1ed122a6..d861ca70 100644 --- a/src/app/features/common-settings/permissions/PowersEditor.tsx +++ b/src/app/features/common-settings/permissions/PowersEditor.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, MouseEventHandler, useCallback, useMemo, useState } from 'react'; +import { FormEventHandler, MouseEventHandler, useCallback, useMemo, useState } from 'react'; import { Box, Text, diff --git a/src/app/features/create-chat/CreateChat.tsx b/src/app/features/create-chat/CreateChat.tsx index 9f9bec49..3fbd868d 100644 --- a/src/app/features/create-chat/CreateChat.tsx +++ b/src/app/features/create-chat/CreateChat.tsx @@ -1,5 +1,5 @@ import { Box, Button, color, config, Icon, Icons, Input, Spinner, Switch, Text } from 'folds'; -import React, { FormEventHandler, useCallback, useState } from 'react'; +import { FormEventHandler, useCallback, useState } from 'react'; import { ICreateRoomStateEvent, MatrixError, Preset, Visibility } from '$types/matrix-sdk'; import { useNavigate } from 'react-router-dom'; import { SettingTile } from '$components/setting-tile'; diff --git a/src/app/features/create-room/CreateRoom.tsx b/src/app/features/create-room/CreateRoom.tsx index cd106b48..2f2411d7 100644 --- a/src/app/features/create-room/CreateRoom.tsx +++ b/src/app/features/create-room/CreateRoom.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useEffect, useState } from 'react'; +import { FormEventHandler, useCallback, useEffect, useState } from 'react'; import { MatrixError, Room, JoinRule } from '$types/matrix-sdk'; import { Box, diff --git a/src/app/features/create-room/CreateRoomModal.tsx b/src/app/features/create-room/CreateRoomModal.tsx index 5ecce259..57ea7fb3 100644 --- a/src/app/features/create-room/CreateRoomModal.tsx +++ b/src/app/features/create-room/CreateRoomModal.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, config, diff --git a/src/app/features/create-space/CreateSpace.tsx b/src/app/features/create-space/CreateSpace.tsx index 60b50ee9..a4808808 100644 --- a/src/app/features/create-space/CreateSpace.tsx +++ b/src/app/features/create-space/CreateSpace.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useEffect, useState } from 'react'; +import { FormEventHandler, useCallback, useEffect, useState } from 'react'; import { MatrixError, Room } from '$types/matrix-sdk'; import { Box, diff --git a/src/app/features/create-space/CreateSpaceModal.tsx b/src/app/features/create-space/CreateSpaceModal.tsx index 939ed7ed..bda884df 100644 --- a/src/app/features/create-space/CreateSpaceModal.tsx +++ b/src/app/features/create-space/CreateSpaceModal.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, config, diff --git a/src/app/features/join-before-navigate/JoinBeforeNavigate.tsx b/src/app/features/join-before-navigate/JoinBeforeNavigate.tsx index babac537..c11ea99f 100644 --- a/src/app/features/join-before-navigate/JoinBeforeNavigate.tsx +++ b/src/app/features/join-before-navigate/JoinBeforeNavigate.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Icon, IconButton, Icons, Scroll, Text, toRem } from 'folds'; import { useAtomValue } from 'jotai'; import { RoomCard } from '$components/room-card'; diff --git a/src/app/features/lobby/DnD.tsx b/src/app/features/lobby/DnD.tsx index 6835ddb2..71c6bf8e 100644 --- a/src/app/features/lobby/DnD.tsx +++ b/src/app/features/lobby/DnD.tsx @@ -1,4 +1,4 @@ -import React, { RefObject, useEffect, useRef, useState } from 'react'; +import { RefObject, useEffect, useRef, useState } from 'react'; import { dropTargetForElements, draggable, diff --git a/src/app/features/lobby/HierarchyItemMenu.tsx b/src/app/features/lobby/HierarchyItemMenu.tsx index f67e5ff0..b598a6a5 100644 --- a/src/app/features/lobby/HierarchyItemMenu.tsx +++ b/src/app/features/lobby/HierarchyItemMenu.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useEffect, useState } from 'react'; +import { MouseEventHandler, useCallback, useEffect, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { Box, diff --git a/src/app/features/lobby/Lobby.tsx b/src/app/features/lobby/Lobby.tsx index a0ea7dd2..d52e1335 100644 --- a/src/app/features/lobby/Lobby.tsx +++ b/src/app/features/lobby/Lobby.tsx @@ -1,11 +1,9 @@ -import React, { MouseEventHandler, useCallback, useMemo, useRef, useState } from 'react'; +import { MouseEventHandler, useCallback, useMemo, useRef, useState } from 'react'; import { Box, Chip, Icon, IconButton, Icons, Line, Scroll, Spinner, Text, config } from 'folds'; import { useVirtualizer } from '@tanstack/react-virtual'; import { useAtom, useAtomValue } from 'jotai'; import { useNavigate } from 'react-router-dom'; -import { JoinRule, RestrictedAllowType, Room } from '$types/matrix-sdk'; -import { RoomJoinRulesEventContent } from '$types/matrix-sdk'; -import { IHierarchyRoom } from '$types/matrix-sdk'; +import { JoinRule, RestrictedAllowType, Room, RoomJoinRulesEventContent , IHierarchyRoom } from '$types/matrix-sdk'; import { produce } from 'immer'; import { useSpace } from '$hooks/useSpace'; import { Page, PageContent, PageContentCenter, PageHeroSection } from '$components/page'; @@ -215,7 +213,7 @@ export function Lobby() { return [getRoom(i.space.roomId), ...childRooms]; }) - .filter((r) => !!r) as Room[], + .filter((r) => !!r), [hierarchy, getRoom] ) ); diff --git a/src/app/features/lobby/LobbyHeader.tsx b/src/app/features/lobby/LobbyHeader.tsx index 9269e8a5..f495ffd2 100644 --- a/src/app/features/lobby/LobbyHeader.tsx +++ b/src/app/features/lobby/LobbyHeader.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, forwardRef, useState } from 'react'; +import { MouseEventHandler, forwardRef, useState } from 'react'; import { Avatar, Box, diff --git a/src/app/features/lobby/LobbyHero.tsx b/src/app/features/lobby/LobbyHero.tsx index 55c9a26f..4c2a44c1 100644 --- a/src/app/features/lobby/LobbyHero.tsx +++ b/src/app/features/lobby/LobbyHero.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Avatar, Overlay, OverlayBackdrop, OverlayCenter, Text } from 'folds'; import FocusTrap from 'focus-trap-react'; import { useRoomAvatar, useRoomName, useRoomTopic } from '$hooks/useRoomMeta'; diff --git a/src/app/features/lobby/RoomItem.tsx b/src/app/features/lobby/RoomItem.tsx index 807f9cb8..eab56511 100644 --- a/src/app/features/lobby/RoomItem.tsx +++ b/src/app/features/lobby/RoomItem.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, ReactNode, useCallback, useRef } from 'react'; +import { MouseEventHandler, ReactNode, useCallback, useRef } from 'react'; import { Avatar, Badge, @@ -19,8 +19,7 @@ import { toRem, } from 'folds'; import FocusTrap from 'focus-trap-react'; -import { JoinRule, MatrixError, Room } from '$types/matrix-sdk'; -import { IHierarchyRoom } from '$types/matrix-sdk'; +import { JoinRule, MatrixError, Room, IHierarchyRoom } from '$types/matrix-sdk'; import { RoomAvatar, RoomIcon } from '$components/room-avatar'; import { SequenceCard } from '$components/sequence-card'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/features/lobby/SpaceHierarchy.tsx b/src/app/features/lobby/SpaceHierarchy.tsx index ab06cf13..827aebc7 100644 --- a/src/app/features/lobby/SpaceHierarchy.tsx +++ b/src/app/features/lobby/SpaceHierarchy.tsx @@ -1,6 +1,5 @@ -import React, { forwardRef, MouseEventHandler, useEffect, useMemo } from 'react'; -import { MatrixError, Room } from '$types/matrix-sdk'; -import { IHierarchyRoom } from '$types/matrix-sdk'; +import { forwardRef, MouseEventHandler, useEffect, useMemo } from 'react'; +import { MatrixError, Room, IHierarchyRoom } from '$types/matrix-sdk'; import { Box, config, Text } from 'folds'; import { HierarchyItem, diff --git a/src/app/features/lobby/SpaceItem.tsx b/src/app/features/lobby/SpaceItem.tsx index f12a3035..48009293 100644 --- a/src/app/features/lobby/SpaceItem.tsx +++ b/src/app/features/lobby/SpaceItem.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, ReactNode, useCallback, useRef, useState } from 'react'; +import { MouseEventHandler, ReactNode, useCallback, useRef, useState } from 'react'; import { Box, Avatar, @@ -18,8 +18,7 @@ import { } from 'folds'; import FocusTrap from 'focus-trap-react'; import classNames from 'classnames'; -import { MatrixError, Room } from '$types/matrix-sdk'; -import { IHierarchyRoom } from '$types/matrix-sdk'; +import { MatrixError, Room, IHierarchyRoom } from '$types/matrix-sdk'; import { HierarchyItem } from '$hooks/useSpaceHierarchy'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { RoomAvatar } from '$components/room-avatar'; diff --git a/src/app/features/message-search/MessageSearch.tsx b/src/app/features/message-search/MessageSearch.tsx index b6537fea..fd96ebab 100644 --- a/src/app/features/message-search/MessageSearch.tsx +++ b/src/app/features/message-search/MessageSearch.tsx @@ -1,4 +1,4 @@ -import React, { RefObject, useEffect, useMemo, useRef } from 'react'; +import { RefObject, useEffect, useMemo, useRef } from 'react'; import { Text, Box, Icon, Icons, config, Spinner, IconButton, Line, toRem } from 'folds'; import { useAtomValue } from 'jotai'; import { useVirtualizer } from '@tanstack/react-virtual'; diff --git a/src/app/features/message-search/SearchFilters.tsx b/src/app/features/message-search/SearchFilters.tsx index d395b62b..7b08150c 100644 --- a/src/app/features/message-search/SearchFilters.tsx +++ b/src/app/features/message-search/SearchFilters.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, MouseEventHandler, useCallback, diff --git a/src/app/features/message-search/SearchInput.tsx b/src/app/features/message-search/SearchInput.tsx index 533eb5fd..ad1ca593 100644 --- a/src/app/features/message-search/SearchInput.tsx +++ b/src/app/features/message-search/SearchInput.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, RefObject } from 'react'; +import { FormEventHandler, RefObject } from 'react'; import { Box, Text, Input, Icon, Icons, Spinner, Chip, config } from 'folds'; type SearchProps = { diff --git a/src/app/features/message-search/SearchResultGroup.tsx b/src/app/features/message-search/SearchResultGroup.tsx index afad0be1..5308cf3b 100644 --- a/src/app/features/message-search/SearchResultGroup.tsx +++ b/src/app/features/message-search/SearchResultGroup.tsx @@ -1,5 +1,5 @@ -/* eslint-disable react/destructuring-assignment */ -import React, { MouseEventHandler, useMemo } from 'react'; + +import { MouseEventHandler, useMemo } from 'react'; import { IEventWithRoomId, JoinRule, RelationType, Room } from '$types/matrix-sdk'; import { HTMLReactParserOptions } from 'html-react-parser'; import { Avatar, Box, Chip, Header, Icon, Icons, Text, config } from 'folds'; diff --git a/src/app/features/room-nav/RoomCallNavStatus.tsx b/src/app/features/room-nav/RoomCallNavStatus.tsx index b02b10bd..63073d4d 100644 --- a/src/app/features/room-nav/RoomCallNavStatus.tsx +++ b/src/app/features/room-nav/RoomCallNavStatus.tsx @@ -11,7 +11,6 @@ import { TooltipProvider, color, } from 'folds'; -import React from 'react'; import { useCallState } from '$pages/client/call/CallProvider'; import { useRoomNavigate } from '$hooks/useRoomNavigate'; import * as css from './RoomCallNavStatus.css'; diff --git a/src/app/features/room-nav/RoomNavCategoryButton.tsx b/src/app/features/room-nav/RoomNavCategoryButton.tsx index 3af8aeac..7adc6dcb 100644 --- a/src/app/features/room-nav/RoomNavCategoryButton.tsx +++ b/src/app/features/room-nav/RoomNavCategoryButton.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { as, Chip, Icon, Icons, Text } from 'folds'; import classNames from 'classnames'; import * as css from './styles.css'; diff --git a/src/app/features/room-nav/RoomNavItem.tsx b/src/app/features/room-nav/RoomNavItem.tsx index 01ac62a5..f81220ec 100644 --- a/src/app/features/room-nav/RoomNavItem.tsx +++ b/src/app/features/room-nav/RoomNavItem.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, forwardRef, useState, MouseEvent } from 'react'; +import { MouseEventHandler, forwardRef, useState, MouseEvent } from 'react'; import { EventType, Room } from '$types/matrix-sdk'; import { Avatar, diff --git a/src/app/features/room-nav/RoomNavUser.tsx b/src/app/features/room-nav/RoomNavUser.tsx index 891ca340..fba3cf9d 100644 --- a/src/app/features/room-nav/RoomNavUser.tsx +++ b/src/app/features/room-nav/RoomNavUser.tsx @@ -1,7 +1,6 @@ import { Avatar, Box, Icon, Icons, Text } from 'folds'; import React from 'react'; -import { Room } from '$types/matrix-sdk'; -import { CallMembership } from '$types/matrix-sdk'; +import { Room, CallMembership } from '$types/matrix-sdk'; import { NavButton, NavItem, NavItemContent } from '$components/nav'; import { UserAvatar } from '$components/user-avatar'; import { useMatrixClient } from '$hooks/useMatrixClient'; diff --git a/src/app/features/room-settings/RoomSettings.tsx b/src/app/features/room-settings/RoomSettings.tsx index cce7b970..ed34331b 100644 --- a/src/app/features/room-settings/RoomSettings.tsx +++ b/src/app/features/room-settings/RoomSettings.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { useAtomValue } from 'jotai'; import { Avatar, Box, config, Icon, IconButton, Icons, IconSrc, MenuItem, Text } from 'folds'; import { JoinRule } from '$types/matrix-sdk'; @@ -18,7 +18,6 @@ import { RoomSettingsPage } from '$state/roomSettings'; import { useRoom } from '$hooks/useRoom'; import { DeveloperTools } from '../common-settings/developer-tools'; import { Cosmetics } from '../common-settings/cosmetics/Cosmetics'; -import { SwipeableChatWrapper } from '$components/SwipeableChatWrapper'; import { SwipeableOverlayWrapper } from '$components/SwipeableOverlayWrapper'; type RoomSettingsMenuItem = { diff --git a/src/app/features/room-settings/RoomSettingsRenderer.tsx b/src/app/features/room-settings/RoomSettingsRenderer.tsx index d1a704e3..4a59d01b 100644 --- a/src/app/features/room-settings/RoomSettingsRenderer.tsx +++ b/src/app/features/room-settings/RoomSettingsRenderer.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { RoomSettings } from './RoomSettings'; import { Modal500 } from '$components/Modal500'; import { useCloseRoomSettings, useRoomSettingsState } from '$state/hooks/roomSettings'; diff --git a/src/app/features/room-settings/general/General.tsx b/src/app/features/room-settings/general/General.tsx index 76187545..c4546b60 100644 --- a/src/app/features/room-settings/general/General.tsx +++ b/src/app/features/room-settings/general/General.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { usePowerLevels } from '$hooks/usePowerLevels'; diff --git a/src/app/features/room-settings/permissions/Permissions.tsx b/src/app/features/room-settings/permissions/Permissions.tsx index 4c943ade..f10b4fab 100644 --- a/src/app/features/room-settings/permissions/Permissions.tsx +++ b/src/app/features/room-settings/permissions/Permissions.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { useRoom } from '$hooks/useRoom'; diff --git a/src/app/features/room/CommandAutocomplete.tsx b/src/app/features/room/CommandAutocomplete.tsx index cb3b09fb..dc51ae6f 100644 --- a/src/app/features/room/CommandAutocomplete.tsx +++ b/src/app/features/room/CommandAutocomplete.tsx @@ -1,4 +1,4 @@ -import React, { KeyboardEvent as ReactKeyboardEvent, useCallback, useEffect, useMemo } from 'react'; +import { KeyboardEvent as ReactKeyboardEvent, useCallback, useEffect, useMemo } from 'react'; import { Editor } from 'slate'; import { Box, config, MenuItem, Text } from 'folds'; import { Room } from '$types/matrix-sdk'; diff --git a/src/app/features/room/MembersDrawer.tsx b/src/app/features/room/MembersDrawer.tsx index 5384484c..8b1f955e 100644 --- a/src/app/features/room/MembersDrawer.tsx +++ b/src/app/features/room/MembersDrawer.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, MouseEventHandler, useCallback, diff --git a/src/app/features/room/Room.tsx b/src/app/features/room/Room.tsx index f9093cf8..ebd7b2aa 100644 --- a/src/app/features/room/Room.tsx +++ b/src/app/features/room/Room.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { Box, Line } from 'folds'; import { useParams } from 'react-router-dom'; import { isKeyHotkey } from 'is-hotkey'; diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx index 379dc4a6..c6234690 100644 --- a/src/app/features/room/RoomInput.tsx +++ b/src/app/features/room/RoomInput.tsx @@ -116,13 +116,6 @@ import { roomToParentsAtom } from '$state/room/roomToParents'; import { nicknamesAtom } from '$state/nicknames'; import { useMediaAuthentication } from '$hooks/useMediaAuthentication'; import { useImagePackRooms } from '$hooks/useImagePackRooms'; -import { usePowerLevelsContext } from '$hooks/usePowerLevels'; -import { useIsDirectRoom } from '$hooks/useRoom'; -import { useAccessiblePowerTagColors, useGetMemberPowerTag } from '$hooks/useMemberPowerTag'; -import { useRoomCreators } from '$hooks/useRoomCreators'; -import { useTheme } from '$hooks/useTheme'; -import { useRoomCreatorsTag } from '$hooks/useRoomCreatorsTag'; -import { usePowerLevelTags } from '$hooks/usePowerLevelTags'; import { useComposingCheck } from '$hooks/useComposingCheck'; import { useSableCosmetics } from '$hooks/useSableCosmetics'; @@ -495,7 +488,7 @@ export const RoomInput = forwardRef( .reverse() .map((fileItem, index) => ( ( @@ -1115,7 +1111,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli const myReaction = reactions.find(factoryEventSentBy(mx.getUserId()!)); if (myReaction && !!(myReaction as any)?.isRelation()) { - mx.redactEvent(room.roomId, (myReaction as any).getId()!); + mx.redactEvent(room.roomId, (myReaction as any).getId()); return; } const rShortcode = diff --git a/src/app/features/room/RoomTombstone.tsx b/src/app/features/room/RoomTombstone.tsx index ef9edfb2..abaf5714 100644 --- a/src/app/features/room/RoomTombstone.tsx +++ b/src/app/features/room/RoomTombstone.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { Box, Button, Spinner, Text, color } from 'folds'; import * as css from './RoomTombstone.css'; diff --git a/src/app/features/room/RoomView.tsx b/src/app/features/room/RoomView.tsx index 0b4c5ee0..fe21af3d 100644 --- a/src/app/features/room/RoomView.tsx +++ b/src/app/features/room/RoomView.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useRef } from 'react'; +import { useCallback, useRef } from 'react'; import { Box, Text, config, toRem } from 'folds'; import { EventType, Room } from '$types/matrix-sdk'; import { ReactEditor } from 'slate-react'; diff --git a/src/app/features/room/RoomViewFollowing.tsx b/src/app/features/room/RoomViewFollowing.tsx index 046d0b54..fa1ab0c5 100644 --- a/src/app/features/room/RoomViewFollowing.tsx +++ b/src/app/features/room/RoomViewFollowing.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Icon, diff --git a/src/app/features/room/RoomViewHeader.tsx b/src/app/features/room/RoomViewHeader.tsx index d87cdec2..f4d9540c 100644 --- a/src/app/features/room/RoomViewHeader.tsx +++ b/src/app/features/room/RoomViewHeader.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, forwardRef, useEffect, useState } from 'react'; +import { MouseEventHandler, forwardRef, useEffect, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { Box, diff --git a/src/app/features/room/RoomViewTyping.tsx b/src/app/features/room/RoomViewTyping.tsx index 188e2ee1..547cfb7a 100644 --- a/src/app/features/room/RoomViewTyping.tsx +++ b/src/app/features/room/RoomViewTyping.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Icon, IconButton, Icons, Text, as } from 'folds'; import { Room } from '$types/matrix-sdk'; import classNames from 'classnames'; diff --git a/src/app/features/room/jump-to-time/JumpToTime.tsx b/src/app/features/room/jump-to-time/JumpToTime.tsx index e6f7201a..5aa99c0c 100644 --- a/src/app/features/room/jump-to-time/JumpToTime.tsx +++ b/src/app/features/room/jump-to-time/JumpToTime.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useMemo, useState } from 'react'; +import { MouseEventHandler, useCallback, useMemo, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { Dialog, diff --git a/src/app/features/room/message/EncryptedContent.tsx b/src/app/features/room/message/EncryptedContent.tsx index 79db79e7..e0084d08 100644 --- a/src/app/features/room/message/EncryptedContent.tsx +++ b/src/app/features/room/message/EncryptedContent.tsx @@ -1,5 +1,5 @@ import { MatrixEvent, MatrixEventEvent, MatrixEventHandlerMap } from '$types/matrix-sdk'; -import React, { ReactNode, useEffect, useState } from 'react'; +import { ReactNode, useEffect, useState } from 'react'; import { MessageEvent } from '$types/matrix/room'; type EncryptedContentProps = { diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index ff7882aa..7601813b 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -24,11 +24,9 @@ import React, { } from 'react'; import FocusTrap from 'focus-trap-react'; import { useHover, useFocusWithin } from 'react-aria'; -import { MatrixEvent, Room } from '$types/matrix-sdk'; -import { Relations } from '$types/matrix-sdk'; +import { MatrixEvent, Room, Relations , RoomPinnedEventsEventContent } from '$types/matrix-sdk'; import classNames from 'classnames'; import { useAtomValue, useSetAtom } from 'jotai'; -import { RoomPinnedEventsEventContent } from '$types/matrix-sdk'; import { AvatarBase, BubbleLayout, @@ -46,11 +44,7 @@ import { nicknamesAtom, setNicknameAtom } from '$state/nicknames'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { useRecentEmoji } from '$hooks/useRecentEmoji'; import * as css from './styles.css'; -import { EventReaders } from '$components/event-readers'; -import { TextViewer } from '$components/text-viewer'; -import { AsyncStatus, useAsyncCallback } from '$hooks/useAsyncCallback'; import { EmojiBoard } from '$components/emoji-board'; -import { ReactionViewer } from '../reaction-viewer'; import { MessageEditor } from './MessageEditor'; import { UserAvatar } from '$components/user-avatar'; import { copyToClipboard } from '$appUtils/dom'; @@ -760,7 +754,7 @@ function MessageInternal( > Nickname setNickDraft(e.target.value)} diff --git a/src/app/features/room/message/MessageEditor.tsx b/src/app/features/room/message/MessageEditor.tsx index d257662a..3c77a698 100644 --- a/src/app/features/room/message/MessageEditor.tsx +++ b/src/app/features/room/message/MessageEditor.tsx @@ -1,4 +1,4 @@ -import React, { +import { KeyboardEventHandler, MouseEventHandler, useCallback, diff --git a/src/app/features/room/message/Reactions.tsx b/src/app/features/room/message/Reactions.tsx index 263cbe8e..7d724e0b 100644 --- a/src/app/features/room/message/Reactions.tsx +++ b/src/app/features/room/message/Reactions.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useState } from 'react'; +import { MouseEventHandler, useCallback, useState } from 'react'; import { Box, Modal, diff --git a/src/app/features/room/reaction-viewer/ReactionViewer.tsx b/src/app/features/room/reaction-viewer/ReactionViewer.tsx index 1cf0319d..1bfd7984 100644 --- a/src/app/features/room/reaction-viewer/ReactionViewer.tsx +++ b/src/app/features/room/reaction-viewer/ReactionViewer.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import classNames from 'classnames'; import { Avatar, @@ -14,8 +14,7 @@ import { as, config, } from 'folds'; -import { MatrixEvent, Room, RoomMember } from '$types/matrix-sdk'; -import { Relations } from '$types/matrix-sdk'; +import { MatrixEvent, Room, RoomMember, Relations } from '$types/matrix-sdk'; import { getMemberDisplayName } from '$appUtils/room'; import { eventWithShortcode, getMxIdLocalPart } from '$appUtils/matrix'; import * as css from './ReactionViewer.css'; diff --git a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx index de1c0f12..37e78506 100644 --- a/src/app/features/room/room-pin-menu/RoomPinMenu.tsx +++ b/src/app/features/room/room-pin-menu/RoomPinMenu.tsx @@ -1,7 +1,6 @@ -/* eslint-disable react/destructuring-assignment */ -import React, { forwardRef, MouseEventHandler, useCallback, useMemo, useRef } from 'react'; -import { MatrixEvent, Room } from '$types/matrix-sdk'; -import { RoomPinnedEventsEventContent } from '$types/matrix-sdk'; + +import { forwardRef, MouseEventHandler, useCallback, useMemo, useRef } from 'react'; +import { MatrixEvent, Room, RoomPinnedEventsEventContent } from '$types/matrix-sdk'; import { Avatar, Box, diff --git a/src/app/features/search/Search.tsx b/src/app/features/search/Search.tsx index a48b4e14..a33bda54 100644 --- a/src/app/features/search/Search.tsx +++ b/src/app/features/search/Search.tsx @@ -15,7 +15,7 @@ import { Text, toRem, } from 'folds'; -import React, { +import { ChangeEventHandler, KeyboardEventHandler, MouseEventHandler, diff --git a/src/app/features/settings/Settings.tsx b/src/app/features/settings/Settings.tsx index 2412c9d8..720d24b7 100644 --- a/src/app/features/settings/Settings.tsx +++ b/src/app/features/settings/Settings.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { Avatar, Box, diff --git a/src/app/features/settings/about/About.tsx b/src/app/features/settings/about/About.tsx index 53d3e1bd..3ae6fdbd 100644 --- a/src/app/features/settings/about/About.tsx +++ b/src/app/features/settings/about/About.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll, Button, config, toRem } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/account/Account.tsx b/src/app/features/settings/account/Account.tsx index 225a9309..c6c3aa8f 100644 --- a/src/app/features/settings/account/Account.tsx +++ b/src/app/features/settings/account/Account.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { MatrixId } from './MatrixId'; diff --git a/src/app/features/settings/account/BioEditor.tsx b/src/app/features/settings/account/BioEditor.tsx index 31d77049..ce83140e 100644 --- a/src/app/features/settings/account/BioEditor.tsx +++ b/src/app/features/settings/account/BioEditor.tsx @@ -1,4 +1,4 @@ -import React, { KeyboardEventHandler, useCallback, useEffect, useState, useRef } from 'react'; +import { KeyboardEventHandler, useCallback, useEffect, useState, useRef } from 'react'; import { Box, Chip, diff --git a/src/app/features/settings/account/ContactInfo.tsx b/src/app/features/settings/account/ContactInfo.tsx index d62ed168..b34faa0d 100644 --- a/src/app/features/settings/account/ContactInfo.tsx +++ b/src/app/features/settings/account/ContactInfo.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react'; +import { useCallback, useEffect } from 'react'; import { Box, Text, Chip } from 'folds'; import { SequenceCard } from '$components/sequence-card'; import { SequenceCardStyle } from '../styles.css'; diff --git a/src/app/features/settings/account/IgnoredUserList.tsx b/src/app/features/settings/account/IgnoredUserList.tsx index 9fc2bb5e..75395f96 100644 --- a/src/app/features/settings/account/IgnoredUserList.tsx +++ b/src/app/features/settings/account/IgnoredUserList.tsx @@ -1,4 +1,4 @@ -import React, { ChangeEventHandler, FormEventHandler, useCallback, useState } from 'react'; +import { ChangeEventHandler, FormEventHandler, useCallback, useState } from 'react'; import { Box, Button, Chip, Icon, IconButton, Icons, Input, Spinner, Text, config } from 'folds'; import { SequenceCard } from '$components/sequence-card'; import { SequenceCardStyle } from '../styles.css'; diff --git a/src/app/features/settings/account/MatrixId.tsx b/src/app/features/settings/account/MatrixId.tsx index a019ef3f..a7f1c008 100644 --- a/src/app/features/settings/account/MatrixId.tsx +++ b/src/app/features/settings/account/MatrixId.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Text, Chip } from 'folds'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/account/NameColorEditor.tsx b/src/app/features/settings/account/NameColorEditor.tsx index 4f3da4fc..1bfa060c 100644 --- a/src/app/features/settings/account/NameColorEditor.tsx +++ b/src/app/features/settings/account/NameColorEditor.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import { Box, Button, config, Text, Input, IconButton, Icon, Icons } from 'folds'; import { HexColorPicker } from 'react-colorful'; import { SettingTile } from '$components/setting-tile'; diff --git a/src/app/features/settings/account/Profile.tsx b/src/app/features/settings/account/Profile.tsx index 249ddafa..9be959e4 100644 --- a/src/app/features/settings/account/Profile.tsx +++ b/src/app/features/settings/account/Profile.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, FormEventHandler, useCallback, diff --git a/src/app/features/settings/account/PronounEditor.tsx b/src/app/features/settings/account/PronounEditor.tsx index 8cab2db2..0f5f8bc4 100644 --- a/src/app/features/settings/account/PronounEditor.tsx +++ b/src/app/features/settings/account/PronounEditor.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect, ChangeEvent } from 'react'; +import { useState, useEffect, ChangeEvent } from 'react'; import { Input } from 'folds'; import { SettingTile } from '$components/setting-tile'; diff --git a/src/app/features/settings/account/TimezoneEditor.tsx b/src/app/features/settings/account/TimezoneEditor.tsx index e17b0516..7f85c974 100644 --- a/src/app/features/settings/account/TimezoneEditor.tsx +++ b/src/app/features/settings/account/TimezoneEditor.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState, useEffect, ChangeEvent } from 'react'; +import { useMemo, useState, useEffect, ChangeEvent } from 'react'; import { Box, IconButton, Icon, Icons, Input } from 'folds'; import { SettingTile } from '$components/setting-tile'; diff --git a/src/app/features/settings/cosmetics/Cosmetics.tsx b/src/app/features/settings/cosmetics/Cosmetics.tsx index bdd54d35..bf6cbdb3 100644 --- a/src/app/features/settings/cosmetics/Cosmetics.tsx +++ b/src/app/features/settings/cosmetics/Cosmetics.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useState } from 'react'; +import { MouseEventHandler, useState } from 'react'; import { Box, Button, diff --git a/src/app/features/settings/cosmetics/Themes.tsx b/src/app/features/settings/cosmetics/Themes.tsx index ae1a1118..814045aa 100644 --- a/src/app/features/settings/cosmetics/Themes.tsx +++ b/src/app/features/settings/cosmetics/Themes.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, KeyboardEventHandler, MouseEventHandler, diff --git a/src/app/features/settings/developer-tools/AccountData.tsx b/src/app/features/settings/developer-tools/AccountData.tsx index 2aedcc98..5bc06b3c 100644 --- a/src/app/features/settings/developer-tools/AccountData.tsx +++ b/src/app/features/settings/developer-tools/AccountData.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { Box, Text, Icon, Icons, Button, MenuItem } from 'folds'; import { SequenceCard } from '$components/sequence-card'; import { SequenceCardStyle } from '../styles.css'; @@ -17,14 +17,14 @@ export function AccountData({ expand, onExpandToggle, onSelect }: AccountDataPro const [accountDataTypes, setAccountDataKeys] = useState( () => // TODO: tighten this once account data event typing is standardized. - Array.from(mx.store.accountData.keys()) as string[] + Array.from(mx.store.accountData.keys()) ); useAccountDataCallback( mx, useCallback(() => { // TODO: tighten this once account data event typing is standardized. - setAccountDataKeys(Array.from(mx.store.accountData.keys()) as string[]); + setAccountDataKeys(Array.from(mx.store.accountData.keys())); }, [mx]) ); diff --git a/src/app/features/settings/developer-tools/DevelopTools.tsx b/src/app/features/settings/developer-tools/DevelopTools.tsx index e7b14db3..c81172d3 100644 --- a/src/app/features/settings/developer-tools/DevelopTools.tsx +++ b/src/app/features/settings/developer-tools/DevelopTools.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll, Switch, Button } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/devices/DeviceTile.tsx b/src/app/features/settings/devices/DeviceTile.tsx index 5e78f1cb..42631fa3 100644 --- a/src/app/features/settings/devices/DeviceTile.tsx +++ b/src/app/features/settings/devices/DeviceTile.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, ReactNode, useCallback, useEffect, useState } from 'react'; +import { FormEventHandler, ReactNode, useCallback, useEffect, useState } from 'react'; import { Box, Text, @@ -15,9 +15,8 @@ import { OverlayBackdrop, OverlayCenter, } from 'folds'; -import { CryptoApi } from '$types/matrix-sdk'; +import { CryptoApi, IMyDevice, MatrixError } from '$types/matrix-sdk'; import FocusTrap from 'focus-trap-react'; -import { IMyDevice, MatrixError } from '$types/matrix-sdk'; import { SettingTile } from '$components/setting-tile'; import { useMatrixClient } from '$hooks/useMatrixClient'; import { timeDayMonYear, timeHourMinute, today, yesterday } from '$appUtils/time'; diff --git a/src/app/features/settings/devices/Devices.tsx b/src/app/features/settings/devices/Devices.tsx index cce0322c..3d8ac109 100644 --- a/src/app/features/settings/devices/Devices.tsx +++ b/src/app/features/settings/devices/Devices.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/devices/LocalBackup.tsx b/src/app/features/settings/devices/LocalBackup.tsx index b797a91f..eb05777c 100644 --- a/src/app/features/settings/devices/LocalBackup.tsx +++ b/src/app/features/settings/devices/LocalBackup.tsx @@ -1,4 +1,4 @@ -import React, { FormEventHandler, useCallback, useEffect, useState } from 'react'; +import { FormEventHandler, useCallback, useEffect, useState } from 'react'; import { Box, Button, color, Icon, Icons, Spinner, Text, toRem } from 'folds'; import FileSaver from 'file-saver'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/devices/OtherDevices.tsx b/src/app/features/settings/devices/OtherDevices.tsx index e570575d..ec61a84e 100644 --- a/src/app/features/settings/devices/OtherDevices.tsx +++ b/src/app/features/settings/devices/OtherDevices.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { Box, Button, config, Menu, Spinner, Text } from 'folds'; import { AuthDict, IMyDevice, MatrixError } from '$types/matrix-sdk'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/devices/Verification.tsx b/src/app/features/settings/devices/Verification.tsx index ac9c5af1..adea4d61 100644 --- a/src/app/features/settings/devices/Verification.tsx +++ b/src/app/features/settings/devices/Verification.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useState } from 'react'; +import { MouseEventHandler, useCallback, useState } from 'react'; import { Badge, Box, diff --git a/src/app/features/settings/emojis-stickers/EmojisStickers.tsx b/src/app/features/settings/emojis-stickers/EmojisStickers.tsx index 60557f99..482945f3 100644 --- a/src/app/features/settings/emojis-stickers/EmojisStickers.tsx +++ b/src/app/features/settings/emojis-stickers/EmojisStickers.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { GlobalPacks } from './GlobalPacks'; diff --git a/src/app/features/settings/emojis-stickers/GlobalPacks.tsx b/src/app/features/settings/emojis-stickers/GlobalPacks.tsx index 2864adcf..0d34477a 100644 --- a/src/app/features/settings/emojis-stickers/GlobalPacks.tsx +++ b/src/app/features/settings/emojis-stickers/GlobalPacks.tsx @@ -1,4 +1,4 @@ -import React, { MouseEventHandler, useCallback, useEffect, useMemo, useState } from 'react'; +import { MouseEventHandler, useCallback, useEffect, useMemo, useState } from 'react'; import { Box, Text, diff --git a/src/app/features/settings/emojis-stickers/UserPack.tsx b/src/app/features/settings/emojis-stickers/UserPack.tsx index 1ed91917..50673df0 100644 --- a/src/app/features/settings/emojis-stickers/UserPack.tsx +++ b/src/app/features/settings/emojis-stickers/UserPack.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Avatar, AvatarFallback, AvatarImage, Box, Button, Icon, Icons, Text } from 'folds'; import { useUserImagePack } from '$hooks/useImagePacks'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/settings/general/General.tsx b/src/app/features/settings/general/General.tsx index fc78c8cf..84d0c039 100644 --- a/src/app/features/settings/general/General.tsx +++ b/src/app/features/settings/general/General.tsx @@ -1,4 +1,4 @@ -import React, { +import { ChangeEventHandler, FormEventHandler, MouseEventHandler, diff --git a/src/app/features/settings/notifications/AllMessages.tsx b/src/app/features/settings/notifications/AllMessages.tsx index 73276440..ed22fa60 100644 --- a/src/app/features/settings/notifications/AllMessages.tsx +++ b/src/app/features/settings/notifications/AllMessages.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { Badge, Box, Text } from 'folds'; import { ConditionKind, diff --git a/src/app/features/settings/notifications/KeywordMessages.tsx b/src/app/features/settings/notifications/KeywordMessages.tsx index 5c649933..bb8c22b8 100644 --- a/src/app/features/settings/notifications/KeywordMessages.tsx +++ b/src/app/features/settings/notifications/KeywordMessages.tsx @@ -1,4 +1,4 @@ -import React, { ChangeEventHandler, FormEventHandler, useCallback, useMemo, useState } from 'react'; +import { ChangeEventHandler, FormEventHandler, useCallback, useMemo, useState } from 'react'; import { IPushRule, IPushRules, PushRuleKind } from '$types/matrix-sdk'; import { Box, Text, Badge, Button, Input, config, IconButton, Icons, Icon, Spinner } from 'folds'; import { useAccountData } from '$hooks/useAccountData'; diff --git a/src/app/features/settings/notifications/NotificationModeSwitcher.tsx b/src/app/features/settings/notifications/NotificationModeSwitcher.tsx index 18a24adc..e9a7e182 100644 --- a/src/app/features/settings/notifications/NotificationModeSwitcher.tsx +++ b/src/app/features/settings/notifications/NotificationModeSwitcher.tsx @@ -12,7 +12,7 @@ import { Text, } from 'folds'; import { IPushRule } from '$types/matrix-sdk'; -import React, { MouseEventHandler, useMemo, useState } from 'react'; +import { MouseEventHandler, useMemo, useState } from 'react'; import FocusTrap from 'focus-trap-react'; import { NotificationMode, useNotificationActionsMode } from '$hooks/useNotificationMode'; import { stopPropagation } from '$appUtils/keyboard'; diff --git a/src/app/features/settings/notifications/Notifications.tsx b/src/app/features/settings/notifications/Notifications.tsx index 66220cd5..d939fda1 100644 --- a/src/app/features/settings/notifications/Notifications.tsx +++ b/src/app/features/settings/notifications/Notifications.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Text, IconButton, Icon, Icons, Scroll } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { SystemNotification } from './SystemNotification'; diff --git a/src/app/features/settings/notifications/SpecialMessages.tsx b/src/app/features/settings/notifications/SpecialMessages.tsx index 1a94f5c4..11d25354 100644 --- a/src/app/features/settings/notifications/SpecialMessages.tsx +++ b/src/app/features/settings/notifications/SpecialMessages.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useMemo } from 'react'; +import { useCallback, useMemo } from 'react'; import { ConditionKind, IPushRules, PushRuleKind, RuleId } from '$types/matrix-sdk'; import { Box, Text, Badge } from 'folds'; import { useAccountData } from '$hooks/useAccountData'; diff --git a/src/app/features/settings/notifications/SystemNotification.tsx b/src/app/features/settings/notifications/SystemNotification.tsx index a28c7878..97679777 100644 --- a/src/app/features/settings/notifications/SystemNotification.tsx +++ b/src/app/features/settings/notifications/SystemNotification.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import { useCallback } from 'react'; import { Box, Text, Switch, Button, color, Spinner } from 'folds'; import { IPusherRequest } from '$types/matrix-sdk'; import { SequenceCard } from '$components/sequence-card'; diff --git a/src/app/features/space-settings/SpaceSettings.tsx b/src/app/features/space-settings/SpaceSettings.tsx index a116cd61..43e55526 100644 --- a/src/app/features/space-settings/SpaceSettings.tsx +++ b/src/app/features/space-settings/SpaceSettings.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { useAtomValue } from 'jotai'; import { Avatar, Box, config, Icon, IconButton, Icons, IconSrc, MenuItem, Text } from 'folds'; import { JoinRule } from '$types/matrix-sdk'; diff --git a/src/app/features/space-settings/SpaceSettingsRenderer.tsx b/src/app/features/space-settings/SpaceSettingsRenderer.tsx index 31289dd4..6431f0a0 100644 --- a/src/app/features/space-settings/SpaceSettingsRenderer.tsx +++ b/src/app/features/space-settings/SpaceSettingsRenderer.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { SpaceSettings } from './SpaceSettings'; import { Modal500 } from '$components/Modal500'; import { useCloseSpaceSettings, useSpaceSettingsState } from '$state/hooks/spaceSettings'; diff --git a/src/app/features/space-settings/general/General.tsx b/src/app/features/space-settings/general/General.tsx index 2c305fe3..8cee28c6 100644 --- a/src/app/features/space-settings/general/General.tsx +++ b/src/app/features/space-settings/general/General.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { usePowerLevels } from '$hooks/usePowerLevels'; diff --git a/src/app/features/space-settings/permissions/Permissions.tsx b/src/app/features/space-settings/permissions/Permissions.tsx index 33817cb0..388212a6 100644 --- a/src/app/features/space-settings/permissions/Permissions.tsx +++ b/src/app/features/space-settings/permissions/Permissions.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; import { Page, PageContent, PageHeader } from '$components/page'; import { useRoom } from '$hooks/useRoom'; diff --git a/src/app/features/widgets/GenericWidgetDriver.ts b/src/app/features/widgets/GenericWidgetDriver.ts index a26e1c73..21819a18 100644 --- a/src/app/features/widgets/GenericWidgetDriver.ts +++ b/src/app/features/widgets/GenericWidgetDriver.ts @@ -93,7 +93,7 @@ export class GenericWidgetDriver extends WidgetDriver { content as TimelineEvents[keyof TimelineEvents] ); } - return { roomId, eventId: r!.event_id }; + return { roomId, eventId: r.event_id }; } public async sendDelayedEvent( diff --git a/src/app/features/widgets/IntegrationManager.tsx b/src/app/features/widgets/IntegrationManager.tsx index abe056df..3c22783b 100644 --- a/src/app/features/widgets/IntegrationManager.tsx +++ b/src/app/features/widgets/IntegrationManager.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { Box, Header, diff --git a/src/app/features/widgets/WidgetIframe.tsx b/src/app/features/widgets/WidgetIframe.tsx index 7f6c589a..bd6c6f58 100644 --- a/src/app/features/widgets/WidgetIframe.tsx +++ b/src/app/features/widgets/WidgetIframe.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { ClientWidgetApi, IWidget, IRoomEvent, Widget, WidgetKind } from 'matrix-widget-api'; import { ClientEvent, @@ -129,7 +129,7 @@ export function WidgetIframe({ widget, roomId, mx, onCapabilityRequest }: Widget messagingRef.current = null; setReady(false); }; - }, [widget.id, roomId, mx]); // eslint-disable-line react-hooks/exhaustive-deps + }, [widget.id, roomId, mx]); return (