mirror of
https://github.com/bitwarden/clients.git
synced 2026-07-21 21:17:06 +08:00
Enable no relative imports rule (#21515)
This commit is contained in:
parent
40af40f6fb
commit
4b6b42cd83
@ -643,11 +643,10 @@ export default tseslint.config(
|
||||
// Within a package, import sibling code via relative paths rather than the package's own
|
||||
// `@bitwarden/*` alias. Scoped to libs here; the rule self-limits to the file's owning package.
|
||||
// https://contributing.bitwarden.com/contributing/code-style/web/typescript#imports-within-the-same-package
|
||||
// TODO: change to "error" once existing self-alias imports are converted (run `eslint --fix`).
|
||||
{
|
||||
files: ["libs/**/*.ts", "bitwarden_license/bit-common/src/**/*.ts"],
|
||||
rules: {
|
||||
"@bitwarden/platform/no-self-package-import": "off",
|
||||
"@bitwarden/platform/no-self-package-import": "error",
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ import {
|
||||
} from "@angular/forms";
|
||||
import { Subject, firstValueFrom, take, filter, takeUntil } from "rxjs";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import {
|
||||
EnvironmentService,
|
||||
Region,
|
||||
@ -30,6 +29,8 @@ import {
|
||||
TypographyModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
import { JslibModule } from "../../jslib.module";
|
||||
|
||||
/**
|
||||
* Validator for self-hosted environment settings form.
|
||||
* It enforces that at least one URL is provided.
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { BaseResponse } from "@bitwarden/common/models/response/base.response";
|
||||
import { BaseResponse } from "../../../models/response/base.response";
|
||||
|
||||
export class PremiumCheckoutSessionResponse extends BaseResponse {
|
||||
checkoutSessionUrl: string;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { mock } from "jest-mock-extended";
|
||||
|
||||
import { SdkService } from "@bitwarden/common/platform/abstractions/sdk/sdk.service";
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import {
|
||||
BiometricStateService,
|
||||
@ -14,6 +13,7 @@ import { UserKeyRotationServiceAbstraction } from "@bitwarden/user-crypto-manage
|
||||
import { ClientType } from "../../enums";
|
||||
import { ConfigService } from "../../platform/abstractions/config/config.service";
|
||||
import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service";
|
||||
import { SdkService } from "../../platform/abstractions/sdk/sdk.service";
|
||||
import { SyncService } from "../../platform/sync";
|
||||
import { UserId } from "../../types/guid";
|
||||
import { CipherService } from "../../vault/abstractions/cipher.service";
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { SdkService } from "@bitwarden/common/platform/abstractions/sdk/sdk.service";
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import {
|
||||
BiometricStateService,
|
||||
@ -13,6 +12,7 @@ import { assertNonNullish } from "../../auth/utils";
|
||||
import { ClientType } from "../../enums";
|
||||
import { ConfigService } from "../../platform/abstractions/config/config.service";
|
||||
import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service";
|
||||
import { SdkService } from "../../platform/abstractions/sdk/sdk.service";
|
||||
import { SyncService } from "../../platform/sync";
|
||||
import { UserId } from "../../types/guid";
|
||||
import { CipherService } from "../../vault/abstractions/cipher.service";
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { mock, MockProxy } from "jest-mock-extended";
|
||||
import { BehaviorSubject, firstValueFrom, of } from "rxjs";
|
||||
|
||||
import { V2UpgradeTokenStateService } from "@bitwarden/common/key-management/upgrade-token/abstractions/v2-upgrade-token-state.service.abstraction";
|
||||
// This import has been flagged as unallowed for this class. It may be involved in a circular dependency loop.
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { KdfConfigService, KeyService, PBKDF2KdfConfig } from "@bitwarden/key-management";
|
||||
@ -17,6 +16,7 @@ import {
|
||||
import { ApiService } from "../../../abstractions/api.service";
|
||||
import { AccountCryptographicStateService } from "../../../key-management/account-cryptography/account-cryptographic-state.service";
|
||||
import { EncryptedString } from "../../../key-management/crypto/models/enc-string";
|
||||
import { V2UpgradeTokenStateService } from "../../../key-management/upgrade-token/abstractions/v2-upgrade-token-state.service.abstraction";
|
||||
import { UserId } from "../../../types/guid";
|
||||
import { UserKey } from "../../../types/key";
|
||||
import { ConfigService } from "../../abstractions/config/config.service";
|
||||
|
||||
@ -20,7 +20,6 @@ import {
|
||||
filter,
|
||||
} from "rxjs";
|
||||
|
||||
import { V2UpgradeTokenStateService } from "@bitwarden/common/key-management/upgrade-token/abstractions/v2-upgrade-token-state.service.abstraction";
|
||||
// This import has been flagged as unallowed for this class. It may be involved in a circular dependency loop.
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { KeyService, KdfConfigService } from "@bitwarden/key-management";
|
||||
@ -39,6 +38,7 @@ import { AccountInfo, AccountService } from "../../../auth/abstractions/account.
|
||||
import { AccountCryptographicStateService } from "../../../key-management/account-cryptography/account-cryptographic-state.service";
|
||||
import { EncString } from "../../../key-management/crypto/models/enc-string";
|
||||
import { JsWasmStateBridge } from "../../../key-management/state-bridge";
|
||||
import { V2UpgradeTokenStateService } from "../../../key-management/upgrade-token/abstractions/v2-upgrade-token-state.service.abstraction";
|
||||
import { OrganizationId, UserId } from "../../../types/guid";
|
||||
import { ConfigService } from "../../abstractions/config/config.service";
|
||||
import { Environment, EnvironmentService } from "../../abstractions/environment.service";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user