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:
@@ -56,6 +56,7 @@
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
|
||||
"@typescript-eslint/no-this-alias": ["error", { "allowedNames": ["self"] }],
|
||||
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
|
||||
"no-console": "error",
|
||||
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package.
|
||||
|
||||
@@ -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")],
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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 */
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)}`,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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")],
|
||||
};
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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") {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" };
|
||||
}
|
||||
|
||||
@@ -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")],
|
||||
};
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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, {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -98,6 +98,8 @@ export class DeviceApprovalsComponent implements OnInit, OnDestroy {
|
||||
title: null,
|
||||
message: this.i18nService.t("loginRequestApproved"),
|
||||
});
|
||||
// FIXME: Remove when updating file. Eslint update
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
} catch (error) {
|
||||
this.toastService.showToast({
|
||||
variant: "error",
|
||||
|
||||
@@ -107,6 +107,8 @@ export class SecretsManagerPortingApiService {
|
||||
return secret;
|
||||
}),
|
||||
);
|
||||
// FIXME: Remove when updating file. Eslint update
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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.");
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 };
|
||||
});
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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?
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
}
|
||||
|
||||
@@ -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?
|
||||
}
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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} */
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user