1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 10:13:31 +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

@@ -1,4 +1,4 @@
/* eslint-disable no-undef */
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
};

View File

@@ -453,12 +453,16 @@ describe("AutoSubmitLoginBackground", () => {
sendMockExtensionMessage({ command: "triggerAutoSubmitLogin" }, sender);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(autofillService.doAutoFillOnTab).not.toHaveBeenCalled;
});
it("skips acting on messages whose command does not have a registered handler", () => {
sendMockExtensionMessage({ command: "someInvalidCommand" }, sender);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(autofillService.doAutoFillOnTab).not.toHaveBeenCalled;
});

View File

@@ -46,6 +46,8 @@ describe("AutoSubmitLogin content script", () => {
beforeEach(() => {
jest.useFakeTimers();
setupEnvironmentDefaults();
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./auto-submit-login");
});

View File

@@ -23,6 +23,8 @@ export function EditButton({
title=${buttonText}
class=${editButtonStyles({ disabled, theme })}
@click=${(event: Event) => {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
!disabled && buttonAction(event);
}}
>

View File

@@ -1,3 +1,5 @@
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const CipherTypes = {
Login: 1,
SecureNote: 2,
@@ -7,6 +9,8 @@ const CipherTypes = {
type CipherType = (typeof CipherTypes)[keyof typeof CipherTypes];
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const CipherRepromptTypes = {
None: 0,
Password: 1,

View File

@@ -19,6 +19,8 @@ describe("ContentMessageHandler", () => {
);
beforeEach(() => {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./content-message-handler");
});

View File

@@ -6,6 +6,8 @@ describe("TriggerAutofillScriptInjection", () => {
describe("init", () => {
it("sends a message to the extension background", () => {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("../content/trigger-autofill-script-injection");
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({

View File

@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
import AutofillOverlayButton from "./autofill-overlay-button.deprecated";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./legacy-button.scss");
(function () {

View File

@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
import AutofillOverlayList from "./autofill-overlay-list.deprecated";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./legacy-list.scss");
(function () {

View File

@@ -60,6 +60,8 @@ describe("Fido2 Content Script", () => {
chrome.runtime.connect = jest.fn(() => portSpy);
it("destroys the messenger when the port is disconnected", () => {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
triggerPortOnDisconnectEvent(portSpy);
@@ -75,6 +77,8 @@ describe("Fido2 Content Script", () => {
const mockResult = { credentialId: "mock" } as CreateCredentialResult;
jest.spyOn(chrome.runtime, "sendMessage").mockResolvedValue(mockResult);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
const response = await messenger.handler!(message, new AbortController());
@@ -99,6 +103,8 @@ describe("Fido2 Content Script", () => {
data: mock<InsecureCreateCredentialParams>(),
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
await messenger.handler!(message, new AbortController());
@@ -121,6 +127,8 @@ describe("Fido2 Content Script", () => {
const abortController = new AbortController();
const abortSpy = jest.spyOn(abortController.signal, "removeEventListener");
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
await messenger.handler!(message, abortController);
@@ -141,6 +149,8 @@ describe("Fido2 Content Script", () => {
abortController.abort();
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
await messenger.handler!(message, abortController);
@@ -161,6 +171,8 @@ describe("Fido2 Content Script", () => {
const abortController = new AbortController();
jest.spyOn(chrome.runtime, "sendMessage").mockResolvedValue({ error: errorMessage });
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
const result = messenger.handler!(message, abortController);
@@ -175,6 +187,8 @@ describe("Fido2 Content Script", () => {
contentType: "application/json",
}));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
expect(messengerForDOMCommunicationSpy).not.toHaveBeenCalled();
@@ -193,6 +207,8 @@ describe("Fido2 Content Script", () => {
},
}));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
expect(messengerForDOMCommunicationSpy).not.toHaveBeenCalled();

View File

@@ -22,6 +22,8 @@ describe("FIDO2 page-script for manifest v2", () => {
it("skips appending the `page-script.js` file if the document contentType is not `text/html`", () => {
Object.defineProperty(window.document, "contentType", { value: "text/plain", writable: true });
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-page-script-append.mv2");
expect(window.document.createElement).not.toHaveBeenCalled();
@@ -33,6 +35,8 @@ describe("FIDO2 page-script for manifest v2", () => {
return node;
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-page-script-append.mv2");
expect(window.document.createElement).toHaveBeenCalledWith("script");
@@ -48,6 +52,8 @@ describe("FIDO2 page-script for manifest v2", () => {
return node;
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-page-script-append.mv2");
expect(window.document.createElement).toHaveBeenCalledWith("script");

View File

@@ -267,6 +267,8 @@ import { Messenger } from "./messaging/messenger";
clearWaitForFocus();
void messenger.destroy();
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
/** empty */
}

View File

@@ -55,6 +55,8 @@ describe("Fido2 page script with native WebAuthn support", () => {
setupMockedWebAuthnSupport();
beforeAll(() => {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-page-script");
});
@@ -166,6 +168,8 @@ describe("Fido2 page script with native WebAuthn support", () => {
contentType: "json/application",
}));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
expect(Messenger.forDOMCommunication).not.toHaveBeenCalled();
@@ -184,6 +188,8 @@ describe("Fido2 page script with native WebAuthn support", () => {
},
}));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-content-script");
expect(Messenger.forDOMCommunication).not.toHaveBeenCalled();

View File

@@ -50,6 +50,8 @@ describe("Fido2 page script without native WebAuthn support", () => {
const mockCreateCredentialsResult = createCreateCredentialResultMock();
const mockCredentialRequestOptions = createCredentialRequestOptionsMock();
const mockCredentialAssertResult = createAssertCredentialResultMock();
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./fido2-page-script");
afterEach(() => {

View File

@@ -15,6 +15,8 @@ import {
NotificationBarIframeInitData,
} from "./abstractions/notification-bar";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./bar.scss");
const logService = new ConsoleLogService(false);

View File

@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
import { AutofillInlineMenuButton } from "./autofill-inline-menu-button";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./button.scss");
(function () {

View File

@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
import { AutofillInlineMenuList } from "./autofill-inline-menu-list";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./list.scss");
(function () {

View File

@@ -1,3 +1,5 @@
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./menu-container.scss");
import { AutofillInlineMenuContainer } from "./autofill-inline-menu-container";

View File

@@ -1417,6 +1417,8 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
url.origin + pathWithoutTrailingSlashAndSearch,
url.origin + pathWithoutTrailingSlashSearchAndHash,
]);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (_error) {
return null;
}

View File

@@ -235,6 +235,8 @@ export class DomQueryService implements DomQueryServiceInterface {
if ((chrome as any).dom?.openOrClosedShadowRoot) {
try {
return (chrome as any).dom.openOrClosedShadowRoot(node);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
return null;
}

View File

@@ -342,6 +342,8 @@ export class NativeMessagingBackground {
};
}
this.port.postMessage(msg);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.logService.info(
"[Native Messaging IPC] Disconnected from Bitwarden Desktop app because of the native port disconnecting.",

View File

@@ -75,6 +75,8 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
}
}
return BiometricsStatus.Available;
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return BiometricsStatus.DesktopDisconnected;
}
@@ -142,6 +144,8 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
userId: id,
})
).response;
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return BiometricsStatus.DesktopDisconnected;
}

View File

@@ -11,13 +11,11 @@ import { GroupPolicyEnvironment } from "../admin-console/types/group-policy-envi
import { BrowserApi } from "./browser/browser-api";
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {
accountSwitching?: boolean;
} & SharedFlags;
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {
managedEnvironment?: GroupPolicyEnvironment;
} & SharedDevFlags;

View File

@@ -8,6 +8,8 @@ describe("OffscreenDocument", () => {
const browserClipboardServiceReadSpy = jest.spyOn(BrowserClipboardService, "read");
const consoleErrorSpy = jest.spyOn(console, "error");
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("../offscreen-document/offscreen-document");
describe("init", () => {

View File

@@ -48,6 +48,8 @@ describe("LocalBackedSessionStorage", () => {
localStorage.internalStore["session_test"] = encrypted.encryptedString;
encryptService.decryptToUtf8.mockResolvedValue(JSON.stringify("decrypted"));
const result = await sut.get("test");
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
encrypted,
sessionKey,
@@ -69,6 +71,8 @@ describe("LocalBackedSessionStorage", () => {
localStorage.internalStore["session_test"] = encrypted.encryptedString;
encryptService.decryptToUtf8.mockResolvedValue(JSON.stringify("decrypted"));
const result = await sut.get("test");
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
encrypted,
sessionKey,

View File

@@ -198,6 +198,8 @@ export class LocalBackedSessionStorageService
private compareValues<T>(value1: T, value2: T): boolean {
try {
return compareValues(value1, value2);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.logService.error(
`error comparing values\n${JSON.stringify(value1)}\n${JSON.stringify(value2)}`,

View File

@@ -17,6 +17,8 @@ const supported = (() => {
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
}
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// ignore
}

View File

@@ -4,7 +4,9 @@ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { PopupSizeService } from "../platform/popup/layout/popup-size.service";
import { BrowserPlatformUtilsService } from "../platform/services/platform-utils/browser-platform-utils.service";
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./scss/popup.scss");
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./scss/tailwind.css");
import { AppModule } from "./app.module";

View File

@@ -12,6 +12,8 @@ describe("LpFilelessImporter", () => {
chrome.runtime.connect = jest.fn(() => portSpy);
beforeEach(() => {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./lp-fileless-importer");
lpFilelessImporter = (globalThis as any).lpFilelessImporter;
});

View File

@@ -7,6 +7,8 @@ describe("LP Suppress Import Download for Manifest v2", () => {
return node;
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./lp-suppress-import-download-script-append.mv2");
expect(window.document.createElement).toHaveBeenCalledWith("script");

View File

@@ -10,6 +10,8 @@ describe("LP Suppress Import Download", () => {
jest.spyOn(Element.prototype, "appendChild");
jest.spyOn(window, "addEventListener");
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./lp-suppress-import-download");
anchor = document.createElement("a");

View File

@@ -34,6 +34,8 @@ export class ShareCommand {
if (req == null || req.length === 0) {
return Response.badRequest("You must provide at least one collection id for this item.");
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.badRequest("Error parsing the encoded request data.");
}

View File

@@ -165,6 +165,8 @@ export class LoginCommand {
if (options.method != null) {
twoFactorMethod = parseInt(options.method, null);
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.error("Invalid two-step login method.");
}
@@ -240,6 +242,8 @@ export class LoginCommand {
if (twoFactorMethod != null) {
try {
selectedProvider = twoFactorProviders.filter((p) => p.type === twoFactorMethod)[0];
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.error("Invalid two-step login method.");
}

View File

@@ -57,6 +57,8 @@ export class EditCommand {
try {
const reqJson = Buffer.from(requestJson, "base64").toString();
req = JSON.parse(reqJson);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.badRequest("Error parsing the encoded request data.");
}

View File

@@ -7,11 +7,9 @@ import {
} from "@bitwarden/common/platform/misc/flags";
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {} & SharedFlags;
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {} & SharedDevFlags;
export function flagEnabled(flag: keyof Flags): boolean {

View File

@@ -87,6 +87,8 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
}
return Utils.fromBufferToB64(decValue);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.logService.info("Decrypt error.");
return null;
@@ -104,6 +106,8 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
}
}
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.logService.info("Session key is invalid.");
}

View File

@@ -49,6 +49,8 @@ export class SendCreateCommand {
if (req == null) {
throw new Error("Null request");
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.badRequest("Error parsing the encoded request data.");
}

View File

@@ -41,6 +41,8 @@ export class SendEditCommand {
try {
const reqJson = Buffer.from(requestJson, "base64").toString();
req = SendResponse.fromJson(reqJson);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.badRequest("Error parsing the encoded request data.");
}

View File

@@ -47,6 +47,8 @@ export class SendReceiveCommand extends DownloadCommand {
let urlObject: URL;
try {
urlObject = new URL(url);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.badRequest("Failed to parse the provided Send url");
}

View File

@@ -66,6 +66,8 @@ export class CreateCommand {
try {
const reqJson = Buffer.from(requestJson, "base64").toString();
req = JSON.parse(reqJson);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
return Response.badRequest("Error parsing the encoded request data.");
}

View File

@@ -32,6 +32,8 @@ function log(configObj) {
function loadConfig(configName) {
try {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require(`./${configName}.json`);
} catch (e) {
if (e instanceof Error && e.code === "MODULE_NOT_FOUND") {

View File

@@ -1,4 +1,4 @@
/* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-require-imports, no-undef */
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
};

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
require("dotenv").config();
const child_process = require("child_process");
const path = require("path");

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
require("dotenv").config();
const path = require("path");

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
const child = require("child_process");
const { exit } = require("process");

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
const concurrently = require("concurrently");
const rimraf = require("rimraf");

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
exports.default = async function (configuration) {
if (parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && configuration.path.slice(-4) == ".exe") {

View File

@@ -67,6 +67,7 @@ import { SendComponent } from "./tools/send/send.component";
/**
* Data properties acceptable for use in route objects in the desktop
*/
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface RouteDataProperties {
// For any new route data properties, add them here.
// then assert that the data object satisfies this interface in the route object.

View File

@@ -1,7 +1,9 @@
import { enableProdMode } from "@angular/core";
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("../scss/styles.scss");
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("../scss/tailwind.css");
import { AppModule } from "./app.module";

View File

@@ -65,6 +65,8 @@ export class DesktopLoginComponentService
try {
await ipc.platform.localhostCallbackService.openSsoPrompt(codeChallenge, state);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
this.toastService.showToast({
variant: "error",

View File

@@ -249,6 +249,8 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit, OnDe
await this.ssoLoginService.setCodeVerifier(ssoCodeVerifier);
try {
await ipc.platform.localhostCallbackService.openSsoPrompt(codeChallenge, state);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
this.platformUtilsService.showToast(
"error",

View File

@@ -405,6 +405,8 @@ export class NativeMessagingMain {
this.logService.info(`Error reading preferences: ${e}`);
}
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// Browser is not installed, we can just skip it
}

View File

@@ -7,11 +7,9 @@ import {
} from "@bitwarden/common/platform/misc/flags";
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {} & SharedFlags;
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {} & SharedDevFlags;
export function flagEnabled(flag: keyof Flags): boolean {

View File

@@ -265,6 +265,8 @@ export class BiometricMessageHandlerService {
} else {
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
}
@@ -342,6 +344,8 @@ export class BiometricMessageHandlerService {
appId,
);
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
await this.send(
{ command: BiometricsCommands.UnlockWithBiometricsForUser, messageId, response: false },

View File

@@ -130,6 +130,8 @@ export class DuckDuckGoMessageHandlerService {
sharedKey: Utils.fromBufferToB64(encryptedSecret),
},
});
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
this.sendResponse({
messageId: messageId,
@@ -153,6 +155,8 @@ export class DuckDuckGoMessageHandlerService {
await this.encryptedMessageHandlerService.responseDataForCommand(decryptedCommandData);
await this.sendEncryptedResponse(message, { command, payload: responseData });
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises

View File

@@ -178,6 +178,8 @@ export class EncryptedMessageHandlerService {
await this.messagingService.send("refreshCiphers");
return { status: "success" };
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
return { status: "failure" };
}
@@ -222,6 +224,8 @@ export class EncryptedMessageHandlerService {
await this.messagingService.send("refreshCiphers");
return { status: "success" };
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
return { status: "failure" };
}

View File

@@ -1,4 +1,4 @@
/* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-require-imports, no-undef */
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
};

View File

@@ -167,6 +167,8 @@ export abstract class BaseEventsComponent {
let dates: string[] = null;
try {
dates = this.eventService.formatDateFilters(this.start, this.end);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.toastService.showToast({
variant: "error",

View File

@@ -113,6 +113,8 @@ export class EntityEventsComponent implements OnInit {
this.filterFormGroup.value.start,
this.filterFormGroup.value.end,
);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
this.toastService.showToast({
variant: "error",

View File

@@ -170,6 +170,8 @@ export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.router.navigate(["/"]);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
if (this.showNewOrganization) {
const dialog = openDeleteOrganizationDialog(this.dialogService, {

View File

@@ -27,6 +27,8 @@ const supported = (() => {
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
}
}
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
// ignore
}

View File

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

View File

@@ -46,6 +46,8 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
dialogService,
formBuilder,
);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
params?.folderId ? (this.folderId = params.folderId) : null;
}

View File

@@ -5,8 +5,12 @@ import { b64Decode, getQsParam } from "./common";
declare let hcaptcha: any;
if (window.location.pathname.includes("mobile")) {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./captcha-mobile.scss");
} else {
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./captcha.scss");
}
@@ -50,6 +54,8 @@ async function start() {
let decodedData: any;
try {
decodedData = JSON.parse(b64Decode(data, true));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
error("Cannot parse data.");
return;

View File

@@ -3,6 +3,8 @@
import { getQsParam } from "./common";
import { TranslationService } from "./translation.service";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./duo-redirect.scss");
const mobileDesktopCallback = "bitwarden://duo-callback";

View File

@@ -2,6 +2,8 @@
// @ts-strict-ignore
import { getQsParam } from "./common";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./sso.scss");
window.addEventListener("load", () => {

View File

@@ -4,6 +4,8 @@ import { b64Decode, getQsParam } from "./common";
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
import { TranslationService } from "./translation.service";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./webauthn.scss");
let parsed = false;
@@ -52,6 +54,8 @@ function parseParametersV2() {
let dataObj: { data: any; btnText: string } = null;
try {
dataObj = JSON.parse(b64Decode(getQsParam("data")));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
error("Cannot parse data.");
return;
@@ -103,6 +107,8 @@ function start() {
let json: any;
try {
json = parseWebauthnJson(webauthnJson);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
error("Cannot parse data.");
return;

View File

@@ -3,6 +3,8 @@
import { b64Decode, getQsParam } from "./common";
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./webauthn.scss");
const mobileCallbackUri = "bitwarden://webauthn-callback";
@@ -88,6 +90,8 @@ function parseParametersV2() {
} = null;
try {
dataObj = JSON.parse(b64Decode(getQsParam("data")));
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
error("Cannot parse data.");
return;
@@ -116,6 +120,8 @@ function start() {
try {
obj = parseWebauthnJson(webauthnJson);
// FIXME: Remove when updating file. Eslint update
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (e) {
error("Cannot parse webauthn data.");
return;

View File

@@ -7,11 +7,9 @@ import {
} from "@bitwarden/common/platform/misc/flags";
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type Flags = {} & SharedFlags;
// required to avoid linting errors when there are no flags
// eslint-disable-next-line @typescript-eslint/ban-types
export type DevFlags = {} & SharedDevFlags;
export function flagEnabled(flag: keyof Flags): boolean {