1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-30 04:23:07 +03:00

Update typescript-eslint monorepo to v8.17.0 (#4581)

* Update typescript-eslint monorepo to v8.17.0

* Fix lint errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2024-12-12 17:45:39 +00:00
committed by GitHub
parent a0502c5ee5
commit 315e81b7de
7 changed files with 83 additions and 38 deletions

View File

@ -3168,7 +3168,7 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("crypto (%s)", (backend: string,
fetchMock.put( fetchMock.put(
"path:/_matrix/client/v3/room_keys/keys", "path:/_matrix/client/v3/room_keys/keys",
(url, request) => { (url, request) => {
const uploadPayload: KeyBackup = JSON.parse(request.body?.toString() ?? "{}"); const uploadPayload: KeyBackup = JSON.parse((request.body as string) ?? "{}");
resolve(uploadPayload); resolve(uploadPayload);
return { return {
status: 200, status: 200,
@ -3235,7 +3235,7 @@ describe.each(Object.entries(CRYPTO_BACKENDS))("crypto (%s)", (backend: string,
fetchMock.post( fetchMock.post(
"path:/_matrix/client/v3/room_keys/version", "path:/_matrix/client/v3/room_keys/version",
(url, request) => { (url, request) => {
const backupData: KeyBackupInfo = JSON.parse(request.body?.toString() ?? "{}"); const backupData: KeyBackupInfo = JSON.parse((request.body as string) ?? "{}");
backupData.version = newVersion; backupData.version = newVersion;
backupData.count = 0; backupData.count = 0;
backupData.etag = "zer"; backupData.etag = "zer";

View File

@ -91,7 +91,7 @@ function mockUploadEmitter(
}, },
}; };
} }
const uploadPayload: KeyBackup = JSON.parse(request.body?.toString() ?? "{}"); const uploadPayload: KeyBackup = JSON.parse((request.body as string) ?? "{}");
let count = 0; let count = 0;
for (const [roomId, value] of Object.entries(uploadPayload.rooms)) { for (const [roomId, value] of Object.entries(uploadPayload.rooms)) {
for (const sessionId of Object.keys(value.sessions)) { for (const sessionId of Object.keys(value.sessions)) {

View File

@ -88,7 +88,7 @@ export function mockSetupMegolmBackupRequests(backupVersion: string): void {
}); });
fetchMock.post("path:/_matrix/client/v3/room_keys/version", (url, request) => { fetchMock.post("path:/_matrix/client/v3/room_keys/version", (url, request) => {
const backupData: KeyBackupInfo = JSON.parse(request.body?.toString() ?? "{}"); const backupData: KeyBackupInfo = JSON.parse((request.body as string) ?? "{}");
backupData.version = backupVersion; backupData.version = backupVersion;
backupData.count = 0; backupData.count = 0;
backupData.etag = "zer"; backupData.etag = "zer";

View File

@ -5065,7 +5065,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
if (this.canSupport.get(Feature.RelationBasedRedactions) === ServerSupport.Unsupported) { if (this.canSupport.get(Feature.RelationBasedRedactions) === ServerSupport.Unsupported) {
throw new Error( throw new Error(
"Server does not support relation based redactions " + "Server does not support relation based redactions " +
`roomId ${roomId} eventId ${eventId} txnId: ${txnId} threadId ${threadId}`, `roomId ${roomId} eventId ${eventId} txnId: ${txnId as string} threadId ${threadId}`,
); );
} }

View File

@ -776,7 +776,7 @@ export class Backend implements CryptoStore {
ev.preventDefault(); ev.preventDefault();
logger.log("Ignoring duplicate inbound group session: " + senderCurve25519Key + " / " + sessionId); logger.log("Ignoring duplicate inbound group session: " + senderCurve25519Key + " / " + sessionId);
} else { } else {
abortWithException(txn, new Error("Failed to add inbound group session: " + addReq.error)); abortWithException(txn, new Error("Failed to add inbound group session: " + addReq.error?.name));
} }
}; };
} }

View File

@ -71,7 +71,7 @@ function selectQuery<T>(
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const results: T[] = []; const results: T[] = [];
query.onerror = (): void => { query.onerror = (): void => {
reject(new Error("Query failed: " + query.error)); reject(new Error("Query failed: " + query.error?.name));
}; };
// collect results // collect results
query.onsuccess = (): void => { query.onsuccess = (): void => {
@ -360,7 +360,7 @@ export class LocalIndexedDBStoreBackend implements IIndexedDBBackend {
// in firefox, with indexedDB disabled, this fails with a // in firefox, with indexedDB disabled, this fails with a
// DOMError. We treat this as non-fatal, so that we can still // DOMError. We treat this as non-fatal, so that we can still
// use the app. // use the app.
logger.warn(`unable to delete js-sdk store indexeddb: ${req.error}`); logger.warn(`unable to delete js-sdk store indexeddb: ${req.error?.name}`);
resolve(); resolve();
}; };

105
yarn.lock
View File

@ -1857,29 +1857,29 @@
"@types/yargs-parser" "*" "@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@^8.0.0": "@typescript-eslint/eslint-plugin@^8.0.0":
version "8.16.0" version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.16.0.tgz#ac56825bcdf3b392fc76a94b1315d4a162f201a6" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz#0901933326aea4443b81df3f740ca7dfc45c7bea"
integrity sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q== integrity sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==
dependencies: dependencies:
"@eslint-community/regexpp" "^4.10.0" "@eslint-community/regexpp" "^4.10.0"
"@typescript-eslint/scope-manager" "8.16.0" "@typescript-eslint/scope-manager" "8.18.0"
"@typescript-eslint/type-utils" "8.16.0" "@typescript-eslint/type-utils" "8.18.0"
"@typescript-eslint/utils" "8.16.0" "@typescript-eslint/utils" "8.18.0"
"@typescript-eslint/visitor-keys" "8.16.0" "@typescript-eslint/visitor-keys" "8.18.0"
graphemer "^1.4.0" graphemer "^1.4.0"
ignore "^5.3.1" ignore "^5.3.1"
natural-compare "^1.4.0" natural-compare "^1.4.0"
ts-api-utils "^1.3.0" ts-api-utils "^1.3.0"
"@typescript-eslint/parser@^8.0.0": "@typescript-eslint/parser@^8.0.0":
version "8.16.0" version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.16.0.tgz#ee5b2d6241c1ab3e2e53f03fd5a32d8e266d8e06" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.18.0.tgz#a1c9456cbb6a089730bf1d3fc47946c5fb5fe67b"
integrity sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w== integrity sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==
dependencies: dependencies:
"@typescript-eslint/scope-manager" "8.16.0" "@typescript-eslint/scope-manager" "8.18.0"
"@typescript-eslint/types" "8.16.0" "@typescript-eslint/types" "8.18.0"
"@typescript-eslint/typescript-estree" "8.16.0" "@typescript-eslint/typescript-estree" "8.18.0"
"@typescript-eslint/visitor-keys" "8.16.0" "@typescript-eslint/visitor-keys" "8.18.0"
debug "^4.3.4" debug "^4.3.4"
"@typescript-eslint/scope-manager@8.14.0": "@typescript-eslint/scope-manager@8.14.0":
@ -1898,13 +1898,21 @@
"@typescript-eslint/types" "8.16.0" "@typescript-eslint/types" "8.16.0"
"@typescript-eslint/visitor-keys" "8.16.0" "@typescript-eslint/visitor-keys" "8.16.0"
"@typescript-eslint/type-utils@8.16.0": "@typescript-eslint/scope-manager@8.18.0":
version "8.16.0" version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.16.0.tgz#585388735f7ac390f07c885845c3d185d1b64740" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz#30b040cb4557804a7e2bcc65cf8fdb630c96546f"
integrity sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg== integrity sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==
dependencies: dependencies:
"@typescript-eslint/typescript-estree" "8.16.0" "@typescript-eslint/types" "8.18.0"
"@typescript-eslint/utils" "8.16.0" "@typescript-eslint/visitor-keys" "8.18.0"
"@typescript-eslint/type-utils@8.18.0":
version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz#6f0d12cf923b6fd95ae4d877708c0adaad93c471"
integrity sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==
dependencies:
"@typescript-eslint/typescript-estree" "8.18.0"
"@typescript-eslint/utils" "8.18.0"
debug "^4.3.4" debug "^4.3.4"
ts-api-utils "^1.3.0" ts-api-utils "^1.3.0"
@ -1918,6 +1926,11 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.16.0.tgz#49c92ae1b57942458ab83d9ec7ccab3005e64737"
integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ== integrity sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==
"@typescript-eslint/types@8.18.0":
version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.18.0.tgz#3afcd30def8756bc78541268ea819a043221d5f3"
integrity sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==
"@typescript-eslint/typescript-estree@8.14.0": "@typescript-eslint/typescript-estree@8.14.0":
version "8.14.0" version "8.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz#a7a3a5a53a6c09313e12fb4531d4ff582ee3c312" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.14.0.tgz#a7a3a5a53a6c09313e12fb4531d4ff582ee3c312"
@ -1946,15 +1959,29 @@
semver "^7.6.0" semver "^7.6.0"
ts-api-utils "^1.3.0" ts-api-utils "^1.3.0"
"@typescript-eslint/utils@8.16.0", "@typescript-eslint/utils@^8.13.0": "@typescript-eslint/typescript-estree@8.18.0":
version "8.16.0" version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz#d8ca785799fbb9c700cdff1a79c046c3e633c7f9"
integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA== integrity sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==
dependencies:
"@typescript-eslint/types" "8.18.0"
"@typescript-eslint/visitor-keys" "8.18.0"
debug "^4.3.4"
fast-glob "^3.3.2"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^1.3.0"
"@typescript-eslint/utils@8.18.0":
version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.18.0.tgz#48f67205d42b65d895797bb7349d1be5c39a62f7"
integrity sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==
dependencies: dependencies:
"@eslint-community/eslint-utils" "^4.4.0" "@eslint-community/eslint-utils" "^4.4.0"
"@typescript-eslint/scope-manager" "8.16.0" "@typescript-eslint/scope-manager" "8.18.0"
"@typescript-eslint/types" "8.16.0" "@typescript-eslint/types" "8.18.0"
"@typescript-eslint/typescript-estree" "8.16.0" "@typescript-eslint/typescript-estree" "8.18.0"
"@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0":
version "8.14.0" version "8.14.0"
@ -1966,6 +1993,16 @@
"@typescript-eslint/types" "8.14.0" "@typescript-eslint/types" "8.14.0"
"@typescript-eslint/typescript-estree" "8.14.0" "@typescript-eslint/typescript-estree" "8.14.0"
"@typescript-eslint/utils@^8.13.0":
version "8.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.16.0.tgz#c71264c437157feaa97842809836254a6fc833c3"
integrity sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@typescript-eslint/scope-manager" "8.16.0"
"@typescript-eslint/types" "8.16.0"
"@typescript-eslint/typescript-estree" "8.16.0"
"@typescript-eslint/visitor-keys@8.14.0": "@typescript-eslint/visitor-keys@8.14.0":
version "8.14.0" version "8.14.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz#2418d5a54669af9658986ade4e6cfb7767d815ad" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.14.0.tgz#2418d5a54669af9658986ade4e6cfb7767d815ad"
@ -1982,6 +2019,14 @@
"@typescript-eslint/types" "8.16.0" "@typescript-eslint/types" "8.16.0"
eslint-visitor-keys "^4.2.0" eslint-visitor-keys "^4.2.0"
"@typescript-eslint/visitor-keys@8.18.0":
version "8.18.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz#7b6d33534fa808e33a19951907231ad2ea5c36dd"
integrity sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==
dependencies:
"@typescript-eslint/types" "8.18.0"
eslint-visitor-keys "^4.2.0"
"@ungap/structured-clone@^1.2.0": "@ungap/structured-clone@^1.2.0":
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
@ -6083,9 +6128,9 @@ tr46@~0.0.3:
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
ts-api-utils@^1.3.0: ts-api-utils@^1.3.0:
version "1.4.2" version "1.4.3"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.2.tgz#a6a6dff26117ac7965624fc118525971edc6a82a" resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064"
integrity sha512-ZF5gQIQa/UmzfvxbHZI3JXN0/Jt+vnAfAviNRAMc491laiK6YCLpCW9ft8oaCRFOTxCZtUTE6XB0ZQAe3olntw== integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==
ts-node@^10.9.2: ts-node@^10.9.2:
version "10.9.2" version "10.9.2"