1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[deps] SM: Update typescript-eslint monorepo to v8 (major) (#10601)

* [deps] SM: Update typescript-eslint monorepo to v8

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Hinton <hinton@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-01-14 11:23:59 -05:00
committed by GitHub
parent e568a7a812
commit 62e879940c
103 changed files with 355 additions and 106 deletions

View File

@@ -397,6 +397,8 @@ export class LoginComponentV1 extends CaptchaProtectedComponent implements OnIni
email,
deviceIdentifier,
);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.showLoginWithDevice = false;
}

View File

@@ -192,6 +192,8 @@ export class AttachmentsComponent implements OnInit {
title: null,
message: this.i18nService.t("fileSavedToDevice"),
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
}
@@ -285,6 +287,8 @@ export class AttachmentsComponent implements OnInit {
this.i18nService.t("attachmentSaved"),
);
this.onReuploadedAttachment.emit();
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
}

View File

@@ -466,6 +466,8 @@ export class ViewComponent implements OnDestroy, OnInit {
fileName: attachment.fileName,
blobData: decBuf,
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
}

View File

@@ -107,6 +107,8 @@ export class LoginDecryptionOptionsComponent implements OnInit {
private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,
private validationService: ValidationService,
) {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
this.clientType === this.platformUtilsService.getClientType();
}

View File

