mirror of
https://github.com/bitwarden/browser
synced 2025-12-25 20:53:22 +00:00
eslint: report unused disable directives (#13463)
Remove any unused disable directives and FIXMEs in our code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require("postcss-import"),
|
||||
|
||||
@@ -99,7 +99,6 @@ import { AwaitDesktopDialogComponent } from "./await-desktop-dialog.component";
|
||||
VaultTimeoutInputComponent,
|
||||
],
|
||||
})
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
||||
export class AccountSecurityComponent implements OnInit, OnDestroy {
|
||||
protected readonly VaultTimeoutAction = VaultTimeoutAction;
|
||||
|
||||
|
||||
@@ -479,7 +479,6 @@ describe("OverlayBackground", () => {
|
||||
it("will set up onMessage and onConnect listeners", () => {
|
||||
overlayBackground["setupExtensionMessageListeners"]();
|
||||
|
||||
// eslint-disable-next-line
|
||||
expect(chrome.runtime.onMessage.addListener).toHaveBeenCalled();
|
||||
expect(chrome.runtime.onConnect.addListener).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
@@ -1412,7 +1412,6 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
let doesContainValue = false;
|
||||
CreditCardAutoFillConstants.CardAttributesExtended.forEach((attributeName) => {
|
||||
// eslint-disable-next-line no-prototype-builtins
|
||||
if (doesContainValue || !field[attributeName]) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,12 +34,8 @@ export default class IdleBackground {
|
||||
|
||||
const idleHandler = (newState: string) => {
|
||||
if (newState === "active") {
|
||||
// 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.notificationsService.reconnectFromActivity();
|
||||
} else {
|
||||
// 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.notificationsService.disconnectFromInactivity();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -85,7 +85,6 @@ describe("BrowserTaskSchedulerService", () => {
|
||||
callback,
|
||||
);
|
||||
// @ts-expect-error mocking global browser object
|
||||
// eslint-disable-next-line no-global-assign
|
||||
globalThis.browser = {};
|
||||
chrome.alarms.get = jest.fn().mockImplementation((_name, callback) => callback(undefined));
|
||||
});
|
||||
@@ -95,8 +94,7 @@ describe("BrowserTaskSchedulerService", () => {
|
||||
jest.clearAllTimers();
|
||||
jest.useRealTimers();
|
||||
|
||||
// eslint-disable-next-line no-global-assign
|
||||
globalThis.browser = undefined;
|
||||
(globalThis.browser as any) = undefined;
|
||||
});
|
||||
|
||||
describe("setTimeout", () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
|
||||
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||
const config = require("../../libs/components/tailwind.config.base");
|
||||
|
||||
config.content = [
|
||||
|
||||
Reference in New Issue
Block a user