1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

fix(enums-eslint): Enum Rule for ESLint (#14650)

* fix(enums-eslint): Enum Rule for ESLint - Added enums in the warnings for eslint.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error in both places for enums.

* fix(enums-eslint): Enum Rule for ESLint - Added new eslint plugin for warning on enums.

* fix(enums-eslint): Enum Rule for ESLint - Changed based on suggestion.

Co-authored-by: Andreas Coroiu <acoroiu@bitwarden.com>

* refactor(browser-platform-utils): Remove Deprecation and Fix Code - Changed usages of firefox to private and moved the usages to the preferred public method and removed the deprecations.

* fix(enums-eslint): Enum Rule for ESLint - Updated to error and added disable rules for all other places.

* fix(enums-eslint): Enum Rule for ESLint - Undid other changes by accident
This commit is contained in:
Patrick-Pimentel-Bitwarden
2025-05-13 10:07:38 -04:00
committed by GitHub
parent 9f3310ed7e
commit 0b0397c3f0
156 changed files with 445 additions and 1 deletions

View File

@@ -149,6 +149,8 @@ export interface PasswordHealthReportApplicationsRequest {
url: string;
}
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum DrawerType {
None = 0,
AppAtRiskMembers = 1,

View File

@@ -25,6 +25,8 @@ export type AddEditMemberDialogParams = {
};
};
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum AddEditMemberDialogResultType {
Closed = "closed",
Deleted = "deleted",

View File

@@ -18,6 +18,8 @@ export type AddExistingOrganizationDialogParams = {
provider: Provider;
};
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum AddExistingOrganizationDialogResultType {
Closed = "closed",
Submitted = "submitted",

View File

@@ -22,6 +22,8 @@ type CreateClientDialogParams = {
plans: PlanResponse[];
};
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum CreateClientDialogResultType {
Closed = "closed",
Submitted = "submitted",

View File

@@ -23,6 +23,8 @@ type ManageClientNameDialogParams = {
};
};
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum ManageClientNameDialogResultType {
Closed = "closed",
Submitted = "submitted",

View File

@@ -18,6 +18,8 @@ type ManageClientSubscriptionDialogParams = {
provider: Provider;
};
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum ManageClientSubscriptionDialogResultType {
Closed = "closed",
Submitted = "submitted",

View File

@@ -37,6 +37,8 @@ import { PasswordHealthMembersURIComponent } from "./password-health-members-uri
import { PasswordHealthMembersComponent } from "./password-health-members.component";
import { PasswordHealthComponent } from "./password-health.component";
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum RiskInsightsTabType {
AllApps = 0,
CriticalApps = 1,

View File

@@ -11,6 +11,8 @@ import { DialogRef, DIALOG_DATA, BitValidators, ToastService } from "@bitwarden/
import { ProjectView } from "../../models/view/project.view";
import { ProjectService } from "../../projects/project.service";
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum OperationType {
Add,
Edit,

View File

@@ -44,11 +44,15 @@ import { SecretService } from "../secret.service";
import { SecretDeleteDialogComponent, SecretDeleteOperation } from "./secret-delete.component";
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum OperationType {
Add,
Edit,
}
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum SecretDialogTabType {
NameValuePair = 0,
People = 1,

View File

@@ -10,6 +10,8 @@ import { DialogRef, DIALOG_DATA, BitValidators, ToastService } from "@bitwarden/
import { ServiceAccountView } from "../../models/view/service-account.view";
import { ServiceAccountService } from "../service-account.service";
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum OperationType {
Add,
Edit,

View File

@@ -1,3 +1,5 @@
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum ApItemEnum {
User,
Group,

View File

@@ -1,3 +1,5 @@
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum ApPermissionEnum {
CanRead = "canRead",
CanReadWrite = "canReadWrite",

View File

@@ -15,6 +15,8 @@ export interface BulkConfirmationStatus {
description: string;
}
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
export enum BulkConfirmationResult {
Continue,
Cancel,