@@ -484,6 +484,8 @@ export class LoginComponent implements OnInit, OnDestroy {
try {
const deviceIdentifier = await this.appIdService.getAppId();
this.isKnownDevice = await this.devicesApiService.getKnownDevice(email, deviceIdentifier);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.isKnownDevice = false;
}

View File

@@ -18,6 +18,8 @@ export function decodeJwtTokenToJson(jwtToken: string): any {
try {
// Attempt to decode from URL-safe Base64 to UTF-8
decodedPayloadJSON = Utils.fromUrlB64ToUtf8(encodedPayload);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (decodingError) {
throw new Error("Cannot decode the token");
}
@@ -26,6 +28,8 @@ export function decodeJwtTokenToJson(jwtToken: string): any {
// Attempt to parse the JSON payload
const decodedToken = JSON.parse(decodedPayloadJSON);
return decodedToken;
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (jsonError) {
throw new Error("Cannot parse the token's payload into JSON");
}

View File

@@ -337,6 +337,8 @@ export class DeviceTrustService implements DeviceTrustServiceAbstraction {
);
return new SymmetricCryptoKey(userKey) as UserKey;
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// If either decryption effort fails, we want to remove the device key
this.logService.error("Failed to decrypt using device key. Removing device key.");

View File

@@ -163,6 +163,8 @@ export class UserVerificationService implements UserVerificationServiceAbstracti
const request = new VerifyOTPRequest(verification.secret);
try {
await this.userVerificationApiService.postAccountVerifyOTP(request);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
throw new Error(this.i18nService.t("invalidVerificationCode"));
}
@@ -221,6 +223,8 @@ export class UserVerificationService implements UserVerificationServiceAbstracti
request.masterPasswordHash = serverKeyHash;
try {
policyOptions = await this.userVerificationApiService.postAccountVerifyPassword(request);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
throw new Error(this.i18nService.t("invalidMasterPassword"));
}

View File

@@ -1,14 +1,12 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type SharedFlags = {
sdk?: boolean;
prereleaseBuild?: boolean;
};
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type SharedDevFlags = {
noopNotifications: boolean;
skipWelcomeOnInstall: boolean;

View File

@@ -14,6 +14,8 @@ import { KeyService } from "../../../../key-management/src/abstractions/key.serv
import { EncryptService } from "../abstractions/encrypt.service";
import { I18nService } from "../abstractions/i18n.service";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
const nodeURL = typeof self === "undefined" ? require("url") : null;
declare global {
@@ -610,6 +612,8 @@ export class Utils {
}
return new URL(uriString);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// Ignore error
}

View File

@@ -67,9 +67,13 @@ describe("DomainBase", () => {
);
// @ts-expect-error -- encString2 was not decrypted
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
decrypted as { encToString: string; encString2: string; plainText: string };
// encString2 was not decrypted, so it's still an EncString
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
decrypted as { encToString: string; encString2: EncString; plainText: string };
});

View File

@@ -8,7 +8,7 @@ import { EncryptService } from "../../abstractions/encrypt.service";
import { EncString } from "./enc-string";
import { SymmetricCryptoKey } from "./symmetric-crypto-key";
// eslint-disable-next-line @typescript-eslint/ban-types
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
type EncStringKeys<T> = ConditionalKeys<ConditionalExcept<T, Function>, EncString>;
export type DecryptedObject<
TEncryptedObject,

View File

@@ -125,6 +125,8 @@ export class EncString implements Encrypted {
try {
encType = parseInt(headerPieces[0], null);
encPieces = headerPieces[1].split("|");
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return { encType: NaN, encPieces: [] };
}
@@ -186,6 +188,8 @@ export class EncString implements Encrypted {
key,
decryptTrace == null ? context : `${decryptTrace}${context || ""}`,
);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.decryptedValue = DECRYPT_ERROR;
}
@@ -203,6 +207,8 @@ export class EncString implements Encrypted {
}
this.decryptedValue = await encryptService.decryptToUtf8(this, key, decryptTrace);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.decryptedValue = DECRYPT_ERROR;
}

View File

@@ -3,6 +3,8 @@
import { StateDefinitionLike, MigrationHelper } from "../migration-helper";
import { Migrator } from "../migrator";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const AutofillOverlayVisibility = {
Off: 0,
OnButtonClick: 1,

View File

@@ -3,6 +3,8 @@
import { StateDefinitionLike, MigrationHelper } from "../migration-helper";
import { Migrator } from "../migrator";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const ClearClipboardDelay = {
Never: null as null,
TenSeconds: 10,

View File

@@ -3,6 +3,8 @@
import { KeyDefinitionLike, MigrationHelper } from "../migration-helper";
import { Migrator } from "../migrator";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const UriMatchStrategy = {
Domain: 0,
Host: 1,

View File

@@ -81,6 +81,8 @@ export class Send extends Domain {
const sendKeyEncryptionKey = await keyService.getUserKey();
model.key = await encryptService.decryptToBytes(this.key, sendKeyEncryptionKey);
model.cryptoKey = await keyService.makeSendKey(model.key);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// TODO: error?
}

View File

@@ -53,6 +53,8 @@ export function buildCipherIcon(iconsServerUrl: string, cipher: CipherView, show
try {
image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;
fallbackImage = "images/bwi-globe.png";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// Ignore error since the fallback icon will be shown if image is null.
}

View File

@@ -69,6 +69,8 @@ export class Attachment extends Domain {
const encryptService = Utils.getContainerService().getEncryptService();
const decValue = await encryptService.decryptToBytes(this.key, encKey);
return new SymmetricCryptoKey(decValue);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// TODO: error?
}

View File

@@ -155,6 +155,8 @@ export class CipherView implements View, InitializerMetadata {
return null;
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const item = this.item;
return this.item[linkedFieldOption.propertyKey as keyof typeof item];
}

View File

@@ -142,6 +142,8 @@ export class LoginUriView implements View {
try {
const regex = new RegExp(this.uri, "i");
return regex.test(targetUri);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// Invalid regex
return false;

View File

@@ -86,6 +86,8 @@ export class A11yGridDirective implements AfterViewInit {
});
this.getActiveCellContent().tabIndex = 0;
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
// eslint-disable-next-line no-console
console.error("Unable to initialize grid");

View File

@@ -70,6 +70,8 @@ export class NavGroupComponent extends NavBaseComponent implements AfterContentI
setOpen(isOpen: boolean) {
this.open = isOpen;
this.openChange.emit(this.open);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
this.open && this.parentNavGroup?.setOpen(this.open);
}

View File

@@ -267,7 +267,7 @@ describe("ImportService", () => {
function createCipher(options: Partial<CipherView> = {}) {
const cipher = new CipherView();
cipher.name;
cipher.name = options.name;
cipher.type = options.type;
cipher.folderId = options.folderId;
cipher.collectionIds = options.collectionIds;

View File

@@ -683,6 +683,8 @@ export class DefaultKeyService implements KeyServiceAbstraction {
// failed to decrypt
return false;
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return false;
}

View File

@@ -1,5 +1,5 @@
/* eslint-env node */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
const { defaultTransformerOptions } = require("jest-preset-angular/presets");
/** @type {import('jest').Config} */

View File

@@ -38,6 +38,8 @@ describe("AddEditCustomFieldDialogComponent", () => {
fixture = TestBed.createComponent(AddEditCustomFieldDialogComponent);
component = fixture.componentInstance;
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
fixture.detectChanges;
});

View File

@@ -98,6 +98,8 @@ export class DownloadAttachmentComponent {
fileName: this.attachment.fileName,
blobData: decBuf,
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.toastService.showToast({
variant: "error",