1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

eslint: report unused disable directives (#13463)

Remove any unused disable directives and FIXMEs in our code
This commit is contained in:
Thomas Rittson
2025-03-10 23:33:08 +10:00
committed by GitHub
parent afd715c79c
commit ef72f513b1
69 changed files with 12 additions and 91 deletions

View File

@@ -107,7 +107,6 @@ export class LoginViaAuthRequestComponentV1
this.authRequestService.authRequestPushNotification$
.pipe(takeUntil(this.destroy$))
.subscribe((id) => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.verifyAndHandleApprovedAuthReq(id).catch((e: Error) => {
this.toastService.showToast({
variant: "error",

View File

@@ -4,7 +4,6 @@ import { ActivatedRoute, convertToParamMap, Router } from "@angular/router";
import { mock, MockProxy } from "jest-mock-extended";
import { BehaviorSubject } from "rxjs";
// eslint-disable-next-line no-restricted-imports
import { WINDOW } from "@bitwarden/angular/services/injection-tokens";
import {
LoginStrategyServiceAbstraction,

View File

@@ -6,7 +6,6 @@ import { ActivatedRoute, NavigationExtras, Router } from "@angular/router";
import { firstValueFrom } from "rxjs";
import { first } from "rxjs/operators";
// eslint-disable-next-line no-restricted-imports
import { WINDOW } from "@bitwarden/angular/services/injection-tokens";
import {
LoginStrategyServiceAbstraction,

View File

@@ -23,7 +23,6 @@ import { KeyService } from "@bitwarden/key-management";
@Directive({
selector: "app-user-verification",
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class UserVerificationComponent implements ControlValueAccessor, OnInit, OnDestroy {
private _invalidSecret = false;
@Input()

View File

@@ -6,7 +6,6 @@ import { ActivatedRoute, convertToParamMap, Router } from "@angular/router";
import { mock, MockProxy } from "jest-mock-extended";
import { BehaviorSubject } from "rxjs";
// eslint-disable-next-line no-restricted-imports
import { WINDOW } from "@bitwarden/angular/services/injection-tokens";
import {
LoginStrategyServiceAbstraction,

View File

@@ -68,7 +68,6 @@ import { ActiveClientVerificationOption } from "./active-client-verification-opt
CalloutModule,
],
})
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
export class UserVerificationFormInputComponent implements ControlValueAccessor, OnInit, OnDestroy {
@Input() verificationType: "server" | "client" = "server"; // server represents original behavior
private _invalidSecret = false;

View File

@@ -14,7 +14,6 @@ export abstract class TokenRequest {
this.device = device != null ? device : null;
}
// eslint-disable-next-line
alterIdentityTokenHeaders(headers: Headers) {
// Implemented in subclass if required
}

View File

@@ -1,6 +1,5 @@
import { MockProxy, mock } from "jest-mock-extended";
// eslint-disable-next-line import/no-restricted-paths -- Needed to print log messages
import { FakeStorageService } from "../../spec/fake-storage.service";
// eslint-disable-next-line import/no-restricted-paths -- Needed client type enum
import { ClientType } from "../enums";

View File

@@ -1,5 +1,4 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
// eslint-disable-next-line
import "zone.js/testing";
import { getTestBed } from "@angular/core/testing";

View File

@@ -1,3 +1,2 @@
/* eslint-disable */
export const userAccountData = `nickname,url,username,password,additionalInfo,twofaSecret,status,tags
PasswordNickname,www.google.com,user.name@email.com,abc123,This is the additional information text.,someTOTPSeed,active,someTag`;

View File

@@ -1,3 +1,2 @@
/* eslint-disable */
export const userCreditCardData = `nickname,status,tags,cardNumber,cardName,exp_month,exp_year,cvv,additionalInfo
Visa test card,active,someTag,4111111111111111,Joe User,04,24,222,This is the additional information field`;

View File

@@ -1,4 +1,3 @@
/* eslint-disable */
export const userIdCardData = `nickname,status,tags,idType,idNumber,idName,idIssuanceDate,idExpirationDate,idCountry,additionalInfo
Joe User's nickname,active,someTag,Driver's License,123456,Joe M User,02/02/2022,02/02/2024,United States,Additional information
Passport ID card,active,someTag,Passport,1234567,Joe M User,03/07/2022,03/07/2028,United States,Additional information field

View File

@@ -1,3 +1,2 @@
/* eslint-disable */
export const userIdentityData = `nickname,status,tags,firstName,middleName,lastName,email,firstAddressLine,secondAddressLine,title,gender,number,city,country,zipCode,additionalInfo
Joe User's nickname,active,someTag,Joe,M,User,joe.user@email.com,1 Example House,Suite 300,Mr,Male,2223334444,Portland,United States,04101,Additional information field`;

View File

@@ -1,3 +1,2 @@
/* eslint-disable */
export const userNoteData = `nickname,status,content
The title of a secure note,active,"The content of a secure note. Lorem ipsum, etc."`;

View File

@@ -1,3 +1,2 @@
/* eslint-disable */
export const userTwoFaData = `nickname,status,tags,authToken,additionalInfo
2FA nickname,active,someTag,someTOTPSeed,"Additional information field content. "`;

View File

@@ -260,7 +260,6 @@ export class DefaultKeyService implements KeyServiceAbstraction {
}
if (keySuffix === KeySuffixOptions.Pin && userId != null) {
// 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.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);
// 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

@@ -36,7 +36,7 @@ import {
} from "@bitwarden/vault";
// FIXME: remove `/apps` import from `/libs`
// FIXME: remove `src` and fix import
// eslint-disable-next-line import/no-restricted-paths, no-restricted-imports
// eslint-disable-next-line no-restricted-imports
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/src/app/core/tests";
import { CipherFormService } from "./abstractions/cipher-form.service";